bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Libtool on FreeBSD with pthreads (with patch)


From: trojan
Subject: Libtool on FreeBSD with pthreads (with patch)
Date: Thu, 24 Jun 2004 10:49:59 +0200 (CEST)

Hello!

I reach some little problem with libtool on FreeBSD when I build
packace which use -pthread flag. For example building gnome-vfs fails
with:

gcc -O2 -march=i386 -mcpu=i686 -s -o .libs/test-vfolder test-vfolder.o  
../../libgnomevfs/.libs/libgnomevfs-2.so /usr/lib/libgconf-2.so -L/usr/lib 
/usr/lib/libbonobo-2.so /usr/lib/libbonobo-activation.so 
/usr/lib/libORBitCosNaming-2.so /usr/lib/libORBit-2.so 
/usr/lib/libpopt.so /usr/lib/libgobject-2.0.so 
/usr/lib/libgmodule-2.0.so /usr/lib/libgthread-2.0.so 
/usr/lib/libglib-2.0.so /usr/lib/libxml2
.so -lz -lm -lssl -lcrypto /usr/lib/libintl.so /usr/lib/libiconv.so
/usr/lib/libgthread-2.0.so: undefined reference to `pthread_attr_destroy'
../../libgnomevfs/.libs/libgnomevfs-2.so: undefined reference to 
`pthread_create'
/usr/lib/libgthread-2.0.so: undefined reference to `pthread_attr_init'
../../libgnomevfs/.libs/libgnomevfs-2.so: undefined reference to 
`pthread_exit'
/usr/lib/libgthread-2.0.so: undefined reference to `pthread_equal'
/usr/lib/libgthread-2.0.so: undefined reference to `pthread_getschedparam'
/usr/lib/libgthread-2.0.so: undefined reference to `pthread_attr_setscope'
/usr/lib/libgthread-2.0.so: undefined reference to `pthread_setschedparam'
/usr/lib/libgthread-2.0.so: undefined reference to 
`pthread_attr_setstacksize'
/usr/lib/libgthread-2.0.so: undefined reference to 
`pthread_attr_setschedparam'
/usr/lib/libgthread-2.0.so: undefined reference to 
`pthread_attr_setdetachstate'
/usr/lib/libgthread-2.0.so: undefined reference to `pthread_join'
/usr/lib/libgthread-2.0.so: undefined reference to 
`pthread_cond_timedwait'
/usr/lib/libgthread-2.0.so: undefined reference to 
`pthread_attr_getschedparam'
collect2: ld returned 1 exit status

That happend because there is no -pthread in dependency_libs i 
libgthread-2.0.la, but libgthread is compiled with -ptread.
I made patch which fix this bug:

diff -Nru5 libtool-1.5.6.orig/ltmain.in libtool-1.5.6/ltmain.in
--- libtool-1.5.6.orig/ltmain.in        2004-04-02 05:46:15 +0200
+++ libtool-1.5.6/ltmain.in     2004-06-24 10:07:48 +0200
@@ -1854,10 +1854,16 @@
          if test "$linkmode,$pass" = "prog,link"; then
            compile_deplibs="$deplib $compile_deplibs"
            finalize_deplibs="$deplib $finalize_deplibs"
          else
            deplibs="$deplib $deplibs"
+           case $host in
+             *-*-freebsd*)
+               test "$linkmode" = lib && newdependency_libs="$deplib $newdepend
+               continue
+               ;;
+           esac
          fi
          continue
          ;;
        -l*)
          if test "$linkmode" != lib && test "$linkmode" != prog; then 

Regards
  Tomasz Trojanowski






reply via email to

[Prev in Thread] Current Thread [Next in Thread]