Bug 161958 - avoid using LD_LIBRARY_PATH
Summary: avoid using LD_LIBRARY_PATH
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Christopher Aillon
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-06-28 18:55 UTC by dann
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: 1.5.0.6-9
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-08-30 07:14:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description dann 2005-06-28 18:55:56 UTC
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 
/usr/lib/firefox-1.0.4/firefox-bin
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):
firefox-1.0.4-4

Comment 1 Bill Crawford 2005-08-16 20:10:06 UTC
This is also preventing prelinking.

Comment 2 dann 2005-08-16 21:12:21 UTC
This also prevents eclipse from eliminating LD_LIBRARY_PATH

Comment 3 Nitin Dahyabhai 2005-08-18 22:02:40 UTC
What about the gre.conf?

Comment 4 dann 2005-08-24 19:16:06 UTC
(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 18:11:11 UTC
Another point: because of this the firefox binary cannot be prelinked. 
See: 

https://www.redhat.com/archives/fedora-devel-list/2006-April/msg01405.html

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.