RE: How do I tell Apache where to find the APR and APR-utils?

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

 



I really want to create a re-locatable package.

Using 'objdump -p httpd' it shows that the run path RPATH includes
/usr/lib64


RPATH /home/developer/opt/myapp/apr-util:
      /usr/lib64:
      /home/developer/opt/myapp/apr


Is there any way to avoid /usr/lib64 to be included in RPATH? 
Is there any way to configure the linker to not include any run paths in
libraries and executables?
Or, Is there any way to avoid the RPATH to have precedence over
LD_LIBRARY_PATH?


Thanks.

-Jorge

-----Original Message-----
From: Gene LeDuc [mailto:gleduc@xxxxxxxxxxxxx] 
Sent: Wednesday, September 17, 2008 12:54 PM
To: Jorge Medina
Cc: users@xxxxxxxxxxxxxxxx
Subject: RE:  How do I tell Apache where to find the APR
and APR-utils?

Can you create your production layout on your build machine and do it
that 
way?  We do something like this by having a standard layout on our 
production servers so we can build the binaries on our build machine and

then transfer them over to the production boxes.  We use stow to make 
everything as modular as possible.

At 09:27 AM 9/17/2008, Jorge Medina wrote:

>Yes, but the original path to the APR and APR-util is not the same as
in
>the deployment machine.
>
>I specify the paths
>--with-apr=/home/developer/opt/myapp/apr
>--with-apr-util=/home/developer/opt/myapp/apr-util
>
>But when my app gets "deployed" (just the binaries), the paths may
>change to something like:
>
>/opt/myapp/apr
>/opt/myapp/apr-util
>
>
>I thought I could use LD_LIBRARY_PATH to tell the httpd process where
to
>find the APR, but this has not been successful.
>
>LD_LIBRARY_PATH=/opt/myapp/apr:/opt/myapp/apr-util
>export LD_LIBRARY_PATH
>
>When executing
>    /opt/myapp/apache/bin/httpd -V
>The versions of APR and APR-util loaded by httpd do not correspond to
>the versions I compiled against and specified in LD_LIBRARY_PATH.
>
>I get:
>
>Server loaded:  APR 1.2.7, APR-Util 1.2.7
>Compiled using: APR 1.3.3, APR-Util 1.3.4
>
>
>They do not correspond even in the original build machine, where the
>paths remain the same. The APR-util is correct, but not the version of
>the APR.
>
>LD_LIBRARY_PATH=/home/developer/opt/myapp/apr:/home/developer/opt/myapp
/
>apr-util
>export LD_LIBRARY_PATH
>/home/developer/opt/myapp/apache/bin/httpd -V
>
>I get:
>
>Server loaded:  APR 1.2.7, APR-Util 1.3.4
>Compiled using: APR 1.3.3, APR-Util 1.3.4
>
>
>
>
>-----Original Message-----
>From: Gene LeDuc [mailto:gleduc@xxxxxxxxxxxxx]
>Sent: Wednesday, September 17, 2008 12:03 PM
>To: Jorge Medina
>Cc: users@xxxxxxxxxxxxxxxx
>Subject: RE:  How do I tell Apache where to find the APR
>and APR-utils?
>
>Did you specify the path with ./configure?
>
>    --with-apr=PATH         prefix for installed APR or the full path
to
>apr-config
>    --with-apr-util=PATH    prefix for installed APU or the full path
to
>apu-config
>
>
>At 08:09 AM 9/17/2008, Jorge Medina wrote:
> >Hi,
> >
> >I'm still trying to find a solution.
> >Is there any way to link the APR statically?
> >Thanks
> >
> >-Jorge
> >
> >-----Original Message-----
> >From: Jorge Medina [mailto:jmedina@xxxxxxxxxxxx]
> >Sent: Tuesday, September 16, 2008 4:49 PM
> >To: users@xxxxxxxxxxxxxxxx
> >Subject: RE:  How do I tell Apache where to find the APR
> >and APR-utils?
> >
> >
> >I also ran
> ># apachectl -V
> >
> >And I get that other versions of the APR and APR-Util are getting
> >loaded, not the versions I compiled against.
> >
> >LD_LIBRARY_PATH is set to
> >/opt/myapp/apache/lib:/opt/myapp/apr/lib:/opt/myapp/apr-util/lib:
> >
> >Server version: Apache/2.2.8 (Unix)
> >Server built:   Sep 16 2008 11:25:55
> >Server's Module Magic Number: 20051115:11
> >Server loaded:  APR 1.2.7, APR-Util 1.2.7
> >Compiled using: APR 1.3.3, APR-Util 1.3.4
> >
> >Heelp!!
> >
> >Thank you.
> >
> >-Jorge
> >
> >
> >-----Original Message-----
> >From: Jorge Medina [mailto:jmedina@xxxxxxxxxxxx]
> >Sent: Tuesday, September 16, 2008 4:16 PM
> >To: users@xxxxxxxxxxxxxxxx
> >Subject:  How do I tell Apache where to find the APR and
> >APR-utils?
> >
> >Hi,
> >    I am not sure this is the right forum for my question, but here
it
> >is:
> >
> >                 How do I tell Apache where to find the APR and
>APR-utils
> >libraries if the
> >                 libraries are in a different directory than that
used
>in
> >the 'configure' step ?
> >
> >    I am compiling Apache with the options
> >        --prefix=/home/user/opt/myapp/apache
> >        --with-apr=/home/user/opt/myapp/apr
> >        --with-apr-util=/home/user/opt/myapp/apr-util
> >
> >    I am creating a tar file with all my application (Apache, Tomcat
>and
> >couple of webapps) and deploying into a different machine, possibly
in
>a
> >different path, usually /opt/myapp. The layout of my app ends up
being
> >something like:
> >
> >         /opt/myapp
> >                   |-- apache/
> >               |-- tomcat/
> >                   |-- apr/
> >                   \-- apr-util/
> >
> >     When I try to start Apache, I get the error:
> >
> >httpd: Syntax error on line 70 of /opt/myapp/apache/conf/httpd.conf:
> >Cannot load /opt/myapp/apache/modules/mod_authn_dbd.so into server:
> >/opt/myapp/apache/modules/mod_authn_dbd.so: undefined symbol:
> >apr_dbd_get_name
> >
> >     Before starting Apache, I already defined and exported the
> >environment variable:
> >
> >LD_LIBRARY_PATH=/opt/myapp/apr/lib:/opt/myapp/apr-util/lib
> >     But I keep getting the same error.
> >
> >     I noticed that the APR and APR-util have a directory
>/lib/pkgconfig
> >with some files with the extension .pc
> >     I also modified those files to point to the right deployment
> >directory, but same error.
> >
> >     How do I tell Apache where to find the APR and APR-utils
libraries
> >if the
> >     libraries are in a different directory than that used in the
> >'configure' step ?
> >
> >     If this is not the right forum, could anybody suggest where
could
>I
> >get an answer?
> >     Thanks.
> >
> >
> >-Jorge
> >
> >
> >---------------------------------------------------------------------
> >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
> >
> >
> >---------------------------------------------------------------------
> >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
> >
> >
> >---------------------------------------------------------------------
> >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
>
>
>--
>Gene LeDuc, GSEC
>Security Analyst
>San Diego State University
>
>
>---------------------------------------------------------------------
>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


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 


---------------------------------------------------------------------
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