undefined reference to `__errno_location(void)'

Rupert Wood me@rupey.net
Sun Sep 1 23:38:00 GMT 2002


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.



More information about the Gcc-help mailing list