Server Help

ASSS Questions - undefined reference

Anonymous - Sat Nov 13, 2004 9:53 pm
Post subject: undefined reference
I get these problems when I goto run make.
Code: Show/Hide
[root@S01060007954abe6e src]# make
gcc -std=gnu99 -pipe  -fPIC  -DNODQ -DNOTREAP -DNOSTRINGCHUNK -DNOMPQUEUE -DNOMMAP -o dbtool dbtool.o statcodes.o util.c -L/usr/local/BerkeleyDB.4.3/lib -Wl,-rpath,/usr/local/BerkeleyDB.4.3/lib -ldb-4
/usr/local/BerkeleyDB.4.3/lib/libdb-4.so: undefined reference to `pthread_condattr_setpshared'
/usr/local/BerkeleyDB.4.3/lib/libdb-4.so: undefined reference to `pthread_mutexattr_destroy'
/usr/local/BerkeleyDB.4.3/lib/libdb-4.so: undefined reference to `pthread_mutexattr_setpshared'
/usr/local/BerkeleyDB.4.3/lib/libdb-4.so: undefined reference to `pthread_mutexattr_init'
/usr/local/BerkeleyDB.4.3/lib/libdb-4.so: undefined reference to `pthread_mutex_trylock'
collect2: ld returned 1 exit status
make: *** [dbtool] Error 1
[root@S01060007954abe6e src]#


I am pretty sure I have the directies correct in 'Makefile' . Bad install? Me being a newb? who knows! Does any one know what is wrong or how to fix this?
Zip - Sat Nov 13, 2004 9:56 pm
Post subject:
Ermm the above was me and I mistook the subject element from IPB for the guest name. oopsie.

Anyways, here is the make file that I meant to attach previously.
And also, I forgto to mention Im running Fedora 10.1.
i88gerbils - Sat Nov 13, 2004 11:56 pm
Post subject:
what is the output of ldd /usr/local/BerkeleyDB.4.3/lib/libdb-4.so?

Maybe it isn't linking pthreads correctly. I searched google and found some information...
Anonymous - Sun Nov 14, 2004 6:06 am
Post subject:
I think you need to link pthreads in with your bdb. Add -lpthread somewhere, there's probably a var that stores the names of the libs in the asss Makefile.
Grelminar - Mon Nov 15, 2004 12:29 am
Post subject:
I think BDB is usually built without pthread support, but I guess yours is. Smong is correct, you need to add "-lpthread" somewhere. I would try adding it to the end of the line that starts with "DB_LDFLAGS = ".
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group