You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Daniel Richard G." <sk...@iSKUNK.ORG> on 2013/08/26 00:12:05 UTC

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

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@iSKUNK.ORG
My ASCII-art .sig got a bad case of Times New Roman.

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

Posted by "Daniel Richard G." <sk...@iSKUNK.ORG>.
On Wed, 2013 Aug 28 6:39+0300, Daniel Shahaf wrote:
>
> So that would appear to be a bug in serf's pkg-config file, no?

No, Serf's doing the right thing:

$ grep ^Libs.private: /tmp/serf-build/_install/lib/pkgconfig/serf-1.pc
Libs.private: -lm   /tmp/apr-util-build/_install/lib/libaprutil-1.la     -lexpat -L/nfs/freeport/arch/sunos_x86_64/lib  -lssl -lcrypto             /tmp/apr-build/_install/lib/libapr-1.la -lresolv -luuid -lsendfile -lrt -lsocket -lnsl -lpthread -lm -lz

$ grep ^dep /tmp/serf-build/_install/lib/libserf-1.la
dependency_libs=' -R/nfs/freeport/arch/sunos_x86_64/lib -L/nfs/freeport/arch/sunos_x86_64/lib -L/tmp/apr-util-build/_install/lib /tmp/apr-util-build/_install/lib/libaprutil-1.la /tmp/apr-util-build/_install/lib/libexpat.la /tmp/apr-build/_install/lib/libapr-1.la -lresolv -luuid -lsendfile -lrt -lsocket -lnsl -lpthread -lm -lz -lssl -lcrypto'

> Note that serf's build system was completely changed in 1.3.  (You
> don't mention which version of libserf you use?)

This is libserf 1.2.1, the version pulled in by Subversion's
get-deps.sh script.


--Daniel


-- 
Daniel Richard G. || skunk@iSKUNK.ORG
My ASCII-art .sig got a bad case of Times New Roman.

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

Posted by Daniel Shahaf <da...@elego.de>.
Daniel Richard G. wrote on Sun, Aug 25, 2013 at 18:12:05 -0400:
> 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.

So that would appear to be a bug in serf's pkg-config file, no?

Note that serf's build system was completely changed in 1.3.  (You don't
mention which version of libserf you use?)