[Python-Dev] Please give this patch for building bsddb a try

Martin v. Loewis martin@v.loewis.de
19 Jun 2002 22:49:49 +0200

barry@zope.com (Barry A. Warsaw) writes:

> Really?  You know the path for the -R/--rpath flag, so all you need is
> the magic compiler-specific incantation, and distutils already (or
> /should/ already) know that.

Yes, but you don't know whether usage of -R is appropriate. If the
installed library is static, -R won't be needed. If then the target
directory recorded with -R happens to be on an unavailable NFS server
at run-time (on a completely different network), you cannot import the
library module anymore, which would otherwise work perfectly fine.

We had big problems with recorded library directories over the years;
at some point, the administrators decided to take the machine that had
/usr/local/lib/gcc-lib/sparc-sun-solaris2.3/2.5.8 on it offline. They
did not knew that they would thus make vim inoperable, which happened
to be compiled with LD_RUN_PATH pointing to that directory - even
though no library was ever needed from that directory.

> I disagree.  While the sysadmin should probably fiddle with
> /etc/ld.so.conf when he installs BerkeleyDB, it's not documented in
> the Sleepycat docs, so it's entirely possible that they haven't done
> it.  

I'm not asking for the administrator fiddle with ld.so.conf. Instead,
I'm asking the administrator fiddle with Modules/Setup.

> Is there some specific fear you have about compiling in the run-path?

Yes, see above.

> Note I'm not saying setting LD_RUN_PATH is the best approach, but it
> seemed like the most portable.  I couldn't figure out if distutils
> knew what the right compiler-specific switches are (i.e. "-R dir" on
> Solaris cc if memory serves, and "-Xlinker -rpath -Xlinker dir" for
> gcc, and who knows what for other Unix or <gasp> Windows compilers).

LD_LIBRARY_PATH won't work for Windows compilers, either. To my
knowledge, there is nothign equivalent on Windows.