This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: RFA: set LD_LIBRARY_PATH
Andrew Haley wrote:
> The specific use case I'm trying to support with this patch is running
> Java applications that link against libjawt.so. Sun installs this
> library in $JAVA_HOME/lib/<arch>. See:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21741
>
> > Should not the appropriate
> > libraries be installed somewhere where LD_LIBRARY_PATH isn't needed?
>
> We tried that before, see:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20790
>
> When our JAWT implementation was installed in GCC's library prefix it
> was overriding Sun's libjawt.so when compiling JAWT-using applications
> against proprietary VMs.
OK, so we renamed the lib to libgcjawt.so. Why can't libgcjawt.so be
installed in the common place for shared libraries, /usr/lib? Its
name prevents it from colliding with other libraries.
"libgcjawt.so" ought to be binary-compatible with other implementations,
and we'll have to rename it back to libjawt.so in order for that to be
the case (so that the soname's match). It will then need to be installed
in a private directory so that it doesn't conflict with other
implementations.
Expecting users to set LD_LIBRARY_PATH manually to libgcj's private lib
directory when running applications that use libjawt goes against the
"drop in replacement" goal. So, unfortunately, like so many other dirty
hacks, I think we need to do it because its "what Sun does".
Bryce