httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject RUNPATH for module dependencies on Unix/Linux
Date Mon, 04 Jul 2011 19:07:49 GMT
Hi everyone,

a couple of modules have additional external dependencies:

mod_deflate: zlib
mod_lua: lua
mod_serf: serf
mod_socache_dc: distcache

At the moment, the compiled modules do not contain any RPATH/RUNPATH
info except when the libraries themselves are installed as libtool
libraries, i.e. have accompanying *.la files.

The original distcache, zlib and lua distributions by default do not
install .la libtool files. It is of course possible, that distros
provide such files.

I'd like to get the RPATH/RUNPATH included in the modules so that one
doesn't have to juggle with LD_LIBRARY_PATH or LoadFile when loading
those modules.

If the libtool .la files are installed for the dependency libs, the
RPATH/RUNPATH automatically gets added by libtool during module linking.
If it is not, we could add "-R ..." when calling libtool.

On Solaris we already add the "-R ..." unconditional via the
"ap_platform_runtime_link_flag" variable. Thsi goes back to at least
2001 and hasn't been used on any other platform since then. On other
Unix/Linux platforms we seem to assume that .la files are present or
users add LD_LIBRARY_PATH or LoadFile.

Since I don't wont to get into the business of writing even longer
dependency checking macros to find out, whether a .la file for a lib
exists or not, I suggest to always add the -R ... flags to the module
LDADD for the modules mentioned above. As a consequence we would also
remove the then no longer needed "ap_platform_runtime_link_flag".

Last remark: of course the "-R ..." will only be added if the libs are
installed in non-default locations, i.e. if --with-LIB=DIR is given.

Any objections?

Regards,

Rainer



Mime
View raw message