httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bennett, Tony" <>
Subject RE: [users@httpd] Static linking with libexpat
Date Fri, 05 Dec 2008 15:43:57 GMT
>On Fri, Dec 5, 2008 at 4:13 AM, Bennett, Tony <> wrote:
>> From: Ravindra []
>> Sent: Thursday, December 04, 2008 12:05 PM
>> To:
>> Subject: [users@httpd] Static linking with libexpat
>> Hi,
>> I used "--disable-shared --with-expat=xml/expat" option while configuring Apache,
but it still seems to be linking dynamically with libexpat. I want it to link with libexpat
>> $ ldd httpd
>> => /lib/i686/ (0x40032000)
>> => /usr/lib/ (0x40054000)
>> => /lib/ (0x40074000)
>> => /lib/i686/ (0x40078000)
>> => /lib/ (0x400a8000)
>> => /lib/ (0x400ba000)
>> => /lib/ (0x400e7000)
>> => /lib/i686/ (0x42000000)
>>        /lib/ => /lib/ (0x40000000)
>> Any suggestions ?
>> Thanks in advance,
>> Ravindra
>> ---------------------------------------------------------------------
>> One possible option is to download and build expat, specifying 
>> "--disable-shared" when you build expat.
>> This will create a libexpat.a that is NOT a shared library.
>> Then feed your installed location to Apache's configure (like you did 
>> with "--with-expat".
>> -tony

>From: Ravindra [] 
>Sent: Thursday, December 04, 2008 7:13 PM
>Subject: Re: [users@httpd] Static linking with libexpat
>Do you mean to say expat code has been removed from Apache 2.2.10, because what I mentioned
used to work for Apache 2.0.59 ?

No, the expat code is still included with Apache...
...but expat is a separate project at sourceforge:
And expat's homepage is at:

My recommendation was based upon my experience with 
installing a standalone version of APR and APR-UTIL,
which although they're included in Apache (i.e. srclib)
they are actually a separate Apache project
(See )

I believe I was having problems configuring APR-UTIL's build
to make a "static" version of libexpat... so, I downloaded and 
installed expat from sourceforge. I configured Expat 
like this (platform=AIX): 
	CC=xlc_r  ./configure --disable-shared --prefix=/usr/local/dms/expat

After building APR, I configured and built APR-UTIL using this:
	CC=xlc_r ./configure --prefix=/usr/local/dms/apr-util \
                     --enable-threads \
                     --with-dbm=sdbm \
                     --without-berkeley-db \
                     --with-expat=/usr/local/dms/expat \

The above built both a shared and a static version of APR-UTIL library
(i.e. libaprutil-1.a and, which contain NO
references to a shared expat.

Another alternative, would be to "modify" Apache's "configure"...
...which is what I did to fource Apache to use a shared version
of the OpenSSL librarys (libcrypto.a and libssl.a).

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message