Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2015-06

Re: Bug#789091: fpc: ncurses/form unit declares internal libform objects

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

peter green
Sven Joachim wrote 24 lines
Source: fpc Version: 2.6.4+dfsg-6 The file fpcsrc/packages/ncurses/src/form.pp declares the objects _nc_Default_Form and _nc_Default_Field: ,---- | (* Default objects *) | {$ifndef darwin} | _nc_Default_Form : PFORM;cvar;external; | _nc_Default_Field : PFIELD;cvar;external; | {$else darwin} | _nc_Default_Form : PFORM external libform name '_nc_Default_Form'; | _nc_Default_Field : PFIELD external libform name '_nc_Default_Field'; | {$endif darwin} `---- There does not seem to be a good reason to do so, those symbols are not part of the ncurses form API and will go away from the shared form library soon, see #788610. Apparently those two symbols are still in the libform.a library, so as long as fpc does not support dynamic linking (#472304) there should not be a problem,

This statement is incorrect, fpc doesn't dynamically link it's own run time library but it most certainly can and does dynamically link C libraries.

but please remove these useless declarations and ask upstream to do the same.

Freepascal upstream: any comments on this?

Reply by email

Michael Van Canneyt
to peter green
peter green wrote 31 lines
On 17/06/15 19:06, Sven Joachim wrote: > Source: fpc > Version: 2.6.4+dfsg-6 > > The file fpcsrc/packages/ncurses/src/form.pp declares the objects > _nc_Default_Form and _nc_Default_Field: > > ,---- > | (* Default objects *) > | {$ifndef darwin} > | _nc_Default_Form : PFORM;cvar;external; > | _nc_Default_Field : PFIELD;cvar;external; > | {$else darwin} > | _nc_Default_Form : PFORM external libform name '_nc_Default_Form'; > | _nc_Default_Field : PFIELD external libform name '_nc_Default_Field'; > | {$endif darwin} > `---- > > There does not seem to be a good reason to do so, those symbols are not > part of the ncurses form API and will go away from the shared form > library soon, see #788610. > Apparently those two symbols are still in the libform.a library, so as > long as fpc does not support dynamic linking (#472304) there should not > be a problem, This statement is incorrect, fpc doesn't dynamically link it's own run time library but it most certainly can and does dynamically link C libraries. > but please remove these useless declarations and ask > upstream to do the same. > Freepascal upstream: any comments on this?

If they are declared, it means they were in the public headers at the time of translation. If they disappear from the library, we'll remove them from the sources.

Note that they are declared as c variables.
It means that the symbol isn't actually used in linking until someone writes code that actually uses the variable.

Michael.

Reply by email

Sven Joachim
to Michael Van Canneyt
Michael Van Canneyt wrote 36 lines
On Wed, 17 Jun 2015, peter green wrote: > On 17/06/15 19:06, Sven Joachim wrote: >> Source: fpc >> Version: 2.6.4+dfsg-6 >> >> The file fpcsrc/packages/ncurses/src/form.pp declares the objects >> _nc_Default_Form and _nc_Default_Field: >> >> ,---- >> | (* Default objects *) >> | {$ifndef darwin} >> | _nc_Default_Form : PFORM;cvar;external; >> | _nc_Default_Field : PFIELD;cvar;external; >> | {$else darwin} >> | _nc_Default_Form : PFORM external libform name '_nc_Default_Form'; >> | _nc_Default_Field : PFIELD external libform name '_nc_Default_Field'; >> | {$endif darwin} >> `---- >> >> There does not seem to be a good reason to do so, those symbols are not >> part of the ncurses form API and will go away from the shared form >> library soon, see #788610. >> Apparently those two symbols are still in the libform.a library, so as >> long as fpc does not support dynamic linking (#472304) there should not >> be a problem, > This statement is incorrect, fpc doesn't dynamically link it's own > run time library but it most certainly can and does dynamically link > C libraries. > >> but please remove these useless declarations and ask >> upstream to do the same. >> > Freepascal upstream: any comments on this? If they are declared, it means they were in the public headers at the time of translation.

That's correct. According to ncurses.pp, your package is based on ncurses 5.6.20061217, in ncurses 5.7.20091107 the form.h header was changed to not declare those symbols anymore[1].

If they disappear from the library, we'll remove them from the sources.

Thanks.

Cheers,
Sven

1. http://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff;h=f5da57ad7eb397b1001e2fca9cb0e278a6564716#patch7

Reply by email