[Date Prev][Date Next] [Chronological] [Thread] [Top]

Can't get 1.1 to link to pthreads



I'm running Caldera OpenLinux 1.2, kernel upgraded to 2.0.35,
with pthreads 5.4.38 (the version included with the
distribution).

I've done "export CPPFLAGS='-D_MIT_POSIX_THREADS'" which
gets ./configure past the pthreads.h check. However, it now
will not successfully *link* to the pthreads library.
I only have /usr/lib/libpthreads.so and /usr/liblibpthreads.so.1.60.4,
with the former a symlink to the latter. Maybe /usr/lib/libpthreads.a
is missing? (Where do I get it?)

Here's a transcript of the final steps of ./configure:
	checking for pthread.h... yes
	checking for sched.h... yes
	checking POSIX thread version... final
	checking for LinuxThreads... no
	checking for pthread_create... no
	checking for pthread_create with -pthread... no
	checking for pthread_create with -pthreads... no
	checking for pthread_create with -thread... no
	checking for pthread_join in -lpthread... no
	checking for pthread_join in -lpthreads... no
	checking for pthread_create in -lpthread... no
	checking for pthread_create in -lc_r... no
	checking for pthread_create in -lpthreads... no
	configure: error: could not link with POSIX Threads

I have also included config.log as an attachment.

Does anyone have any ideas as to how to get past this? 
Admittedly, I don't do threads programming, so I'm clueless on
this point.

Daryl
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:621: checking for a BSD compatible install
configure:674: checking whether build environment is sane
configure:731: checking whether make sets ${MAKE}
configure:770: checking for working aclocal
configure:783: checking for working autoconf
configure:796: checking for working automake
configure:809: checking for working autoheader
configure:822: checking for working makeinfo
configure:838: checking configure arguments
configure:1538: checking host system type
configure:1593: checking for a BSD compatible install
configure:1645: checking for ranlib
configure:1674: checking for gcc
configure:1751: checking whether the C compiler (gcc  ) works
configure:1765: gcc -o conftest  -D_MIT_POSIX_THREADS  conftest.c  1>&5
configure:1785: checking whether the C compiler (gcc  ) is a cross-compiler
configure:1790: checking whether we are using GNU C
configure:1799: gcc -E conftest.c
configure:1814: checking whether gcc accepts -g
configure:1854: checking for ld used by GCC
configure:1911: checking if the linker (/usr/i386-linux/bin/ld) is GNU ld
GNU ld version cygnus-2.8.1 (with BFD linux-2.8.1.0.13)
configure:1927: checking for BSD-compatible nm
configure:1964: checking whether ln -s works
configure:2034: checking for sendmail
configure:2066: checking for vi
configure:2098: checking for finger
configure:2142: checking how to run the C preprocessor
configure:2163: gcc -E -D_MIT_POSIX_THREADS conftest.c >/dev/null 2>conftest.out
configure:2204: checking for AIX
configure:2228: checking for POSIXized ISC
configure:2250: checking for minix/config.h
configure:2260: gcc -E -D_MIT_POSIX_THREADS conftest.c >/dev/null 2>conftest.out
configure:2256: minix/config.h: No such file or directory
configure: failed program was:
#line 2255 "configure"
#include "confdefs.h"
#include <minix/config.h>
configure:2302: checking for gcc option to accept ANSI C
configure:2355: gcc  -c -g -O2 -D_MIT_POSIX_THREADS conftest.c 1>&5
configure:2386: checking for socket
configure:2414: gcc -o conftest -g -O2 -D_MIT_POSIX_THREADS  conftest.c  1>&5
configure:2699: checking for res_search in -lresolv
configure:2718: gcc -o conftest -g -O2 -D_MIT_POSIX_THREADS  conftest.c -lresolv   1>&5
/usr/i386-linux/bin/ld: cannot open -lresolv: No such file or directory
configure: failed program was:
#line 2707 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char res_search();

int main() {
res_search()
; return 0; }
configure:2747: checking for sigset in -lV3
configure:2766: gcc -o conftest -g -O2 -D_MIT_POSIX_THREADS  conftest.c -lV3   1>&5
/usr/i386-linux/bin/ld: cannot open -lV3: No such file or directory
configure: failed program was:
#line 2755 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char sigset();

int main() {
sigset()
; return 0; }
configure:3016: checking for kerberosIV/krb.h
configure:3026: gcc -E -D_MIT_POSIX_THREADS conftest.c >/dev/null 2>conftest.out
configure:3022: kerberosIV/krb.h: No such file or directory
configure: failed program was:
#line 3021 "configure"
#include "confdefs.h"
#include <kerberosIV/krb.h>
configure:3016: checking for kerberosIV/des.h
configure:3026: gcc -E -D_MIT_POSIX_THREADS conftest.c >/dev/null 2>conftest.out
configure:3022: kerberosIV/des.h: No such file or directory
configure: failed program was:
#line 3021 "configure"
#include "confdefs.h"
#include <kerberosIV/des.h>
configure:3110: checking for krb.h
configure:3120: gcc -E -D_MIT_POSIX_THREADS conftest.c >/dev/null 2>conftest.out
configure:3116: krb.h: No such file or directory
configure: failed program was:
#line 3115 "configure"
#include "confdefs.h"
#include <krb.h>
configure:3110: checking for des.h
configure:3120: gcc -E -D_MIT_POSIX_THREADS conftest.c >/dev/null 2>conftest.out
configure:3116: des.h: No such file or directory
configure: failed program was:
#line 3115 "configure"
#include "confdefs.h"
#include <des.h>
configure:3208: checking for pthread.h
configure:3218: gcc -E -D_MIT_POSIX_THREADS conftest.c >/dev/null 2>conftest.out
configure:3208: checking for sched.h
configure:3218: gcc -E -D_MIT_POSIX_THREADS conftest.c >/dev/null 2>conftest.out
configure:3247: checking POSIX thread version
configure:3328: checking for LinuxThreads
configure:3354: checking for pthread_create
configure:3382: gcc -o conftest -g -O2 -D_MIT_POSIX_THREADS  conftest.c  1>&5
/tmp/cca166931.o: In function `main':
/usr/src/ldap/configure:3376: undefined reference to `pthread_create'
configure: failed program was:
#line 3359 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char pthread_create(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pthread_create();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_pthread_create) || defined (__stub___pthread_create)
choke me
#else
pthread_create();
#endif

; return 0; }
configure:3404: checking for pthread_create with -pthread
configure:3421: gcc -o conftest -g -O2 -D_MIT_POSIX_THREADS  conftest.c -pthread  1>&5
gcc: unrecognized option `-pthread'
/tmp/cca167061.o: In function `main':
/usr/src/ldap/configure:3416: undefined reference to `pthread_create'
configure: failed program was:
#line 3412 "configure"
#include "confdefs.h"
char pthread();
int main() {

					pthread_create();
					
; return 0; }
configure:3445: checking for pthread_create with -pthreads
configure:3462: gcc -o conftest -g -O2 -D_MIT_POSIX_THREADS  conftest.c -pthreads  1>&5
gcc: unrecognized option `-pthreads'
/tmp/cca167181.o: In function `main':
/usr/src/ldap/configure:3457: undefined reference to `pthread_create'
configure: failed program was:
#line 3453 "configure"
#include "confdefs.h"
char pthread();
int main() {

					pthread_create();
					
; return 0; }
configure:3486: checking for pthread_create with -thread
configure:3503: gcc -o conftest -g -O2 -D_MIT_POSIX_THREADS  conftest.c -thread  1>&5
gcc: unrecognized option `-thread'
/tmp/cca167301.o: In function `main':
/usr/src/ldap/configure:3498: undefined reference to `pthread_create'
configure: failed program was:
#line 3494 "configure"
#include "confdefs.h"
char pthread();
int main() {

					pthread_create();
					
; return 0; }
configure:3528: checking for pthread_join in -lpthread
configure:3547: gcc -o conftest -g -O2 -D_MIT_POSIX_THREADS  conftest.c -lpthread -lexc  1>&5
/usr/i386-linux/bin/ld: cannot open -lpthread: No such file or directory
configure: failed program was:
#line 3536 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pthread_join();

int main() {
pthread_join()
; return 0; }
configure:3579: checking for pthread_join in -lpthreads
configure:3598: gcc -o conftest -g -O2 -D_MIT_POSIX_THREADS  conftest.c -lpthreads -lmach -lexc -lc_r  1>&5
/usr/i386-linux/bin/ld: cannot open -lpthreads: No such file or directory
configure: failed program was:
#line 3587 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pthread_join();

int main() {
pthread_join()
; return 0; }
configure:3630: checking for pthread_create in -lpthread
configure:3649: gcc -o conftest -g -O2 -D_MIT_POSIX_THREADS  conftest.c -lpthread   1>&5
/usr/i386-linux/bin/ld: cannot open -lpthread: No such file or directory
configure: failed program was:
#line 3638 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pthread_create();

int main() {
pthread_create()
; return 0; }
configure:3677: checking for pthread_create in -lc_r
configure:3696: gcc -o conftest -g -O2 -D_MIT_POSIX_THREADS  conftest.c -lc_r   1>&5
/usr/i386-linux/bin/ld: cannot open -lc_r: No such file or directory
configure: failed program was:
#line 3685 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pthread_create();

int main() {
pthread_create()
; return 0; }
configure:3724: checking for pthread_create in -lpthreads
configure:3743: gcc -o conftest -g -O2 -D_MIT_POSIX_THREADS  conftest.c -lpthreads   1>&5
/usr/i386-linux/bin/ld: cannot open -lpthreads: No such file or directory
configure: failed program was:
#line 3732 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pthread_create();

int main() {
pthread_create()
; return 0; }