From: Nikodemus S. <nik...@ra...> - 2006-06-13 18:15:43
|
rif <rif@MIT.EDU> writes: > I'm using SBCL (0.9.13, x86 linux) and I'm observing something that > seems odd to me. I load a foreign library and call a foreign function > that itself calls dlopen. It seems that if I set LD_LIBRARY_PATH to > include the path to the internally dlopen'd library BEFORE I started > sbcl (in emacs with M-x setenv), everything works fine. However, if I > instead wrap the C function setenv and use that to set LD_LIBRARY_PATH > from within SBCL, the internal call to dlopen fails --- it complains > that it can't find the library. Any ideas what would cause this > phenomenon? Right now, the workaround I have is to ensure that the > other library resolves via other system mechanisms (e.g. ldconfig), but > I'm curious as to what's going on. Offhand, I'd guess that the dynamic loader (the Linux one) takes a look at LD_LIBRARY_PATH when the program starts, and remembers it. Just a guess, though. Cheers, -- Nikodemus Schemer: "Buddha is small, clean, and serious." Lispnik: "Buddha is big, has hairy armpits, and laughs." |