Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 161958

Summary: avoid using LD_LIBRARY_PATH
Product: [Fedora] Fedora Reporter: dann
Component: firefoxAssignee: Christopher Aillon <caillon>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.5.0.6-9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-30 07:14:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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...