Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to upgrade to Firefox 5 on RHEL5, and am getting the following error:

./firefox-bin: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /home/isdtc/tdiakiw/bin/firefox5/firefox/libxul.so)

As the computer is a work machine, I don't have access to update the libraries directly. To try and get around this I downloaded the libstdc++.so.6.0.10 library.

strings libstdc++.so.6.0.10 | grep GLIBCXX shows:

GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_FORCE_NEW
GLIBCXX_DEBUG_MESSAGE_LENGTH

Is there some way of forcing firefox to use this library instead? I have tried adding the directory containing the new library (with a so name) to LD_LIBRARY_PATH and then running, but I'm still getting the same error message

./firefox
+ moz_libdir=/usr/local/lib/firefox-5.0.1
+ found=0
+ progname=./firefox
++ dirname ./firefox
+ curdir=.
++ basename ./firefox
+ progbase=firefox
+ run_moz=./run-mozilla.sh
+ test -x ./run-mozilla.sh
+ dist_bin=.
+ found=1
+ '[' 1 = 0 ']'
+ script_args=
+ debugging=0
+ MOZILLA_BIN=firefox-bin
+ '[' linux = beos ']'
+ pass_arg_count=0
+ '[' 0 -gt 0 ']'
+ '[' 0 = 1 ']'
+ exec ./run-mozilla.sh ./firefox-bin
./firefox-bin: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by xxxxxxxxxxxxx/firefox/libxul.so)
share|improve this question

1 Answer 1

Firefox ships a shell script that is usually place in /usr/bin/firefox and that does some setup and starts the real binary, usually /usr/lib/firefox/firefox-bin. (Obviously these paths will be different since you're installing it in your home directory, though.) In that case, the shell script might be overriding LD_LIBRARY_PATH. Check it and make sure it isn't and try adding your LD_LIBRARY_PATH to it.

I presume you're using the official binaries from mozilla.com. It might be easier to download the source code and compile it (assuming you have the necessary tools installed on your system), because if Firefox doesn't actually doesn't need libstdc++ 6.0.10, but wants it because that's what Mozilla happened to compile it against, you may be able to successfully compile it to use the version installed on your system instead. There are detailed instructions for building Firefox on the Mozilla Developer Center website.

share|improve this answer
    
I would probably be even easier to just upgrade the whole OS from RHEL5 first. ;-) –  Keith Aug 12 '11 at 9:47
    
Unfortunately upgrading is determined by work policies :(. I had a quick look around in the run scripts (firefox & run-mozilla.sh). They are in fact messing with LD_LIBRARY_PATH, but they look to be appending any paths already existing. Echoing out the LD_LIBRARY_PATH value immediately prior to running the binary shows that my manual addition appears in the environment variable. I'm not 100% sure that my understanding of linking/LD_LIBRARY_PATH is entirely correct.. –  Taras Aug 15 '11 at 0:00
    
@Taras: LD_LIBRARY_PATH is searched from left to right, so if it finds a libstdc++ in a directory before the one yours in, it will use that. Edit the shell script such that your directory is listed first, and you should be fine. –  Patches Aug 15 '11 at 0:28
    
Not sure why your response didn't send me a notify via email - maybe it doesn't for new comments? I had a look at the relative positioning of the directory with the new libstdc++.so file, and it appears as the first entry in LD_LIBRARY_PATH (echoed immediately before calling the binary). Maybe it has something to do with the fact that its actually a different so (libxul) that requires libstdc++, and that for some reason points to the older version? –  Taras Aug 30 '11 at 7:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.