[R] LD_LIBRARY_PATH is harmfull

Alexander Klimov
Mon, 21 Feb 2005 08:22:17 -0000

Hi.

Consider the following situation: Solaris 8, /usr/local has gcc 2.95,
my home has gcc 3.4.3, my gcc is first on PATH, LD_LIBRARY_PATH is
unset (everything is perfect since I always use -R). In fact, programs
compiled with my gcc do not work if LD_LIBRARY_PATH is set to
something which has /usr/local/lib before home/lib, because it
overrides stored path (-R) and I got

   libgcc_s.so.1 (GCC_3.3) =>       (version not found)

I found setting of LD_LIBRARY_PATH in bin/R (how /usr/local/lib get
into it at all and especially before PREFIX/lib??? -- there was no
LD_LIBRARY_PATH during configure!) and fixed it (although I spent
quite a while editing lib/R/bin/R and wondering an abscence of
any effect :-)

After all the troubles I manage to load an extension, but, frankly, I
think there were too many problems. It would be very nice if R-project
reject the idea of using LD_LIBRARY_PATH because its setting is
considered harmfull and leads to too many problems:
http://www.linuxmafia.com/faq/Admin/ld-lib-path.html

--
Regards,
ASK