Bug 646 - Unbound 1.5.2 fails to link on Solaris 10 due to missing librt
Unbound 1.5.2 fails to link on Solaris 10 due to missing librt
Product: unbound
Classification: Unclassified
Component: server
x86_64 other
: P5 major
Assigned To: unbound team
Depends on:
  Show dependency treegraph
Reported: 2015-02-20 15:00 CET by Carsten Strotmann
Modified: 2015-02-20 15:04 CET (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Strotmann 2015-02-20 15:00:54 CET
the linking step on Solaris 10 fails to unresolved references to "nanosleep" and "clock_gettime"

./libtool --tag=CC --mode=link gcc  -R/usr/local/ssl/lib -I.  -I/usr/local/ssl/include -I/usr/sfw/include -g -O2 -std=c99 -D_REENTRANT -pthreads -L/usr/local/ssl/lib -L/usr/sfw/lib -o unbound acl_list.lo cachedump.lo daemon.lo remote.lo stats.lo unbound.lo worker.lo  dns.lo infra.lo rrset.lo dname.lo msgencode.lo msgparse.lo msgreply.lo packed_rrset.lo iterator.lo iter_delegpt.lo iter_donotq.lo iter_fwd.lo iter_hints.lo iter_priv.lo iter_resptype.lo iter_scrub.lo iter_utils.lo localzone.lo mesh.lo modstack.lo outbound_list.lo alloc.lo config_file.lo configlexer.lo configparser.lo fptr_wlist.lo locks.lo log.lo mini_event.lo module.lo net_help.lo random.lo rbtree.lo regional.lo rtt.lo dnstree.lo lookup3.lo lruhash.lo slabhash.lo timehist.lo tube.lo winsock_event.lo autotrust.lo val_anchor.lo validator.lo val_kcache.lo val_kentry.lo val_neg.lo val_nsec3.lo val_nsec.lo val_secalgo.lo val_sigcrypt.lo val_utils.lo dns64.lo    netevent.lo listen_dnsport.lo outside_network.lo keyraw.lo sbuffer.lo wire2str.lo parse.lo parseutil.lo rrdef.lo str2wire.lo arc4random.lo arc4random_uniform.lo explicit_bzero.lo arc4_lock.lo getentropy_solaris.lo   -lssl -lsocket -lnsl  -lcrypto -lmd 
Undefined                       first referenced
 symbol                             in file
nanosleep                           .libs/getentropy_solaris.o
clock_gettime                       .libs/getentropy_solaris.o
ld: fatal: Symbol referencing errors. No output written to unbound
collect2: ld returned 1 exit status
make: *** [unbound] Error 1


"nanosleep" and "clock_getatime" are part of librt, add "-lrt" to the linking call.
Comment 1 Wouter Wijngaards 2015-02-20 15:04:49 CET
Hi Carsten,

Fix in svn trunk, fix in configure script.

Thank you for the report.

Best regards, Wouter