libtool
[Top][All Lists]
Advanced

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

How does libtool and LD_LIBRARY_PATH affect the path for shared libs


From: Jorge Medina
Subject: How does libtool and LD_LIBRARY_PATH affect the path for shared libs
Date: Tue, 23 Sep 2008 18:51:36 -0400

Hi, 
   
   I have been trying to build and create a package (rpm) of Apache.
(2.2.8) for a RedHat 5 Enterprise Linux (64-bit); but using my own
version of APR and APR-utils instead of the versions shipped with
Apache.

   I am trying to ship a package the compiled version and that would
install somewhere like:
        <installation directory>
                 |- apr
                 |   |- lib
                 |- apr-util
                 |   |- lib
                 \- apache

    But the installation directory may or may not be different that that
used during compile and install time in the machine where all components
were built.

    I have been trying to tell the Apache process, httpd, to use the
libraries in <installation_directory>/apr/lib and
<installation_directory>/apr-util/lib  using the LD_LIBRARY_PATH
variable, but the process keeps loading existing versions of the
libraries in the target machine under /usr/lib64 (I used the command
'ldd httpd' and 'httpd -V')

    For the apr-util library, the httpd process seems to look first in
the directory where the libraries were installed with "make install".
But for the apr library the httpd process seems to always look in
/usr/lib64.

    So, I was wondering if this is something that can be fixed with
libtool or ldconfig.
    Do I need to run the libtool included in the apr/build-1 directory?
Something like:
        libtool --mode=finish <installation_directory>/apr-util/lib
<installation_directory>/apr/lib  
    in the target machine ?

        Running libtool --config shows:
                # Is shlibpath searched before the hard-coded library
search path?
                shlibpath_overrides_runpath=no

      Does it imply that I can't use LD_LIBARY_PATH to specify the path
to the libraries?
    
        I am confused. I want to distribute binaries -as opposed to
including the source code in the rpm- and be able to run Apache no
matter where the installation directory selected when installing the
package. I am including most required libraries with my package.

        I would appreciate any pointers.

-Jorge Medina
   
   




reply via email to

[Prev in Thread] Current Thread [Next in Thread]