Repository navigation
Closed
Description
Results from building Unbound 1.9.1 tarball on Solaris 11.3 i86pc. Unbound compiles fine on Solaris. It looks like a couple of symbols are missing on the non-GNU systems.
libtool: link: gcc -I. -I/usr/local/include -DNDEBUG -I/usr/local/include -I/usr/local/include -I/usr/local/include -DSRCDIR=. -g2 -O2 -march=native -fPIC -pthread -std=c99 -D_REENTRANT -pthreads -Wl,-R -Wl,/usr/local/lib -o unbound-host .libs/unbound-host.o .libs/keyraw.o .libs/sbuffer.o .libs/wire2str.o .libs/parse.o .libs/parseutil.o .libs/rrdef.o .libs/str2wire.o .libs/explicit_bzero.o -L/usr/local/lib -L. -L.libs /export/home/build/unbound-1.9.1/.libs/libunbound.a -lssl -lsocket -lnsl -ldl -lpthread -lcrypto -lhiredis -pthreads -pthread -R/usr/local/lib
Undefined first referenced
symbol in file
be64toh /export/home/build/unbound-1.9.1/.libs/libunbound.a(cachedb.o)
htobe64 /export/home/build/unbound-1.9.1/.libs/libunbound.a(cachedb.o)
ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status
gmake: *** [unbound-host] Error 1
gmake: *** Waiting for unfinished jobs....
libtool: link: gcc -I. -I/usr/local/include -DNDEBUG -I/usr/local/include -I/usr/local/include -I/usr/local/include -DSRCDIR=. -g2 -O2 -march=native -fPIC -pthread -std=c99 -D_REENTRANT -pthreads -Wl,-R -Wl,/usr/local/lib -o unbound-checkconf .libs/unbound-checkconf.o .libs/worker_cb.o .libs/dns.o .libs/infra.o .libs/rrset.o .libs/dname.o .libs/msgencode.o .libs/as112.o .libs/msgparse.o .libs/msgreply.o .libs/packed_rrset.o .libs/iterator.o .libs/iter_delegpt.o .libs/iter_donotq.o .libs/iter_fwd.o .libs/iter_hints.o .libs/iter_priv.o .libs/iter_resptype.o .libs/iter_scrub.o .libs/iter_utils.o .libs/localzone.o .libs/mesh.o .libs/modstack.o .libs/view.o .libs/outbound_list.o .libs/alloc.o .libs/config_file.o .libs/configlexer.o .libs/configparser.o .libs/fptr_wlist.o .libs/edns.o .libs/locks.o .libs/log.o .libs/mini_event.o .libs/module.o .libs/net_help.o .libs/random.o .libs/rbtree.o .libs/regional.o .libs/rtt.o .libs/dnstree.o .libs/lookup3.o .libs/lruhash.o .libs/slabhash.o .libs/tcp_conn_limit.o .libs/timehist.o .libs/tube.o .libs/winsock_event.o .libs/autotrust.o .libs/val_anchor.o .libs/validator.o .libs/val_kcache.o .libs/val_kentry.o .libs/val_neg.o .libs/val_nsec3.o .libs/val_nsec.o .libs/val_secalgo.o .libs/val_sigcrypt.o .libs/val_utils.o .libs/dns64.o .libs/cachedb.o .libs/redis.o .libs/authzone.o .libs/respip.o .libs/netevent.o .libs/listen_dnsport.o .libs/outside_network.o .libs/ub_event.o .libs/keyraw.o .libs/sbuffer.o .libs/wire2str.o .libs/parse.o .libs/parseutil.o .libs/rrdef.o .libs/str2wire.o .libs/explicit_bzero.o .libs/reallocarray.o .libs/arc4random.o .libs/arc4random_uniform.o .libs/arc4_lock.o -L/usr/local/lib -lssl -lsocket -lnsl -ldl -lpthread -lcrypto -lhiredis -pthreads -pthread -R/usr/local/lib
libtool: link: gcc -I. -I/usr/local/include -DNDEBUG -I/usr/local/include -I/usr/local/include -I/usr/local/include -DSRCDIR=. -g2 -O2 -march=native -fPIC -pthread -std=c99 -D_REENTRANT -pthreads -Wl,-R -Wl,/usr/local/lib -o unbound-control .libs/unbound-control.o .libs/worker_cb.o .libs/dns.o .libs/infra.o .libs/rrset.o .libs/dname.o .libs/msgencode.o .libs/as112.o .libs/msgparse.o .libs/msgreply.o .libs/packed_rrset.o .libs/iterator.o .libs/iter_delegpt.o .libs/iter_donotq.o .libs/iter_fwd.o .libs/iter_hints.o .libs/iter_priv.o .libs/iter_resptype.o .libs/iter_scrub.o .libs/iter_utils.o .libs/localzone.o .libs/mesh.o .libs/modstack.o .libs/view.o .libs/outbound_list.o .libs/alloc.o .libs/config_file.o .libs/configlexer.o .libs/configparser.o .libs/fptr_wlist.o .libs/edns.o .libs/locks.o .libs/log.o .libs/mini_event.o .libs/module.o .libs/net_help.o .libs/random.o .libs/rbtree.o .libs/regional.o .libs/rtt.o .libs/dnstree.o .libs/lookup3.o .libs/lruhash.o .libs/slabhash.o .libs/tcp_conn_limit.o .libs/timehist.o .libs/tube.o .libs/winsock_event.o .libs/autotrust.o .libs/val_anchor.o .libs/validator.o .libs/val_kcache.o .libs/val_kentry.o .libs/val_neg.o .libs/val_nsec3.o .libs/val_nsec.o .libs/val_secalgo.o .libs/val_sigcrypt.o .libs/val_utils.o .libs/dns64.o .libs/cachedb.o .libs/redis.o .libs/authzone.o .libs/respip.o .libs/netevent.o .libs/listen_dnsport.o .libs/outside_network.o .libs/ub_event.o .libs/keyraw.o .libs/sbuffer.o .libs/wire2str.o .libs/parse.o .libs/parseutil.o .libs/rrdef.o .libs/str2wire.o .libs/explicit_bzero.o .libs/reallocarray.o .libs/arc4random.o .libs/arc4random_uniform.o .libs/arc4_lock.o -L/usr/local/lib -lssl -lsocket -lnsl -ldl -lpthread -lcrypto -lhiredis -pthreads -pthread -R/usr/local/lib
libtool: link: gcc -I. -I/usr/local/include -DNDEBUG -I/usr/local/include -I/usr/local/include -I/usr/local/include -DSRCDIR=. -g2 -O2 -march=native -fPIC -pthread -std=c99 -D_REENTRANT -pthreads -Wl,-R -Wl,/usr/local/lib -o unbound .libs/acl_list.o .libs/cachedump.o .libs/daemon.o .libs/shm_main.o .libs/remote.o .libs/stats.o .libs/unbound.o .libs/worker.o .libs/dns.o .libs/infra.o .libs/rrset.o .libs/dname.o .libs/msgencode.o .libs/as112.o .libs/msgparse.o .libs/msgreply.o .libs/packed_rrset.o .libs/iterator.o .libs/iter_delegpt.o .libs/iter_donotq.o .libs/iter_fwd.o .libs/iter_hints.o .libs/iter_priv.o .libs/iter_resptype.o .libs/iter_scrub.o .libs/iter_utils.o .libs/localzone.o .libs/mesh.o .libs/modstack.o .libs/view.o .libs/outbound_list.o .libs/alloc.o .libs/config_file.o .libs/configlexer.o .libs/configparser.o .libs/fptr_wlist.o .libs/edns.o .libs/locks.o .libs/log.o .libs/mini_event.o .libs/module.o .libs/net_help.o .libs/random.o .libs/rbtree.o .libs/regional.o .libs/rtt.o .libs/dnstree.o .libs/lookup3.o .libs/lruhash.o .libs/slabhash.o .libs/tcp_conn_limit.o .libs/timehist.o .libs/tube.o .libs/winsock_event.o .libs/autotrust.o .libs/val_anchor.o .libs/validator.o .libs/val_kcache.o .libs/val_kentry.o .libs/val_neg.o .libs/val_nsec3.o .libs/val_nsec.o .libs/val_secalgo.o .libs/val_sigcrypt.o .libs/val_utils.o .libs/dns64.o .libs/cachedb.o .libs/redis.o .libs/authzone.o .libs/respip.o .libs/netevent.o .libs/listen_dnsport.o .libs/outside_network.o .libs/ub_event.o .libs/keyraw.o .libs/sbuffer.o .libs/wire2str.o .libs/parse.o .libs/parseutil.o .libs/rrdef.o .libs/str2wire.o .libs/explicit_bzero.o .libs/reallocarray.o .libs/arc4random.o .libs/arc4random_uniform.o .libs/arc4_lock.o -L/usr/local/lib -lssl -lsocket -lnsl -ldl -lpthread -lcrypto -lhiredis -pthreads -pthread -R/usr/local/lib
Undefined first referenced
symbol in file
be64toh .libs/cachedb.o
htobe64 .libs/cachedb.o
ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status
gmake: *** [unbound-checkconf] Error 1
Undefined first referenced
symbol in file
be64toh .libs/cachedb.o
htobe64 .libs/cachedb.o
ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status
gmake: *** [unbound-control] Error 1
Undefined first referenced
symbol in file
be64toh .libs/cachedb.o
htobe64 .libs/cachedb.o
ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status
gmake: *** [unbound] Error 1
Failed to build Unbound
Metadata
Metadata
Assignees
Labels
No labels
Activity
noloader commentedon May 4, 2019
Here is what I used in my build scripts: Commit 7840fb169e96. You might find it useful as a starting point. You might also find Is there any “standard” htonl-like function for 64 bits integers useful.
Unbound tested OK on Solaris 11.3 i86pc after the change.
One word of warning... Do not do this:
__BYTE_ORDER__seems to be a Linux thing. Some compilers do not define__BYTE_ORDER__, like Microsoft and IBM XLC on AIX. Just use:or
wcawijngaards commentedon May 6, 2019
I changed your patch to include #ifndef be64toh before it, so that it does not trigger if used on Solaris with corrected header files (if those machines exist). But otherwise your patch was very helpful. Thank you!
Merge remote-tracking branch 'nlnet/master'