[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pthreads in libtool'd shared library...
From: |
Chris Bowlby |
Subject: |
Re: pthreads in libtool'd shared library... |
Date: |
Sat, 30 Oct 2004 22:42:51 -0300 |
At 04:09 PM 10/30/2004, Ralf Wildenhues wrote:
Try using -pthread instead of adding -lc_r directly (who adds it?).
If that's not the right answer, then it's because I'm stabbing in the
very dark -- you do not state neither the Libtool version you use nor
any slight detail about the system this happens on, unfortunately.
Not that I know whether I could help you then.
Hi Ralf,
Thanks for the help, but seemed to have no effect, I'm building this on a
FreeBSD 4.10-STABLE box, with libtool version 1.5.8.
I was not adding the -lc_r parameter itself, automake/configure did that
for me during the compile process. So far, each time I compile and try to
execute the command, I get the following error:
./test
/usr/local/test/lib/libtest.so: Undefined symbol "pthread_create"
Doing an nm on libtest.so shows:
00001eb4 A _DYNAMIC
00001f94 A _GLOBAL_OFFSET_TABLE_
00001f88 ? __CTOR_END__
00001f84 ? __CTOR_LIST__
00001f90 ? __DTOR_END__
00001f8c ? __DTOR_LIST__
00001eb0 ? __EH_FRAME_BEGIN__
00001eb0 ? __FRAME_END__
U __assert
00001ffc A __bss_start
w __deregister_frame_info
00000d24 t __do_global_ctors_aux
000008fc t __do_global_dtors_aux
U __error
U __ls__7ostreamPCc
U __ls__7ostreami
w __register_frame_info
U __sjthrow
U __terminate
00001ffc A _edata
00002014 A _end
00000d70 T _fini
000007c0 T _init
U accept
U calloc
U cerr
000009c8 t char_remap__Fl
00000b0c T client_loop__FPv
U close
00001ea4 d completed.4
U cout
U exit
00000960 t fini_dummy
00001ea8 d force_to_data
00001eb0 d force_to_data
00000978 t frame_dummy
U free
00000d24 t gcc2_compiled.
000008fc t gcc2_compiled.
U getsockname
U gettimeofday
000009b0 t init_dummy
00000d58 t init_dummy
00000a00 t init_random__Fv
00001eac d initialized.429
00001ffc b object.11
00001ea0 d p.3
U pthread_create
U pthread_exit
U random
00000a64 t random_salt__FPcT0
00001ea8 d random_seed
U setsockopt
U srandom
00000b40 T thread_spawn
Doing a ldd on the libtest.so file also shows:
/usr/local/test/lib/libtest.so:
libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x28107000)
libpq.so.3 => /usr/local/lib/libpq.so.3 (0x28120000)
libcipher.so.2 => /usr/lib/libcipher.so.2 (0x2813a000)
libstdc++.so.3 => /usr/lib/libstdc++.so.3 (0x2814e000)
libm.so.2 => /usr/lib/libm.so.2 (0x28193000)
libintl.so.6 => /usr/local/lib/libintl.so.6 (0x281ae000)
libssl.so.3 => /usr/local/lib/libssl.so.3 (0x281b7000)
libcrypto.so.3 => /usr/local/lib/libcrypto.so.3 (0x281e5000)
libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x282d2000)
So I can tell right off that the pthread library (in this case it should be:
/usr/lib/libc_r.so.4
It's got to be something I'm missing in the linkage process, the current
Makefile.am looks like:
lib_LTLIBRARIES = libtest.la
libtest_la_SOURCES = test.cxx
libtest_la_LDFLAGS = -module -Wsymbolic -pthread
#libtest_la_LDFLAGS = -version-info $(ABI_CURRENT):$(ABI_REVISION):$(ABI_AGE)
MAINTAINERCLEANFILES=Makefile.in