libtool
[Top][All Lists]
Advanced

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

Libtool 1.5 on MacOS X


From: Bill Northcott
Subject: Libtool 1.5 on MacOS X
Date: Fri, 30 May 2003 14:34:41 +1000

I have show stopping problems trying to build code with libtool 1.5 on 
MacOS X.
The OS is MacOS X 10.2.6 and the compiler is built from recent gcc3.3 
sources.  The linker is the system ld.

The following are extracts from the build log for the libojc directory of 
our project.  What is shown here is similar to what happens in other 
subdirectories.  The auto tools are the system defaults - autoconf 2.52 
and automake 1.6.1.  The current code (libtool1.5) invokes autoheader 
during the build stage but that does not seem to do anything.
The Makefiles are identical except the name change of the target library 
(libobjc to libswarmobjc)
You can see that the libtool compile instructions are identical, but 
libtool1.5 produces foo.o in the .libs directory while libtool 1.4.3 
produces foo.lo in the Makefile directory.
*************libtool1.4.3***********
/bin/sh ./libtool --mode=compile /usr/local/gcc3.3/bin/gcc -DHAVE_CONFIG_H 
-I. -I/Users/billn/Public/Swarm/swarm/libobjc -I. -I./objc 
-I/Users/billn/Public/Swarm/swarm/libobjc/objc 
-I/Users/billn/Public/Swarm/swarm/libobjc   -DBUILDING_LIBOBJC  -g -O2 
-fgnu-runtime -fno-strict-aliasing -Wall -Wno-import -Wno-protocol 
-Wno-long-long -c -o Protocol.lo `test -f 
'/Users/billn/Public/Swarm/swarm/libobjc/Protocol.m' || echo 
'/Users/billn/Public/Swarm/swarm/libobjc/'`/Users/billn/Public/Swarm/swarm/libobjc/Protocol.m
/usr/local/gcc3.3/bin/gcc -DHAVE_CONFIG_H -I. 
-I/Users/billn/Public/Swarm/swarm/libobjc -I. -I./objc 
-I/Users/billn/Public/Swarm/swarm/libobjc/objc 
-I/Users/billn/Public/Swarm/swarm/libobjc -DBUILDING_LIBOBJC -g -O2 
-fgnu-runtime -fno-strict-aliasing -Wall -Wno-import -Wno-protocol 
-Wno-long-long -c /Users/billn/Public/Swarm/swarm/libobjc/Protocol.m -MT 
Protocol.lo -MD -MP -MF .deps/Protocol.TPlo  -fno-common -DPIC -o 
Protocol.lo
****************** libtool 1.5**********
/bin/sh ./libtool --mode=compile /usr/local/gcc3.3/bin/gcc -DHAVE_CONFIG_H 
-I. -I/Users/billn/Public/Swarm/swarm/libobjc -I. -I./objc 
-I/Users/billn/Public/Swarm/swarm/libobjc/objc 
-I/Users/billn/Public/Swarm/swarm/libobjc   -DBUILDING_LIBOBJC  -g -O2 
-fgnu-runtime -fno-strict-aliasing -Wall -Wno-import -Wno-protocol 
-Wno-long-long -c -o Protocol.lo `test -f 
'/Users/billn/Public/Swarm/swarm/libobjc/Protocol.m' || echo 
'/Users/billn/Public/Swarm/swarm/libobjc/'`/Users/billn/Public/Swarm/swarm/libobjc/Protocol.m
 /usr/local/gcc3.3/bin/gcc -DHAVE_CONFIG_H -I. 
-I/Users/billn/Public/Swarm/swarm/libobjc -I. -I./objc 
-I/Users/billn/Public/Swarm/swarm/libobjc/objc 
-I/Users/billn/Public/Swarm/swarm/libobjc -DBUILDING_LIBOBJC -g -O2 
-fgnu-runtime -fno-strict-aliasing -Wall -Wno-import -Wno-protocol 
-Wno-long-long -c /Users/billn/Public/Swarm/swarm/libobjc/Protocol.m -MT 
Protocol.lo -MD -MP -MF .deps/Protocol.TPlo  -fno-common -DPIC -o 
.libs/Protocol.o
*****************************

The link attempt really goes off the rails.  The libtool instruction is 
identical except for the library name change mentioned above, but libtool 
never tries to build the library.  As you can see there is no error 
message or even warning in the transcript.
*******libtool1.4.3*****************
/bin/sh ./libtool --mode=link /usr/local/gcc3.3/bin/gcc  -g -O2 
-fgnu-runtime -fno-strict-aliasing -Wall -Wno-import -Wno-protocol 
-Wno-long-long   -o libobjc.la  -version-info 0:0:0 -rpath 
/usr/local/swarm2.1/lib  archive.lo class.lo encoding.lo gc.lo hash.lo 
init.lo misc.lo nil_method.lo objects.lo sarray.lo selector.lo sendmsg.lo 
thr.lo NXConstStr.lo Object.lo Protocol.lo linking.lo mframe.lo 
thr-single.lo -lgcc 
mkdir .libs
rm -fr .libs/libobjc.la .libs/libobjc.* .libs/libobjc.*

*** Warning: linker path does not have real file for library -lgcc.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libgcc and none of the candidates passed a file format test
*** using a file magic. Last file checked: 
/usr/lib/gcc/darwin/default/libgcc.a
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.
(cd . && ln -s archive.lo archive.o)
(cd . && ln -s class.lo class.o)
(cd . && ln -s encoding.lo encoding.o)
(cd . && ln -s gc.lo gc.o)
(cd . && ln -s hash.lo hash.o)
(cd . && ln -s init.lo init.o)
(cd . && ln -s misc.lo misc.o)
(cd . && ln -s nil_method.lo nil_method.o)
(cd . && ln -s objects.lo objects.o)
(cd . && ln -s sarray.lo sarray.o)
(cd . && ln -s selector.lo selector.o)
(cd . && ln -s sendmsg.lo sendmsg.o)
(cd . && ln -s thr.lo thr.o)
(cd . && ln -s NXConstStr.lo NXConstStr.o)
(cd . && ln -s Object.lo Object.o)
(cd . && ln -s Protocol.lo Protocol.o)
(cd . && ln -s linking.lo linking.o)
(cd . && ln -s mframe.lo mframe.o)
(cd . && ln -s thr-single.lo thr-single.o)
/usr/local/gcc3.3/bin/gcc -r -keep_private_externs -nostdlib -o 
.libs/libobjc.0.0.0.dylib-master.o  archive.lo class.lo encoding.lo gc.lo 
hash.lo init.lo misc.lo nil_method.lo objects.lo sarray.lo selector.lo 
sendmsg.lo thr.lo NXConstStr.lo Object.lo Protocol.lo linking.lo mframe.lo 
thr-single.lo && /usr/local/gcc3.3/bin/gcc -dynamiclib -flat_namespace 
-undefined suppress -o .libs/libobjc.0.0.0.dylib 
.libs/libobjc.0.0.0.dylib-master.o  -lc -install_name 
/usr/local/swarm2.1/lib/libobjc.0.dylib -compatibility_version 1 
-current_version 1.0
(cd .libs && rm -f libobjc.0.dylib && ln -s libobjc.0.0.0.dylib 
libobjc.0.dylib)
(cd .libs && rm -f libobjc.dylib && ln -s libobjc.0.0.0.dylib 
libobjc.dylib)
creating libobjc.la
(cd .libs && rm -f libobjc.la && ln -s ../libobjc.la libobjc.la)
******************* libtool 1.5******************
/bin/sh ./libtool --mode=link /usr/local/gcc3.3/bin/gcc  -g -O2 
-fgnu-runtime -fno-strict-aliasing -Wall -Wno-import -Wno-protocol 
-Wno-long-long   -o libswarmobjc.la  -version-info 0:0:0 -rpath 
/usr/local/swarm2.1/lib  archive.lo class.lo encoding.lo gc.lo hash.lo 
init.lo misc.lo nil_method.lo objects.lo sarray.lo selector.lo sendmsg.lo 
thr.lo NXConstStr.lo Object.lo Protocol.lo linking.lo mframe.lo 
thr-single.lo -lgcc 
(cd .libs && rm -f libswarmobjc.0.dylib && ln -s libswarmobjc.0.0.0.dylib 
libswarmobjc.0.dylib)
(cd .libs && rm -f libswarmobjc.dylib && ln -s libswarmobjc.0.0.0.dylib 
libswarmobjc.dylib)
creating libswarmobjc.la
(cd .libs && rm -f libswarmobjc.la && ln -s ../libswarmobjc.la 
libswarmobjc.la)
******************************************************

The libtool 1.5 link instruction seems to be incompatable with the compile 
instruction.  The libtool1.4.3 build has a foo.lo object file in the 
makefile directory and a foo.o symlink to it in the same directory.  All 
that ends up in the .libs directory is the .dylib and its symlink aliases. 
  The libtool1.5 build has foo.o object files in the .libs directory.  It 
also has foo.lo in the Makefile directory, but these are just text files 
giving the paths to the PIC and non-PIC (not built) object files.

********Example foo.lo**********
# foo.lo - a libtool object file
# Generated by ltmain.sh - GNU libtool 1.5 (1.1220.2.1 2003/04/14 
22:48:00)
#
# Please DO NOT delete this file!
# It is necessary for linking the library.

# Name of the PIC object.
pic_object='.libs/foo.o'

# Name of the non-PIC object.
non_pic_object=none
*********************************

I have tried putting back the libtool 1.4.3 version of ltmain.sh prior to 
configure but the results are not substantively different.  There are 
still no libraries built.

Bill Northcott




reply via email to

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