Bug 179 - Improve libtool usage.
Improve libtool usage.
Product: unbound
Classification: Unclassified
Component: server
Other NetBSD
: P2 enhancement
Assigned To: unbound team
Depends on:
  Show dependency treegraph
Reported: 2008-05-26 23:29 CEST by Joerg Sonnenberger
Modified: 2008-06-02 12:55 CEST (History)
2 users (show)

See Also:

Fix libtool usage (1.57 KB, patch)
2008-05-26 23:29 CEST, Joerg Sonnenberger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joerg Sonnenberger 2008-05-26 23:29:54 CEST
Created attachment 64 [details]
Fix libtool usage

The attached patch reduces the duplication from libunbound. It will link the programs dynamically, if possible to reduce size. If this is not desired, I can provide a patch to selective build unbound itself with static libunbound. This should also fix build on OpenSuSE.
Comment 1 Klaus Singvogel 2008-05-27 19:35:02 CEST
Applying the suggested patch and compiling with openSUSE 10.3, it still fails with the snippet below.

As mentioned (today) in bugzilla#177: there are no ".o" files in "build/daemon", instead they are named ".lo"

I think this is related to the fact that a older version of libtool is used.

compilation message follows:
(cd .libs && rm -f libunbound.la && ln -s ../libunbound.la libunbound.la)
./libtool --tag=CC --mode=link gcc   -O2 -march=i586 -mtune=i686 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -pthread -L/usr/lib ldns-src/ldns-1.3.0_pre_20080229/*.lo -o unbound build/daemon/acl_list.o build/daemon/daemon.o build/daemon/stats.o build/daemon/unbound.o build/daemon/worker.o libunbound.la -lcrypto 
gcc -O2 -march=i586 -mtune=i686 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -pthread ldns-src/ldns-1.3.0_pre_20080229/.libs/b32_ntop.o ldns-src/ldns-1.3.0_pre_20080229/.libs/b32_pton.o ldns-src/ldns-1.3.0_pre_20080229/.libs/b64_ntop.o ldns-src/ldns-1.3.0_pre_20080229/.libs/b64_pton.o ldns-src/ldns-1.3.0_pre_20080229/.libs/buffer.o ldns-src/ldns-1.3.0_pre_20080229/.libs/dname.o ldns-src/ldns-1.3.0_pre_20080229/.libs/dnssec.o ldns-src/ldns-1.3.0_pre_20080229/.libs/dnssec_sign.o ldns-src/ldns-1.3.0_pre_20080229/.libs/dnssec_verify.o ldns-src/ldns-1.3.0_pre_20080229/.libs/dnssec_zone.o ldns-src/ldns-1.3.0_pre_20080229/.libs/error.o ldns-src/ldns-1.3.0_pre_20080229/.libs/higher.o ldns-src/ldns-1.3.0_pre_20080229/.libs/host2str.o ldns-src/ldns-1.3.0_pre_20080229/.libs/host2wire.o ldns-src/ldns-1.3.0_pre_20080229/.libs/keys.o ldns-src/ldns-1.3.0_pre_20080229/.libs/net.o ldns-src/ldns-1.3.0_pre_20080229/.libs/packet.o ldns-src/ldns-1.3.0_pre_20080229/.libs/parse.o ldns-src/ldns-1.3.0_pre_20080229/.libs/rbtree.o ldns-src/ldns-1.3.0_pre_20080229/.libs/rdata.o ldns-src/ldns-1.3.0_pre_20080229/.libs/resolver.o ldns-src/ldns-1.3.0_pre_20080229/.libs/rr.o ldns-src/ldns-1.3.0_pre_20080229/.libs/rr_functions.o ldns-src/ldns-1.3.0_pre_20080229/.libs/str2host.o ldns-src/ldns-1.3.0_pre_20080229/.libs/strlcpy.o ldns-src/ldns-1.3.0_pre_20080229/.libs/tsig.o ldns-src/ldns-1.3.0_pre_20080229/.libs/update.o ldns-src/ldns-1.3.0_pre_20080229/.libs/util.o ldns-src/ldns-1.3.0_pre_20080229/.libs/wire2host.o ldns-src/ldns-1.3.0_pre_20080229/.libs/zone.o -o .libs/unbound build/daemon/acl_list.o build/daemon/daemon.o build/daemon/stats.o build/daemon/unbound.o build/daemon/worker.o  -L/usr/lib ./.libs/libunbound.so -lcrypto 
gcc: build/daemon/acl_list.o: No such file or directory
gcc: build/daemon/daemon.o: No such file or directory
gcc: build/daemon/stats.o: No such file or directory
gcc: build/daemon/unbound.o: No such file or directory
gcc: build/daemon/worker.o: No such file or directory
make: *** [unbound] Error 1
Comment 2 Wouter Wijngaards 2008-06-02 12:55:07 CEST
Libunbound only exports the libunbound API and not internal symbols, therefore using it to link against unbound and unbound-checkconf does not provide space savings. If it does work, this is likely to be unportable (the platform does not support library export functionality).

The opensuse bug#177 is fixed, --disable-static --disable-rpath works.

If you have any other trouble, or improvements, please let me know; I'll close this because#177 is fixed.

Best regards,