"Undefined symbol" warnings in Sun Workshop builds

RESOLVED WONTFIX

Status

defect
RESOLVED WONTFIX
17 years ago
14 years ago

People

(Reporter: roland.mainz, Assigned: nidheesh)

Tracking

(Blocks 1 bug)

Trunk
Sun
Solaris
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

2002-08-18-08-trunk non-debug build created with Sun Workshop 7 FCS on Solaris
2.7/SPARC, I am getting "Undefined symbol" warnings like this:
-- snip --
/opt/SUNWspro/bin/CC -I/usr/openwin/include -mt  -DNDEBUG -DTRIMMED -xO4
-I/usr/local/lib/glib/include -I/usr/local/include -I/usr/o
penwin/include   -G -Qoption ld -z,muldefs -h libgfx_gtk.so -o libgfx_gtk.so 
nsPrintdGTK.o xprintutil.o nsAntiAliasedGlyph.o nsFree
Type.o nsFT2FontCatalog.o nsX11AlphaBlend.o nsXFontAAScaledBitmap.o
nsXFontNormal.o nsDeviceContextGTK.o nsDeviceContextSpecFactoryG
.o nsDeviceContextSpecG.o nsDrawingSurfaceGTK.o nsFontMetricsGTK.o
nsGfxFactoryGTK.o nsGraphicsStateGTK.o nsImageGTK.o nsGCCache.o n
sRenderingContextGTK.o nsScreenGtk.o nsScreenManagerGtk.o nsPrintOptionsGTK.o
nsRegionGTK.o    -xildoff -zlazyload -zcombreloc    -M

../../../../../../../../home/mozilla/src/2002-08-18-08-trunk/mozilla/build/unix/gnu-ld-scripts/components-mapfile
-L../../../dist/b
in -L../../../dist/lib -lgkgfx  -lgtksuperwin -L../../../dist/bin -lxpcom 
-L../../../dist/bin -L/shared/bigtmp2/mozilla/2002-08-18-
08-trunk/objdir_ws7_gtk_nodebug/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl
-lrt  -L../../../dist/bin -lmozjs  -L/usr/local/lib -
L/usr/openwin/lib -R/usr/openwin/lib -lgtk -lgdk -lgmodule -lglib -ldl -lXext
-lX11 -lsocket -lnsl -lm  -L/usr/openwin/lib -R/usr/op
enwin/lib -lXp -lXext -lX11 -lsocket -ldl -lm    
Undefined                       first referenced
 symbol                             in file
NSGetFactory                       
../../../../../../../../home/mozilla/src/2002-08-18-08-trunk/mozilla/build/unix/gnu-ld-scripts/c
omponents-mapfile
NSUnregisterSelf                   
../../../../../../../../home/mozilla/src/2002-08-18-08-trunk/mozilla/build/unix/gnu-ld-scripts/c
omponents-mapfile
NSRegisterSelf                     
../../../../../../../../home/mozilla/src/2002-08-18-08-trunk/mozilla/build/unix/gnu-ld-scripts/c
omponents-mapfile
ld: warning: Symbol referencing errors
chmod +x libgfx_gtk.so
-- snip --

The build still works - but the errors are anoying...
Bug 149152 adds a mapfile for solaris platform that reduces exported functions
from XPCOM components shared libs. The mapfile defines all usual xpcom exported
functions and hence has following expectation in an xpcom component.

		NSGetFactory
		NSGetModule
		NSRegisterSelf
		NSUnregisterSelf

Not all xpcom component seem to define all of the above and hence warning on the
workshop compiler. I am not sure how linux/gnu linker handles this as I expect
the same on linux compliation as well. The basic mapfile is exactly same as
linux/gcc one excpet for syntax changes to use in solaris. To fix this issue one
may need to define mapfile specifically for *all existing components* for
exactly the functions they export.  One other alternative would be to shut the
linker warnings up. Are they really that annoying?
NSGetModule is the recommended entry point for a module.  The others are legacy
for supporting old module methods.  Outside of a random mailnews component, I
don't know of any components in the tree that use the old methods.  GNU ld
doesn't complain about the missing symbols. 
Assignee: seawood → nidheesh
Nidheesh Dubey wrote:
> Are they really that annoying?

Mhhhh, "annoying" may not be the right word.
I was afraid that these messages somehow indicate a more serious issue -
therefore I filed this bug for investigation.
Blocks: buildwarning
I wanted to confirm I'm seeing the same thing on Trusted Solaris 8 SPARC,
Mozilla 1.7 (RELEASE), gcc 3.3.2.  The same symbols are undefined.  I couldn't
get Enigmail to work, so I started looking into some things.  I've also found this:
ldd -r /usr/local/lib/mozilla-1.7/libxpcom.so
  libplds4.so =>   /usr/local/lib/mozilla-1.7//libplds4.so
  libplc4.so =>    /usr/local/lib/mozilla-1.7//libplc4.so
  libnspr4.so =>   /usr/local/lib/mozilla-1.7//libnspr4.so
  ...
  symbol not found: main          (./libxpcom.so)

I'm seeing this on several libraries(libjsj.so, libmozjs.so, libchrome.so, etc).
So, maybe there are some small problems with the build on Solaris 8(SunOS 5.8)?
I don't know if this has anything to do with Enigmail, but I wanted to confirm
your observations.
Product: Browser → Seamonkey
The linker warnings are non-fatal and do not indicate a larger problem.  Marking WONTFIX.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.