httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bennett, Tony" <Bennett.T...@con-way.com>
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 <Bennett.Tony@con-way.com> wrote:
>> From: Ravindra [mailto:kravindra@gmail.com]
>> Sent: Thursday, December 04, 2008 12:05 PM
>> To: users@httpd.apache.org
>> 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
statically.
>>
>> $ ldd httpd
>>        libm.so.6 => /lib/i686/libm.so.6 (0x40032000)
>>        libexpat.so.0 => /usr/lib/libexpat.so.0 (0x40054000)
>>        libuuid.so.1 => /lib/libuuid.so.1 (0x40074000)
>>        libpthread.so.0 => /lib/i686/libpthread.so.0 (0x40078000)
>>        librt.so.1 => /lib/librt.so.1 (0x400a8000)
>>        libcrypt.so.1 => /lib/libcrypt.so.1 (0x400ba000)
>>        libdl.so.2 => /lib/libdl.so.2 (0x400e7000)
>>        libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
>>        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (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 [mailto:kravindra@gmail.com] 
>Sent: Thursday, December 04, 2008 7:13 PM
>To: users@httpd.apache.org
>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 ?
>
>Thanks,
>Ravindra

No, the expat code is still included with Apache...
...but expat is a separate project at sourceforge:
    http://sourceforge.net/projects/expat/
And expat's homepage is at:
    http://www.libexpat.org/

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 http://apr.apache.org/ )

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 \
                     --with-apr=/usr/local/dms/apr/

The above built both a shared and a static version of APR-UTIL library
(i.e. libaprutil-1.a and libaprutil-1.so), 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).

HTH,
-tony 
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message