RE: Static linking with libexpat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>On Fri, Dec 5, 2008 at 4:13 AM, Bennett, Tony <Bennett.Tony@xxxxxxxxxxx> wrote:
>> From: Ravindra [mailto:kravindra@xxxxxxxxx]
>> Sent: Thursday, December 04, 2008 12:05 PM
>> To: users@xxxxxxxxxxxxxxxx
>> Subject:  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@xxxxxxxxx] 
>Sent: Thursday, December 04, 2008 7:13 PM
>To: users@xxxxxxxxxxxxxxxx
>Subject: Re:  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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux