Subject: Solaris 9, Firefox and wrong ELF class: ELFClASS32
To: None <tech-pkg@netbsd.org>
From: kilim <kilim@phenix.rootshell.be>
List: tech-pkg
Date: 12/12/2005 15:18:28
Hello,

When trying to compile Firefox on Solaris 9 I get the following error:

ld: fatal: file lock_SunOS.o: wrong ELF class: ELFCLASS32

Please help me compile this, as I really like pkgsrc and want to use
it.

I've included my details bellow, thank you :)


I've got Solaris 9:

uname -a
SunOS murat 5.9 Generic_118558-11 sun4u sparc SUNW,Ultra-5_10

and the latest stable pkgsrc.tar.gz. Also my compiler is:

	 cc: Sun C 5.8 2005/10/13

ie. sunpro, part of the latest release of Studio 11.

the contents of my mk.conf:The content of /usr/pkg/etc/mk.conf is:

.ifdef BSD_PKG_MK	# begin pkgsrc settings

PKG_DBDIR=/var/db/pkg
LOCALBASE=/usr/pkg
FETCH_CMD=/usr/pkg/bin/ftp
PAX=/usr/pkg/bin/pax
SED=/usr/pkg/bin/nbsed

# my variables
ABI=64
CC = cc
CXX = CC
CPP = /usr/ccs/lib/cpp
PKGSRC_COMPILER = sunpro

CFLAGS= -xtarget=ultra -xarch=v9
PKG_OPTIONS.emacs = emacs-xaw3d

.endif			# end pkgsrc settings

	 
The following is the content of my crle  & crle -64:


Configuration file [version 4]: /var/ld/ld.config  
  Default Library Path (ELF):
  /usr/ccs/lib:/usr/ucb/ucblib:/usr/lib:/usr/lib/secure:/usr/lib/krb5:/usr/xpg4/lib:/usr/xfw/lib:/usr/dt/lib:/usr/snadm/lib:/usr/4lib:/usr/pkg/lib:/usr/openwin/lib:/usr/openwin/sfw/lib:/usr/local/lib:/usr/ucblib
  Trusted Directories (ELF): /usr/lib/secure (system default)

Command line:
  crle -c /var/ld/ld.config -l /usr/ccs/lib:/usr/ucb/ucblib:/usr/lib:/usr/lib/secure:/usr/lib/krb5:/usr/xpg4/lib:/usr/xfw/lib:/usr/dt/lib:/usr/snadm/lib:/usr/4lib:/usr/pkg/lib:/usr/openwin/lib:/usr/openwin/sfw/lib:/usr/local/lib:/usr/ucblib


Configuration file [version 4]: /var/ld/64/ld.config  
  Default Library Path (ELF):
    /usr/ccs/lib/sparc9:/usr/ucblib/sparc9:/usr/lib/64:/usr/lib/link_audit/64:/usr/lib/mps/secv1/64:/usr/lib/mps/64:/usr/lib/ST/64:/usr/xpg4/lib/64:/usr/sfw/bin/64:/usr/lib/lwp/64:/usr/lib/secure/64:/usr/openwin/lib/64:/usr/pkg/lib
  Trusted Directories (ELF): /usr/lib/secure/64 (system default)

Command line:
  crle -64 -c /var/ld/64/ld.config -l
  /usr/ccs/lib/sparc9:/usr/ucblib/sparc9:/usr/lib/64:/usr/lib/link_audit/64:/usr/lib/mps/secv1/64:/usr/lib/mps/64:/usr/lib/ST/64:/usr/xpg4/lib/64:/usr/sfw/bin/64:/usr/lib/lwp/64:/usr/lib/secure/64:/usr/openwin/lib/64:/usr/pkg/lib




And this is the part where the compilation of Firefox spews:

cc -I/usr/pkg/include -DGLX_GLXEXT_LEGACY -I/usr/pkg/include/freetype2
-I/usr/include -I/usr/openwin/include -O -I/usr/pkg/include
-DGLX_GLXEXT_LEGACY -I/usr/pkg/include/freetype2 -I/usr/include
-xstrconst -xbuiltin=%all -pthread -mt -DNDEBUG -DTRIMMED -xO4 -G
-Wl,-z -Wl,muldefs -o libmozjs.so jsapi.o jsarena.o jsarray.o jsatom.o
jsbool.o jscntxt.o jsdate.o jsdbgapi.o jsdhash.o jsdtoa.o jsemit.o
jsexn.o jsfun.o jsgc.o jshash.o jsinterp.o jslock.o jslog2.o jslong.o
jsmath.o jsnum.o jsobj.o jsopcode.o jsparse.o jsprf.o jsregexp.o
jsscan.o jsscope.o jsscript.o jsstr.o jsutil.o jsxdrapi.o prmjtime.o
lock_SunOS.o -xildoff -zlazyload -zcombreloc
-Wl,-R/usr/pkg/lib/firefox -L/usr/pkg/lib -Wl,-R/usr/pkg/lib
-L/usr/lib -Wl,-R/usr/lib -L/usr/openwin/lib -Wl,-R/usr/openwin/lib
-lm -lposix4 -ldl -lnsl -lsocket
-L/usr/pkgsrc/www/firefox/work/mozilla/dist/lib -lplds4 -lplc4 -lnspr4
-L/usr/pkg/lib -L/usr/lib -L/usr/openwin/lib -lpthread -ldl -lrt
-lsocket -ldl -lm -lintl -liconv


ld: fatal: file lock_SunOS.o: wrong ELF class: ELFCLASS32
ld: fatal: File processing errors. No output written to libmozjs.so
make[3]: *** [libmozjs.so] Error 1
make[3]: Leaving directory `/usr/pkgsrc/www/firefox/work/mozilla/js/src'
make[2]: *** [libs] Error 2
make[2]: Leaving directory `/usr/pkgsrc/www/firefox/work/mozilla/js'
make[1]: *** [tier_2] Error 2
make[1]: Leaving directory `/usr/pkgsrc/www/firefox/work/mozilla'
gmake: *** [default] Error 2
*** Error code 2

Stop.


Thank you :)