Required libpthread not found. Use --with-libpthread
2010-05-16 by john_espiro
Yahoo Groups archive
Index last updated: 2026-04-28 23:32 UTC
Thread
2010-05-16 by john_espiro
I am trying to compile milter-greylist v I run: ./configure --with-libGeoIP --prefix=/usr --with-libpthread=/usr/lib/ And the output I get is: If I leave off all config options, it works just fine. checking for pthread_create in -lpthread... no checking for pthread_create in -lc_r... no checking for pthread_create in -lpthreads -lpthread... no Required libpthread not found. Use --with-libpthread libpthread is in /usr/lib. Can anyone help? My system is CentOS 4. John
2010-05-16 by Matthias Scheler
On 16 May 2010, at 9:34, john_espiro wrote: > checking for pthread_create in -lpthread... no > checking for pthread_create in -lc_r... no > checking for pthread_create in -lpthreads -lpthread... no > Required libpthread not found. Use --with-libpthread > libpthread is in /usr/lib. Which files exactly? You need "libpthread.so" without version number. > Can anyone help? Try "yum install glibc-headers glibc-devel", please. > My system is CentOS 4. Your system is outdated. Kind regards -- Matthias Scheler http://zhadum.org.uk/
2010-05-16 by john_espiro
Thanks for the quick reply... :) > > Which files exactly? You need "libpthread.so" without version number. locate libpthread.so gives me: /usr/lib/libpthread.so /lib/libpthread.so.0 /lib/tls/libpthread.so.0 /lib/tls/i686/nosegneg/libpthread.so.0 /lib/i686/libpthread.so.0 > Try "yum install glibc-headers glibc-devel", please. The following two packages are installed: glibc-headers-2.3.4-2.36 glibc-devel-2.3.4-2.36 config.log shows me: configure:6455: result: no configure:6460: checking for pthread_create in -lpthreads -lpthread configure:6495: gcc -o conftest -g -O2 -Wall -Iyes/include -I/usr/lib/include -Iyes/include -DUSE_GEOIP -Lyes/lib -Wl,--rpath=yes/lib -L/usr/lib/lib -Wl,--rpath=/usr/lib/lib -Lyes/lib -Wl,--rpath=yes/lib conftest.c -lpthreads -lpthread -lGeoIP >&5 /usr/bin/ld: cannot find -lpthreads collect2: ld returned 1 exit status configure:6502: $? = 1
2010-05-16 by Johann E. Klasek
On Sun, May 16, 2010 at 10:47:32AM -0000, john_espiro wrote: > > Thanks for the quick reply... :) > > > > > Which files exactly? You need "libpthread.so" without version number. > > locate libpthread.so gives me: > > /usr/lib/libpthread.so > > /lib/libpthread.so.0 > /lib/tls/libpthread.so.0 > /lib/tls/i686/nosegneg/libpthread.so.0 > /lib/i686/libpthread.so.0 > > > > > Try "yum install glibc-headers glibc-devel", please. > > The following two packages are installed: > > glibc-headers-2.3.4-2.36 > glibc-devel-2.3.4-2.36 > > > config.log shows me: > > configure:6455: result: no > configure:6460: checking for pthread_create in -lpthreads -lpthread > configure:6495: gcc -o conftest -g -O2 -Wall -Iyes/include -I/usr/lib/include -Iyes/include -DUSE_GEOIP -Lyes/lib -Wl,--rpath=yes/lib -L/usr/lib/lib -Wl,--rpath=/usr/lib/lib -Lyes/lib -Wl,--rpath=yes/lib conftest.c -lpthreads -lpthread -lGeoIP >&5 > /usr/bin/ld: cannot find -lpthreads > collect2: ld returned 1 exit status > configure:6502: $? = 1 Too many "yes" appearing here where a path value is probably expected ... Instead of /usr/lib "/usr/lib/lib" is taken as ld argument ... Similar /usr/lib/include ... some --with... argument to configure should take a "/usr" instead of "/usr/lib" ... Johann E. K.
2010-05-17 by john_espiro
--- In milter-greylist@yahoogroups.com, "Johann E. Klasek" > Too many "yes" appearing here where a path value is probably expected ... > > Instead of /usr/lib "/usr/lib/lib" is taken as ld argument ... > Similar /usr/lib/include ... some --with... argument to configure should > take a "/usr" instead of "/usr/lib" ... > > Hi Johann - I changed my configure line to what you suggested and I get the following: configure:6455: result: no configure:6460: checking for pthread_create in -lpthreads -lpthread configure:6495: gcc -o conftest -g -O2 -Wall -Iyes/include -I/usr/include -Iyes/include -DUSE_GEOIP -Lyes/lib -Wl,--rpath=yes/lib -L/usr/lib -Wl,--rpath=/usr/lib -Lyes/lib -Wl,--rpath=yes/lib conftest.c -lpthreads -lpthread -lGeoIP >&5 /usr/bin/ld: cannot find -lpthreads collect2: ld returned 1 exit status configure:6502: $? = 1
2010-05-17 by Johann E. Klasek
On Mon, May 17, 2010 at 10:14:38AM -0000, john_espiro wrote: > > --- In milter-greylist@yahoogroups.com, "Johann E. Klasek" > > Too many "yes" appearing here where a path value is probably expected ... > > > > Instead of /usr/lib "/usr/lib/lib" is taken as ld argument ... > > Similar /usr/lib/include ... some --with... argument to configure should > > take a "/usr" instead of "/usr/lib" ... > > I changed my configure line to what you suggested and I get the following: > > configure:6455: result: no > configure:6460: checking for pthread_create in -lpthreads -lpthread > configure:6495: gcc -o conftest -g -O2 -Wall -Iyes/include -I/usr/include -Iyes/include -DUSE_GEOIP -Lyes/lib -Wl,--rpath=yes/lib -L/usr/lib -Wl,--rpath=/usr/lib -Lyes/lib -Wl,--rpath=yes/lib conftest.c -lpthreads -lpthread -lGeoIP >&5 > /usr/bin/ld: cannot find -lpthreads > collect2: ld returned 1 exit status > configure:6502: $? = 1 I tried it at a similar environment and following can be seen: If you give the configure option "--with-libGeoIP" *without* a real path via an equate, configure asumes a "yes" which is used in every compile config test. This currupts every configure test since on, because "-lGeoIP" is attached but not found. "configure" thinks -pthread is missing but in real libGeoIP is the cause for the failure of this compile test. The autoconf setup and thus configure does not search for the location or verify the existence of a library given by "--with-....". I don't know this could be solved better in autoconf, maybe Manu does. ;) Try a configure without --with-libGeoIP or give a "--with-libGeoIP=/my/path/to/libGeoIP" ... (e.g. --with-libGeoIP=/usr/local, "/lib" or "/include" is added automatically). Johann E. K.