Re: Cannot open "./libxpcom.so"

"Kurt J. Lidl" <[email protected]> Sun, 1 Sep 2002 11:53:27 -0400
Newsgroups gmane.os.freebsd.devel.mozilla
Message-ID <[email protected]>
On Sun, Sep 01, 2002 at 03:33:55PM +0200, Mats Dufberg wrote:
> I have installed mozilla from ports, package mozilla-1.0_2,1. After
> installation (and even rebooting) I cannot start mozilla at all. I get the
> following error message
> 
> /usr/libexec/ld-elf.so.1: Cannot open "./libxpcom.so"
> 
> I start mozilla with /usr/X11R6/bin/mozilla -- or rather try to.
> 
> The shard object is there, /usr/X11R6/lib/mozilla/libxpcom.so.
> 
> Have I missed someting?

I don't know about a version compiled from the ports mechanism, but
"classic" mozilla tarballs have a script "mozilla", that runs "mozilla-bin",
the real binary.  The script sets up LD_LIBRARY_PATH and other variables
before it calls mozilla-bin.  One of the things the script does is
examine the way it was invoked, to determine how LD_LIBRARY_PATH
should be set. So, if you install into /usr/local/mozilla,
and then run "/usr/local/mozilla/mozilla", the script will stuff
"/usr/local/mozilla" into LD_LIBRARY_PATH, and that is how it will find
the libraries.

If you sym-link /usr/X11/bin/mozilla to /usr/local/mozilla/mozilla, it
will not work -- the script will put "/usr/X11/bin" into LD_LIBRARY_PATH
and then loading the dynamic libraries will fail.

Creating a script like this in /usr/X11/bin/mozilla will work fine:

-- snip --
#! /bin/sh
exec /usr/local/mozilla/mozilla $*
-- snip --

Good luck.

-Kurt

To Unsubscribe: send mail to [email protected]
with "unsubscribe freebsd-mozilla" in the body of the message