As many of you Linux users know, Netscape does not run well with the latest libraries. But there is a possible work around to this problem. With the next few lines I will describe what to do. Look at this as a kind of mini HOWTO. The solution on the next few lines is valid for the versions 3.x and 4.x of Netscape Naviagator and Netscape Communicator.
The libraries who makes the troubles are called
libc.so.x.x.x and libXpm.so.x.x.
In the newer libraries the memory management functions have changed.
Now this functions check whether the freed memory was allocated prior
or not. If not, a bus error occurs. Netscape has three types of
Now the editor emacs should appear. If you don't like emacs you can use any editor you are familiar with. Type the following into your editor and save the file under the name nets.# cd /usr/local/lib
# mkdir netscape
# cd /usr/local/bin
# emacs nets
Leave your editor and type in the following command on your command line:
# ldd /usr/X11/bin/netscape
Now you need the appropriate libraries. Once you got them, place them into the directory# chmod 755 nets
/usr/local/lib/netscape. At least there should be the following two libs:
If you list now the directory of
/usr/local/lib/netscape(ls -l), you should see the following:
Maybe you have differnt dates and/or permissions, but the file size and names should be equal.# ls -l
-rwxr-xr-x 1 root root 48264 Oct 17 21:09 libXpm.so.4.6 -rwxr-xr-x 1 root root 562683 May 19 1995 libc.so.5.0.9 #
# cd /usr/local/lib/netscape # chmod 755 * # ln -s libXpm.so.4.6 libXpm.so.4 # ln -s libXpm.so.4.6 libXpm.so # ln -s libc.so.5.0.9 libc.so.5 # ln -s libc.so.5.0.9 libc.soTo be sure you have made it right, list the directory again and you should get the following:
Date and time values here will of course differ from yours but the rest should look similar.# ls -l lrwxrwxrwx 1 root root 13 Oct 17 21:10 libXpm.so -> libXpm.so.4.6 lrwxrwxrwx 1 root root 13 Oct 17 21:10 libXpm.so.4 -> libXpm.so.4.6 -rwxr-xr-x 1 root root 48264 Oct 17 21:09 libXpm.so.4.6 lrwxrwxrwx 1 root root 13 Sep 27 18:46 libc.so -> libc.so.5.0.9 lrwxrwxrwx 1 root root 13 Sep 27 18:45 libc.so.5 -> libc.so.5.0.9 -rwxr-xr-x 1 root root 562683 May 19 1995 libc.so.5.0.9
We are ready now. Log in as a normal user (the user under which you normally work). Start X and then start Netscape with the command nets. If you start it the first time, it shows you a license agreement. Accept it to get into Netscape. The program should work now. But remember, that this fix only fixes the memory allocation bug and not the other bugs, especially the Java bug. Playing Java applets can cause you whole system freeze!
Create a shell script like the one below and call it nets. Move the script to /usr/local/bin and make a chmod 755 nets. The script then is executeable. You have to be root in order to do this.
# ldd /usr/X11/bin/netscape
Now create a directory called netscape in /usr/local/lib. Get the following libraries to this directory.
If you have done this, make the appropriate links needed by ld. To have an example, look at the following line:
ln -s libICE.so.6.0 libICE.so.6
Well, that's it. Now Netscape should work and never give a Bus error.
If you don't own the machine you are working on and don't have the access rights for root, then you are not able to make the above manipulations. But there is another way to fix this by making an entry to the file ~/.profile in your home directory. Add the following to this file:
alias nets='LD_PRELOAD=~/libXpm.so.4.6:~/libc.so.5.0.9 exec netscape $*'
This assumes, that the two libraries libXpm.so.4.6 and libc.so.5.0.9 are in your home directory and you are using ksh or bash. You can then start netscape with nets.
The real course of this evil is in Netscape. There is a serious bug in this program who makes it impossible to use it with the newer malloc function.
In the newer libraries you can choose between the old function and the new one. Of course only, if you compile the library source your self. For some good reasons, distribution makers compile libc with the new malloc rather than the old one. Red Hat is an example. Doug Ridgway put an rpm compiled with the compatible malloc at Red Hats server under the name * libc-gnumalloc-5.3.12-5.i386.rpm.
If you want to keep your libc as is and only to overwrite the malloc function for Netscape, then there exists a .so of just the malloc code prepared by Steve Dunham called * gnumalloc.so. It can be used with the usual script:
exec /path/to/real/netscape $*
This is a file that contains the two needed libraries libXpm.so.4.6 and libc.so.5.0.9. It also contains the correct paths and symbolic links. Shortly, this is what you need, if you don't want to type all the stuff above yourself. Download this file and unpack it as root in the root directory and everything is done.
* libc-5.0.9.bin.tar.gz (Austria)
* libXpm.3.4f-ELF.tar.gz (Austria)
* libXpm.3.4f-ELF.tar.gz (Switzerland)
* libXpm-4.6.tar.gz (Italy)
If you have any questions or suggestions, please send me an email.
Last updated on 03/23/1997