Subject: could not determine version of /usr/lib/libpthread.so
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 09/25/2003 14:50:20
pkgsrc/mk/buildlink2/fake-la made
/tmp/pkgsrc/x11/qt3-libs/work.puget/.buildlink/lib/libpthread.la
which contained just:
could not determine version of /usr/lib/libpthread.so
Because the /usr/lib/libpthread.so was not a symlink.
/usr/lib/libpthread.so was a text file that contained:
/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
OUTPUT_FORMAT(elf32-i386)
GROUP ( /lib/libpthread.so.0 /usr/lib/libpthread_nonshared.a )
So I moved it out of the way and created a symlink ... and the pkgsrc code
worked (after a make clean).
It is normal to have .so files containing these GNU ld command language?
Should pkgsrc/mk/buildlink2/fake-la work with these?
(This .so file and glibc was from Slackware.)
I don't know if it is related (but the original .so did say "some
functions are only in the static library") but when building openldap, I
get:
cc -O2 -I/tmp/pkgsrc/databases/openldap/work.puget/.buildlink/include
-Wl,-R/usr/lib -o dtest dtest.o
-L/tmp/pkgsrc/databases/openldap/work.puget/.buildlink/lib
./.libs/liblber.a ../../libraries/liblutil/liblutil.a -lresolv -ldl
/usr/lib/libdb2.a /usr/lib/libpthread.a -lrt
./.libs/liblber.a(sockbuf.o)(.text+0xf8b): In function `sb_debug_read':
: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead
./.libs/liblber.a(sockbuf.o)(.text+0xf82): In function `sb_debug_read':
: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead
/tmp/pkgsrc/databases/openldap/work.puget/.buildlink/lib/libpthread.a(ptw-write.o)(.text+0x25):
In function `write':
: undefined reference to `__syscall_error'
/tmp/pkgsrc/databases/openldap/work.puget/.buildlink/lib/libpthread.a(ptw-write.o)(.text+0x55):
In function `write':
: undefined reference to `__syscall_error'
....
(.text+0xaad): In function `__pthread_reset_main_thread':
: undefined reference to `_h_errno'
/tmp/pkgsrc/databases/openldap/work.puget/.buildlink/lib/libpthread.a(pthread.o)(.text+0xab8):
In function `__pthread_reset_main_thread':
: undefined reference to `_res'
....
/tmp/pkgsrc/databases/openldap/work.puget/.buildlink/lib/libpthread.a(ptw-open.o)(.text+0x55):
In function `open':
: undefined reference to `__syscall_error'
collect2: ld returned 1 exit status
Jeremy C. Reed
http://bsd.reedmedia.net/