bug-libtool
[Top][All Lists]
Advanced

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

Convenience libraries fail to be linked on Darwin


From: Ian Lister
Subject: Convenience libraries fail to be linked on Darwin
Date: Mon, 14 Jan 2002 11:21:42 +1000 (EST)

Using libtool 1.4.2 and Darwin 5.2 (and earlier), when trying to link a
convenience library into another library, libtool gives the name of the
convenience library to the linker twice, resulting in a link failure e.g:

/bin/sh ../../libtool --mode=link /usr/bin/cc  -Wall -O2 -g -pipe   -o
libexample.la -rpath /usr/local/lib -lssl -lcrypto -version-info 4:0:0
foo.lo bar.lo ../replace/libreplace.la -lc  -lm

causes libtool to try:

rm -fr .libs/libexample.la .libs/libexample.* .libs/libexample.*
/usr/bin/cc -dynamiclib -flat_namespace -undefined suppress -o
.libs/libexample.4.0.0.dylib foo.lo bar.lo -all_load
../replace/.libs/libreplace.al -lssl -lcrypto
../replace/.libs/libreplace.al -lc -lm -lc -install_name
/usr/local/lib/libexample.4.dylib -compatibility_version 5
-current_version 5.0

which results in:

ld: multiple definitions of symbol _inet_ntop
../replace/.libs/libreplace.al(inet_ntop.lo) definition of _inet_ntop in
section (__TEXT,__text)
../replace/.libs/libreplace.al(inet_ntop.lo) definition of _inet_ntop in
section (__TEXT,__text)
ld: multiple definitions of symbol _inet_pton
../replace/.libs/libreplace.al(inet_pton.lo) definition of _inet_pton in
section (__TEXT,__text)
../replace/.libs/libreplace.al(inet_pton.lo) definition of _inet_pton in
section (__TEXT,__text)
/usr/bin/libtool: internal link edit command failed
make[2]: *** [libexample.la] Error 1

(note that /usr/bin/libtool is a Darwin tool, not GNU libtool)

Ian Lister




reply via email to

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