Bug 161958 - avoid using LD_LIBRARY_PATH
avoid using LD_LIBRARY_PATH
Product: Fedora
Classification: Fedora
Component: firefox (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Christopher Aillon
Depends On:
  Show dependency treegraph
Reported: 2005-06-28 14:55 EDT by dann
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-08-30 03:14:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description dann 2005-06-28 14:55:56 EDT
Description of problem:
The firefox script sets the LD_LIBRARY_PATH variable. 
Because of this when firefox starts up the dynamic linker has to look in many
more places for each dynamic library, so it will generate a lot of extra 
"open" system calls, which slows down the startup time.

To test this just strace firefox-bin and grep for "open"

Currently LD_LIBRARY_PATH is needed because 
cannot otherwise find libmozjs.so and libxpcom.so
(see ldd /usr/lib/firefox-1.0.4/firefox-bin)

Maybe adding some rpath flags when building firefox can solve the above problem. 
Would that be enought to get rid of LD_LIBRARY_PATH? 

Version-Release number of selected component (if applicable):
Comment 1 Bill Crawford 2005-08-16 16:10:06 EDT
This is also preventing prelinking.
Comment 2 dann 2005-08-16 17:12:21 EDT
This also prevents eclipse from eliminating LD_LIBRARY_PATH
Comment 3 Nitin Dahyabhai 2005-08-18 18:02:40 EDT
What about the gre.conf?
Comment 4 dann 2005-08-24 15:16:06 EDT
(In reply to comment #3)
> What about the gre.conf?

AFAIK it does not have an influence. 
The issue is that 'ldd /usr/lib/mozilla-1.7.10/mozilla-bin'
shows that libmozjs.so is not found, that is the reason LD_LIBRARY_PATH needs to
be set when running /usr/lib/mozilla-1.7.10/mozilla-bin
Comment 5 dann 2006-04-30 14:11:11 EDT
Another point: because of this the firefox binary cannot be prelinked. 


The fix is simple, just add -rpath with the libmozjs.so directory to the link
line for firefox-bin...

Note You need to log in before you can comment on or make changes to this bug.