Closed Bug 209010 Opened 21 years ago Closed 21 years ago

failed to initialize shared library

Categories

(Core Graveyard :: Java: OJI, defect)

x86
Linux
defect
Not set
major

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: garym, Assigned: joshua.xia)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030609
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030609

I am willing to entertain my not having followed either config or install
instructions correctly -- this is the first time I've ever tried building
Mozilla from source, but when it loads I get:

LoadPlugin: failed to initialize shared library
/home/opt/j2sdk1.4.1/jre/plugin/i386/ns610/libjavaplugin_oji.so
[/home/opt/j2sdk1.4.1/jre/plugin/i386/ns610/libjavaplugin_oji.so: undefined
symbol: GetGlobalServiceManager__16nsServiceManagerPP17nsIServiceManager]

Reproducible: Always

Steps to Reproduce:
1.build
2.relocated (tar cf - | tar xCf) from mozilla 1.4 plugins to 1.5a
3.start the app




# sh
# Build configuration script
#
# See http://www.mozilla.org/build/unix.html for build instructions.
#
 
# Options for 'configure' (same as command-line options).
ac_add_options --disable-debug
ac_add_options --enable-optimize=-O
ac_add_options --disable-logging
ac_add_options --enable-reorder
ac_add_options --enable-efence
ac_add_options --enable-strip
I saw the same behavior in:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030617
in the build for Linux, glibc 2.2.4 or newer

The problem does not occur in the same build for Linux, glibc 2.2.3 and older.

What I find strange is that I am using glibc 2.3.2-6:
[prompt] $ rpm -q glibc
glibc-2.3.2-6
So I thought I was installing the correct build.  I am using SuSE 8.2 with their
prebuilt kernel.

Here's the output I get when starting the naughty version:
[prompt] $ /usr/local/mozilla-1.4rc2/mozilla
LoadPlugin: failed to initialize shared library
/usr/lib/SunJava2-1.4.1/jre/plugin/i386/ns610/libjavaplugin_oji.so
[/usr/lib/SunJava2-1.4.1/jre/plugin/i386/ns610/libjavaplugin_oji.so: undefined
symbol: GetGlobalServiceManager__16nsServiceManagerPP17nsIServiceManager]

I did a little digging and found the following (nm found no symbols, of course):

In 2.2.4+ build:
[prompt] $ strings libxpcom.so | grep GetGlobalServiceManager
_ZN16nsServiceManager23GetGlobalServiceManagerEPP17nsIServiceManager

In 2.2.3- build:
[prompt] $ strings libxpcom.so | grep GetGlobalServiceManager
GetGlobalServiceManager__16nsServiceManagerPP17nsIServiceManager

The second line is the same as what I found in 1.4rc1.

This looks like a C++ name-mangling issue.  Perhaps the jre's we're using were
compiled with an older version of g++ than what was used on these mozilla
builds.  Does anyone else suspect that this is the problem?
Yes.  That is the problem.  The 1.4rc2 release notes list this problem
explicitly -- the only Sun JRE version built with GCC 3.x is 1.4.2 beta.  So if
you use the Mozilla.org 1.4 builds or compile your own with GCC 3.2 you will
need that beta or the Blackdown Java plugin.

See http://mozilla.org/releases/mozilla1.4rc2/#java item 2.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.