undefined reference to 'pthread_'
Hi, I'm trying to compile freeradius 2.2.3 on ubuntu 13.10 (64 bit) with ./configure make but i have: gcc -o .libs/rlm_dbm_parser .libs/rlm_dbm_parser.o /home/ntt/freeradius-server-2.2.3/src/lib/.libs/libfreeradius-radius.so -lgdbm_compat -lssl -lcrypto -lnsl -lresolv -lpthread /home/ntt/freeradius-server-2.2.3/src/lib/.libs/libfreeradius-radius.so: undefined reference to `pthread_getspecific' /home/ntt/freeradius-server-2.2.3/src/lib/.libs/libfreeradius-radius.so: undefined reference to `pthread_key_create' /home/ntt/freeradius-server-2.2.3/src/lib/.libs/libfreeradius-radius.so: undefined reference to `pthread_once' /home/ntt/freeradius-server-2.2.3/src/lib/.libs/libfreeradius-radius.so: undefined reference to `pthread_setspecific' I'm using apt-get build-dep freeradius, so i think there are all deps. Why this happens? Thanks
Marco Marino wrote:
Hi, I'm trying to compile freeradius 2.2.3 on ubuntu 13.10 (64 bit) with ./configure make
but i have: gcc -o .libs/rlm_dbm_parser .libs/rlm_dbm_parser.o /home/ntt/freeradius-server-2.2.3/src/lib/.libs/libfreeradius-radius.so -lgdbm_compat -lssl -lcrypto -lnsl -lresolv -lpthread /home/ntt/freeradius-server-2.2.3/src/lib/.libs/libfreeradius-radius.so: undefined reference to `pthread_getspecific'
Your system is broken. It's being asked to link to "-lpthread", but for some reason it's not finding the pthread systems in the pthread library. Alan DeKok.
This happens on 2 servers. It seems a strange behavior..... i have pthread installed. 2014/1/20 Alan DeKok <aland@deployingradius.com>
Marco Marino wrote:
Hi, I'm trying to compile freeradius 2.2.3 on ubuntu 13.10 (64 bit) with ./configure make
but i have: gcc -o .libs/rlm_dbm_parser .libs/rlm_dbm_parser.o /home/ntt/freeradius-server-2.2.3/src/lib/.libs/libfreeradius-radius.so -lgdbm_compat -lssl -lcrypto -lnsl -lresolv -lpthread /home/ntt/freeradius-server-2.2.3/src/lib/.libs/libfreeradius-radius.so: undefined reference to `pthread_getspecific'
Your system is broken. It's being asked to link to "-lpthread", but for some reason it's not finding the pthread systems in the pthread library.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On 20 Jan 2014, at 16:24, Marco Marino <marino.mrc@gmail.com> wrote:
This happens on 2 servers. It seems a strange behavior..... i have pthread installed.
FWIW this is the same issue I see on my ubuntu VM. Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
I don't think. On a third server i can compile freeradius 2.2.3 (same version). On this server i have ubuntu 12.04 lts with Linux ow-service 3.5.0-23-generic #35~precise1-Ubuntu SMP Fri Jan 25 17:13:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux kernel is 3.11.0-15 generic on server where i cannot compile. 2014/1/20 Alan DeKok <aland@deployingradius.com>
Arran Cudbard-Bell wrote:
FWIW this is the same issue I see on my ubuntu VM.
Weird... I don't see it on the Ubuntu VM I have. Maybe it's a link order / linker issue?
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Marco Marino wrote:
I don't think. On a third server i can compile freeradius 2.2.3 (same version). On this server i have ubuntu 12.04 lts with Linux ow-service 3.5.0-23-generic #35~precise1-Ubuntu SMP Fri Jan 25 17:13:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
The other was Ubuntu 10, right?
kernel is 3.11.0-15 generic on server where i cannot compile.
The kernel shouldn't matter. Well, if it works correctly on one system and not on another, I'm inclined to call it a tool chain issue. I don't know how I can fix it. Alan DeKok.
2014/1/20 Alan DeKok <aland@deployingradius.com>
Marco Marino wrote:
I don't think. On a third server i can compile freeradius 2.2.3 (same version). On this server i have ubuntu 12.04 lts with Linux ow-service 3.5.0-23-generic #35~precise1-Ubuntu SMP Fri Jan 25 17:13:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
The other was Ubuntu 10, right?
No. it's 13.10, server version. Others (where i cannot compile) are desktop version.
kernel is 3.11.0-15 generic on server where i cannot compile.
The kernel shouldn't matter.
Well, if it works correctly on one system and not on another, I'm inclined to call it a tool chain issue. I don't know how I can fix it.
No one else has this problem? It seems strange because I think it would be very common.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Ok. I founded a "workaround". I don't have time for a complete solution now. after ./configure edit Make.inc in the root folder and add -pthread (without 'l' !!!) to the LDFLAGS variable. Modules that will not compile without this work around are: rlm_dbm (rlm_dbm_parser) , rlm_ippool (rlm_ippool_tool) and rlm_mschap (smbencrypt). Moreover the radsniff utility will not compile without this workaround. Thanks all for help. Regards MM 2014/1/21 Marco Marino <marino.mrc@gmail.com>
2014/1/20 Alan DeKok <aland@deployingradius.com>
Marco Marino wrote:
I don't think. On a third server i can compile freeradius 2.2.3 (same version). On this server i have ubuntu 12.04 lts with Linux ow-service 3.5.0-23-generic #35~precise1-Ubuntu SMP Fri Jan 25 17:13:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
The other was Ubuntu 10, right?
No. it's 13.10, server version. Others (where i cannot compile) are desktop version.
kernel is 3.11.0-15 generic on server where i cannot compile.
The kernel shouldn't matter.
Well, if it works correctly on one system and not on another, I'm inclined to call it a tool chain issue. I don't know how I can fix it.
No one else has this problem? It seems strange because I think it would be very common.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Marco Marino wrote:
Ok. I founded a "workaround". I don't have time for a complete solution now. after ./configure edit Make.inc in the root folder and add -pthread (without 'l' !!!) to the LDFLAGS variable.
Modules that will not compile without this work around are: rlm_dbm (rlm_dbm_parser) , rlm_ippool (rlm_ippool_tool) and rlm_mschap (smbencrypt). Moreover the radsniff utility will not compile without this workaround.
OK. It looks like some versions of gcc want "-pthread" and have problems when using "-lpthread" <sigh> This is one reason why development is so annoying. Things which have worked for 20 years get destroyed in the interest of... what, I'm not sure. I'll see if I can push a patch. Alan DeKok.
participants (3)
-
Alan DeKok -
Arran Cudbard-Bell -
Marco Marino