[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[BUG] Configure script fails to detect serf library due to ignored dependencies

From: Daniel Richard G. <skunk_at_iSKUNK.ORG>
Date: Sun, 25 Aug 2013 18:12:05 -0400

I am building Subversion 1.8.1 on Solaris. The dependent libraries
(APR, APR-util, Serf) are built, specified, and ready to go, and yet
this happens:

configure: serf library configuration via prefix
checking serf.h usability... yes
checking serf.h presence... yes
checking for serf.h... yes
checking for serf_context_create in -lserf-1... no
configure: serf library configuration via pkg-config
checking for serf-2 library... sh: gnome-config: not found
no
checking for serf-1 library... sh: gnome-config: not found
no
checking was serf enabled... no

An appropriate version of serf could not be found, so libsvn_ra_serf
will not be built. If you want to build libsvn_ra_serf, please
install serf 1.2.1 or newer.

configure: error: Serf was explicitly enabled but an appropriate version was not found.

Here is the relevant excerpt from config.log:

configure:5283: checking for serf_context_create in -lserf-1
configure:5308: cc -o conftest -Xa -v -xstrconst -i -mt -xtarget=opteron -xarch=amd64 -xbuiltin -xO5 -D__EXTENSIONS__ -D_REENTRANT -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -I/tmp/apr-build/_install/include/apr-1 -I/tmp/apr-util-build/_install/include/apr-1 -I/nfs/freeport/arch/sunos_x86_64/include -I/nfs/freeport/src/subversion/subversion--1.8.1/apr-util/xml/expat/lib -I/tmp/serf-build/_install/include/serf-1 -L/nfs/freeport/arch/sunos_x86_64/lib -L/tmp/serf-build/_install/lib conftest.c -lserf-1 -L/tmp/apr-util-build/_install/lib -laprutil-1 -L/tmp/apr-build/_install/lib -lapr-1 -lz >&5
"conftest.c", line 33: warning: statement not reached
Undefined first referenced
 symbol in file
bind /tmp/apr-build/_install/lib/libapr-1.a(sockets.o)
sendfilev /tmp/apr-build/_install/lib/libapr-1.a(sendrecv.o)
getservbyname_r /tmp/apr-build/_install/lib/libapr-1.a(sockaddr.o)
getsockname /tmp/apr-build/_install/lib/libapr-1.a(sockaddr.o)
accept /tmp/apr-build/_install/lib/libapr-1.a(sockets.o)
listen /tmp/apr-build/_install/lib/libapr-1.a(sockets.o)
sendto /tmp/apr-build/_install/lib/libapr-1.a(sendrecv.o)
socket /tmp/apr-build/_install/lib/libapr-1.a(sockets.o)
getnameinfo /tmp/apr-build/_install/lib/libapr-1.a(sockaddr.o)
uuid_generate /tmp/apr-build/_install/lib/libapr-1.a(rand.o)
setsockopt /tmp/apr-build/_install/lib/libapr-1.a(sockopt.o)
getsockopt /tmp/apr-build/_install/lib/libapr-1.a(sockets.o)
connect /tmp/apr-build/_install/lib/libapr-1.a(sockets.o)
getaddrinfo /tmp/apr-build/_install/lib/libapr-1.a(sockaddr.o)
hstrerror /tmp/apr-build/_install/lib/libapr-1.a(errorcodes.o)
getpeername /tmp/apr-build/_install/lib/libapr-1.a(sockaddr.o)
recvfrom /tmp/apr-build/_install/lib/libapr-1.a(sendrecv.o)
freeaddrinfo /tmp/apr-build/_install/lib/libapr-1.a(sockaddr.o)
gai_strerror /tmp/apr-build/_install/lib/libapr-1.a(errorcodes.o)
h_errno /tmp/apr-build/_install/lib/libapr-1.a(sockaddr.o)
shutdown /tmp/apr-build/_install/lib/libapr-1.a(sockets.o)
ld: fatal: Symbol referencing errors. No output written to conftest
configure:5308: $? = 1

These symbols are defined in various Solaris support libraries, and if I
configure with LIBS="-luuid -lresolv -lsocket -lnsl -lsendfile", the
link test succeeds and Subversion uses the library.

The problem, however, is that...

    $ grep ^dep /tmp/apr-build/_install/lib/libapr-1.la
    dependency_libs=' -lresolv -luuid -lsendfile -lrt -lsocket -lnsl -lpthread'

    $ grep ^Libs: /tmp/apr-build/_install/lib/pkgconfig/apr-1.pc
    Libs: -L${libdir} -lapr-${APR_MAJOR_VERSION} -lresolv -luuid -lsendfile -lrt -lsocket -lnsl -lpthread

...this dependency information is already contained in the Libtool and
pkg-config metadata for libapr, yet Subversion's configure script is
not using it. Setting LIBS should not be necessary.

This isn't just a Solaris thing, either. On Linux, uuid_generate() also
lives in a separate -luuid library---so I get the same error when
configuring, only LIBS="-luuid" is enough to get past it:

/tmp/apr-build/_install/lib/libapr-1.a(rand.o)(.text+0xc): In function `apr_os_uuid_get':
: undefined reference to `uuid_generate'
collect2: error: ld returned 1 exit status
configure:5308: $? = 1

--Daniel

-- 
Daniel Richard G. || skunk_at_iSKUNK.ORG
My ASCII-art .sig got a bad case of Times New Roman.
Received on 2013-08-26 00:12:37 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.