Subject: devel/apr build problem on Solaris
To: None <>
From: Neil Hoggarth <>
List: tech-pkg
Date: 03/09/2004 15:34:29
Hi Folks,

I'm using NetBSD pkgsrc on Solaris 9. apr- (the package
for Apache Portable Runtime) does not build for me. I wasn't sure
whether filing a PR was appropriate (given that I'm not using NetBSD)?

A problem occurs during the configure stage, when configuring in the
directory ".../work/httpd-2.0.48/srclib/apr-util". configure fails to
locate Berkeley DB support, despite the fact that I have the db4-4.2.52
package installed.

Looking at the config.log file it appears that the test program built
against the db4 library fails to link with a bunch of unresolved symbols:

configure:14099: checking for db4
configure:14162: gcc -o conftest -O -I/usr/pkg/include/db4 -I/usr/pkg/include -pthreads  -DSOLARIS2=9 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -I/usr/pkg/include  -L/usr/pkg conftest.c   -L/usr/pkg/gcc3/lib/gcc-lib/sparc-sun-solaris2/3.3.2 -Wl,-R/usr/pkg/gcc3/lib/gcc-lib/sparc-sun-solaris2/3.3.2 -L/usr/pkg/gcc3/lib -Wl,-R/usr/pkg/gcc3/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -ldb4 >&5
Undefined                       first referenced
 symbol                             in file
clnt_sperror                        /usr/pkgsrc/devel/apr/work/.buildlink/lib/
xdr_opaque                          /usr/pkgsrc/devel/apr/work/.buildlink/lib/
xdr_u_int                           /usr/pkgsrc/devel/apr/work/.buildlink/lib/
clnt_spcreateerror                  /usr/pkgsrc/devel/apr/work/.buildlink/lib/
xdr_string                          /usr/pkgsrc/devel/apr/work/.buildlink/lib/
xdr_bytes                           /usr/pkgsrc/devel/apr/work/.buildlink/lib/
xdr_free                            /usr/pkgsrc/devel/apr/work/.buildlink/lib/
xdr_array                           /usr/pkgsrc/devel/apr/work/.buildlink/lib/
clnt_create                         /usr/pkgsrc/devel/apr/work/.buildlink/lib/
xdr_double                          /usr/pkgsrc/devel/apr/work/.buildlink/lib/
xdr_int                             /usr/pkgsrc/devel/apr/work/.buildlink/lib/
ld: fatal: Symbol referencing errors. No output written to conftest

If I were hand-building the package I'd probably try putting "-lnsl"
on the and of the link command at this point, but I'm not sure how to
fix this "properly" in a pkgsrc context.

Does anyone have any ideas about how I should proceed?

Neil Hoggarth                                Departmental Computing Manager
<>                   Laboratory of Physiology                  University of Oxford, UK