[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can't build libposix
From: |
Bruce Korb |
Subject: |
Re: Can't build libposix |
Date: |
Wed, 08 Dec 2010 15:05:36 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101026 SUSE/3.0.10 Thunderbird/3.0.10 |
On 12/08/10 06:11, Gary V. Vaughan wrote:
> If you are on a glibc system, I think the library provides the necessary
> symbol and you should be able to build a working libposix from the topic
> branch after a git pull. Otherwise you'll have to link in the progname
> module, or similar to resolve it... until we come up with a blessed
> method for dealing with it properly.
Hi,
Scratching my head and fuzzily remembering the problem, the issues are:
1. The error module gets sucked into the POSIX library and it
will seg fault for you if you have not defined and initialized
a "char * program_name" global variable.
This is very bad because it has the unanticipatable consequence
of requiring the libposix client to know that there are non-posix
requirements in using this posix library.
2. On some non-ELF systems, if you declare a pointer as in:
char * program_name;
that declaration is actually a definition with non-weak linkage.
i.e. it is not dumped into an "anonymous region(?)".
This creates a link problem, despite the commonness of using this
idiom for 40 years.
I think the correct solution is to find a way to have the error
module not seg fault and also to not require non-posix calls be
made in order to use the libposix library.
Possible fixes:
* modify the error module to tolerate a NULL value
in program_name, defining the variable only where needed
(using some autoconf wizardry).
* automatically set that value, likewise defining as needed
* figure out how to remove the dependency(ies) that draw it
into the library.
Just adding the progname module and requiring a non-posix call
is not a good solution (in my completely unhumble opinion).
- Re: Can't build libposix, (continued)
- Re: Can't build libposix, Reuben Thomas, 2010/12/08
- Re: Can't build libposix, Bastien ROUCARIES, 2010/12/09
- Re: Can't build libposix, Gary V. Vaughan, 2010/12/09
- Re: Can't build libposix, Bastien ROUCARIES, 2010/12/11
- Re: Can't build libposix, Peter O'Gorman, 2010/12/11
- Re: Can't build libposix, Bastien ROUCARIES, 2010/12/12
- Re: Can't build libposix, Peter O'Gorman, 2010/12/12
- Re: Can't build libposix, Bastien ROUCARIES, 2010/12/16
- Re: Can't build libposix, Bastien ROUCARIES, 2010/12/16
- Re: Can't build libposix, Bastien ROUCARIES, 2010/12/19
- Re: Can't build libposix,
Bruce Korb <=