httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jared Rhine <>
Subject Dual expat link failure
Date Fri, 22 Jul 2005 21:39:25 GMT
[Apologies if this is a duplicate; I did not see it make it into the

I'm building a new mod_perl2 instance on a new Solaris 10/x86 box.
I'm using gmake and most of the /usr/ccs/bin tools (ar, ld).

A fresh compile to empty directories fails to link libapreq2-2.06-dev
with the following error:

-- begin --

gcc -g -O2 -o .libs/test_cgi test_cgi.o
/usr/local/apache-inst-01/lib/ -lgdbm -ldb -lexpat -liconv
/usr/local/apache-inst-01/lib/ -lsendfile -lrt -lm -lsocket
-lnsl -lresolv -lpthread /usr/local/apache-inst-01/lib/

ld: fatal: recording name conflict: file
`/usr/local/apache-inst-01/lib/' and file
`/opt/csw/lib/' provide identical dependency names: (possible multiple inclusion of the same file) ld:
fatal: File processing errors. No output written to .libs/test_cgi

-- end --

Like everyone, I hate mysterious link problems because they are
generally "user error".  But I'm not sure what I'm doing wrong, or at
least I'm doing the best job I can at using standard procedures on a
Solaris box.

/opt/csw/lib is a just a set of precompiled packages for Solaris
( which install completely into --prefix /opt/csw.
I have no LD_LIBRARY_PATH or LD_RUN_PATH set and no other environment
variables which point there.

I tried lots of permutations of various tools and such, but the
most simple test case (from the following script) seems to provoke the
same behavior.

The resulting apache works fine; just can't get libapreq2 to compile.

Probably user error, but I'm soliciting advice.  If there's anything
libapreq2 should be doing during the build to avoid this situation,
that'd be great too.

Hopefully I can still do mod_perl1 on this box if I can't get around this.


-- begin --


use strict;
use warnings;

my $verbose = 1;

sub run ($);

$ENV{PATH} = '/usr/local/bin:/opt/csw/gcc3/bin:/opt/csw/bin:/usr/bin:/bin:/usr/ccs/bin';

my $prefix = '/usr/local/apache-inst-01';
my $build = '/var/tmp/apache-inst-01-build';
my $archive = '/var/tmp/pkg-archive';
my $apache_url = '';
my $libapreq_url = '';

my ($apache, $libapreq) = map { m{/([^/]+)\.tar\.gz$} } ($apache_url, $libapreq_url);

run "rm -rf $build $prefix";
run "mkdir -p $build $prefix";
run "cp $archive/$apache.tar.gz $build 2> /dev/null; true";
run "cp $archive/$libapreq.tar.gz $build 2> /dev/null; true";
run "cd $build && test -r $apache.tar.gz || wget $apache_url";
run "cd $build && test -r $libapreq.tar.gz || wget $libapreq_url";
run "cd $build && gtar zxf $apache.tar.gz";
run "cd $build && gtar zxf $libapreq.tar.gz";

run "cd $build/$apache && ./configure --prefix=$prefix --enable-logio --enable-proxy
--enable-modules=all --enable-mods-shared=all";
run "cd $build/$apache && gmake";
run "cd $build/$apache && gmake install";

run "cd $build/$libapreq && perl Makefile.PL --with-apache2-apxs=$prefix/bin/apxs";
run "cd $build/$libapreq && gmake";
run "cd $build/$libapreq && gmake install";


sub run ($) {
    my $cmd = shift;
    print "[$cmd]\n" if $verbose;
    my $rv = system $cmd;
    die "exiting - command failure\n" if $rv;

-- end --

Here's just a couple of snippets from the build with maybe-relevant info:

-- begin --

checking for Expat in /usr... no
checking for Expat in /usr/local... no
checking for Expat in xml/expat-cvs... no
checking for Expat in xml/expat... yes
configuring package in xml/expat now
config.status: creating lib/expat.h
config.status: creating config.h
xml/expat configured properly
  adding "/var/tmp/apache-inst-01-build/httpd-2.0.54/srclib/apr-util/xml/expat/lib/"
  setting APRUTIL_INCLUDES to "-I/var/tmp/apache-inst-01-build/httpd-2.0.54/srclib/apr-util/xml/expat/lib"
  setting APRUTIL_LDFLAGS to "-L/var/tmp/apache-inst-01-build/httpd-2.0.54/srclib/apr-util/xml/expat/lib"
  adding "/var/tmp/apache-inst-01-build/httpd-2.0.54/srclib/apr-util/xml/expat/lib/"
srclib/apr-util configured properly
  adding "-L/var/tmp/apache-inst-01-build/httpd-2.0.54/srclib/apr-util/xml/expat/lib" to LDFLAGS
  adding "-I/var/tmp/apache-inst-01-build/httpd-2.0.54/srclib/apr-util/include" to INCLUDES
  adding "-I/var/tmp/apache-inst-01-build/httpd-2.0.54/srclib/apr-util/xml/expat/lib" to INCLUDES
gcc -shared -Wl,-h -Wl, -o .libs/  .libs/util.o .libs/version.o
.libs/cookie.o .libs/param.o .libs/parser.o .libs/parser_urlencoded.o .libs/parser_header.o
.libs/parser_multipart.o .libs/module.o .libs/module_custom.o .libs/module_cgi.o .libs/error.o
 -R/usr/local/apache-inst-01/lib -R/usr/local/apache-inst-01/lib /usr/local/apache-inst-01/lib/
/usr/local/apache-inst-01/lib/ -lgdbm -ldb /usr/local/apache-inst-01/lib/
-liconv -lsendfile -lrt -lm -lsocket -lnsl -lresolv -lpthread -lc [...from Jared: successfully

-- end --


"Tiger gotta hunt.  Bird gotta fly.
 Man gotta sit and wonder why, why, why.
 Tiger gotta sleep.  Bird gotta land.
 Man gotta tell himself he understand." -- Kurt Vonnegut Jr.

View raw message