Bug 177 - Compilation fails under openSUSE
Compilation fails under openSUSE
Status: RESOLVED FIXED
Product: unbound
Classification: Unclassified
Component: server
unspecified
i386 Linux
: P2 normal
Assigned To: unbound team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-26 17:15 CEST by Klaus Singvogel
Modified: 2008-06-02 12:47 CEST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Singvogel 2008-05-26 17:15:37 CEST
System: openSUSE 10.3, i386

Issue is IMHO use of libtool (libtool-1.5.24). When using libtool for compilation the object files are stored in subdirectory <somepath>/.libs/<file>.o  but linking isn't using the additional ".libs" path and fails threrefore: <somepath>/<file>.o

Configure call was:
./configure --prefix=/usr --disable-static --disable-rpath

Here is the compilation log:
make[1]: Leaving directory `/usr/src/packages/BUILD/unbound-1.0.0/ldns-src/ldns-1.3.0_pre_20080229'
./libtool --tag=CC --mode=link gcc   -g -O2 -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 build/iterator/iter_delegpt.o build/iterator/iter_donotq.o build/iterator/iter_fwd.o build/iterator/iter_hints.o build/iterator/iter_resptype.o build/iterator/iter_scrub.o build/iterator/iter_utils.o build/iterator/iterator.o build/services/cache/dns.o build/services/cache/infra.o build/services/cache/rrset.o build/services/listen_dnsport.o build/services/localzone.o build/services/mesh.o build/services/modstack.o build/services/outbound_list.o build/services/outside_network.o build/testcode/checklocks.o build/util/alloc.o build/util/config_file.o build/util/configlexer.o build/util/configparser.o build/util/data/dname.o build/util/data/msgencode.o build/util/data/msgparse.o build/util/data/msgreply.o build/util/data/packed_rrset.o build/util/fptr_wlist.o build/util/locks.o build/util/log.o build/util/mini_event.o build/util/module.o build/util/net_help.o build/util/netevent.o build/util/random.o build/util/rbtree.o build/util/regional.o build/util/rtt.o build/util/storage/lookup3.o build/util/storage/lruhash.o build/util/storage/slabhash.o build/util/timehist.o build/validator/val_anchor.o build/validator/val_kcache.o build/validator/val_kentry.o build/validator/val_nsec.o build/validator/val_nsec3.o build/validator/val_sigcrypt.o build/validator/val_utils.o build/validator/validator.o -lcrypto 
mkdir .libs
gcc -g -O2 -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 unbound build/daemon/acl_list.o build/daemon/daemon.o build/daemon/stats.o build/daemon/unbound.o build/daemon/worker.o build/iterator/iter_delegpt.o build/iterator/iter_donotq.o build/iterator/iter_fwd.o build/iterator/iter_hints.o build/iterator/iter_resptype.o build/iterator/iter_scrub.o build/iterator/iter_utils.o build/iterator/iterator.o build/services/cache/dns.o build/services/cache/infra.o build/services/cache/rrset.o build/services/listen_dnsport.o build/services/localzone.o build/services/mesh.o build/services/modstack.o build/services/outbound_list.o build/services/outside_network.o build/testcode/checklocks.o build/util/alloc.o build/util/config_file.o build/util/configlexer.o build/util/configparser.o build/util/data/dname.o build/util/data/msgencode.o build/util/data/msgparse.o build/util/data/msgreply.o build/util/data/packed_rrset.o build/util/fptr_wlist.o build/util/locks.o build/util/log.o build/util/mini_event.o build/util/module.o build/util/net_help.o build/util/netevent.o build/util/random.o build/util/rbtree.o build/util/regional.o build/util/rtt.o build/util/storage/lookup3.o build/util/storage/lruhash.o build/util/storage/slabhash.o build/util/timehist.o build/validator/val_anchor.o build/validator/val_kcache.o build/validator/val_kentry.o build/validator/val_nsec.o build/validator/val_nsec3.o build/validator/val_sigcrypt.o build/validator/val_utils.o build/validator/validator.o  -L/usr/lib -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
gcc: build/iterator/iter_delegpt.o: No such file or directory
gcc: build/iterator/iter_donotq.o: No such file or directory
gcc: build/iterator/iter_fwd.o: No such file or directory
gcc: build/iterator/iter_hints.o: No such file or directory
gcc: build/iterator/iter_resptype.o: No such file or directory
gcc: build/iterator/iter_scrub.o: No such file or directory
gcc: build/iterator/iter_utils.o: No such file or directory
gcc: build/iterator/iterator.o: No such file or directory
gcc: build/services/cache/dns.o: No such file or directory
gcc: build/services/cache/infra.o: No such file or directory
gcc: build/services/cache/rrset.o: No such file or directory
gcc: build/services/listen_dnsport.o: No such file or directory
gcc: build/services/localzone.o: No such file or directory
gcc: build/services/mesh.o: No such file or directory
gcc: build/services/modstack.o: No such file or directory
gcc: build/services/outbound_list.o: No such file or directory
gcc: build/services/outside_network.o: No such file or directory
gcc: build/testcode/checklocks.o: No such file or directory
Comment 1 Joerg Sonnenberger 2008-05-26 23:30:45 CEST
The patch from ticket 179 should fix this as well.
Comment 2 Klaus Singvogel 2008-05-27 11:08:27 CEST
Sorry, but I worked yesterday to long. As a result I didn't see the obvious solution at all.

The issue is that (older) libtool version is generating object files with appending ".lo" instead of ".o" (maybe a locking mechanism?)

Fix is therefore easy for these versions.
I did it with a small perl inline replacement:
    perl -pi -e 's;(\.c=\.)o;${1}lo;g' Makefile.in

AND have to change the build rule in Makefile.in from:
    $(BUILD)%.o:    $(srcdir)/%.c
to:
    $(BUILD)%.lo:    $(srcdir)/%.c
Comment 3 Wouter Wijngaards 2008-06-02 12:47:24 CEST
Fixed, thanks for the patch.
The fix can be found right now in the svn trunk r1102.

Best regards, Wouter