This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: undefined reference to `__errno_location(void)'
- From: GRE Spam Mail <gre_spam at anora dot org>
- To: "Rupert Wood" <me at rupey dot net>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 2 Sep 2002 13:06:44 -0400
- Subject: Re: undefined reference to `__errno_location(void)'
- Organization: Anora Computer Services
- References: <616BE6A276E3714788D2AC35C40CD18D7D2511@whale.softwire.co.uk><616BE6A276E3714788D2AC35C40CD18D561765@whale.softwire.co.uk>
On Mon, 2 Sep 2002 07:38:48 +0100
"Rupert Wood" <me@rupey.net> wrote:
> Gordon Ellsworth wrote:
>
> > /home/muvie/muvie/src/socket_class.c:211: undefined reference to
> > `__errno_location(void)'
> :
> > And when you link make sure to add -lpthread,
> > since the symbol for errno_location is defined
> > in the libpthread library on Linux.
> :
> > I tried this, but it did not get rid of the problem.
>
> Can I confirm that you tried the '-lpthread' in addition to the #include
> in the PR comment?
Which #include would that be? I think I missed it.
> If so, can you confirm that you've got a libpthread.a
> or libpthread.so in /lib or /usr/lib
Here's what I have:
./usr/lib/libpthread.a
./usr/lib/libpthread_p.a
./lib/libpthread-0.9.so
./usr/lib/libpthread.so
> and that it contains the symbol
> __errno_location?
>
How do I check for the symbol?
I tried this to see if the symbol was there, I don't know if this is the right
way to check:
[root@vaghn (/)] 01:02:53 $ grep "__errno_location" /usr/lib/libpthread.a
Binary file /usr/lib/libpthread.a matches
[root@vaghn (/)] 01:02:56 $ grep "__errno_location" /usr/lib/libpthread.so
Binary file /usr/lib/libpthread.so matches
> As you said you haven't upgraded, the system *ought* to work as shipped.
> But it's possible (albeit unlikely) that your C library was not build
> with threading support or that you're missing the ptherad library -
> maybe you need to install it as a separate package?
I installed every package that comes with Slackware 8.1 (I did a full install
from the Slackware CD) so there should be nothing missing.
>
> Good luck,
> Rup.
Thank you for your help.
Sincerely,
Gordon R. Ellsworth, Jr.