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: "Rupert Wood" <me at rupey dot net>
- To: "'GRE Spam Mail'" <gre_spam at anora dot org>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Mon, 2 Sep 2002 07:38:48 +0100
- Subject: RE: undefined reference to `__errno_location(void)'
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? If so, can you confirm that you've got a libpthread.a
or libpthread.so in /lib or /usr/lib and that it contains the symbol
__errno_location?
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?
Good luck,
Rup.