The following instructions for building SpiderMonkey is not specific to Ubuntu, but same on almost all Unix and Unix-like operating systems.
- Login to Mozilla CVS servers
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot login
- Pull the sources
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -l mozilla/js/src mozilla/js/src/config mozilla/js/src/editline mozilla/js/src/fdlibm
- And start the build
cd mozilla/js/src && make -f Makefile.ref
If your distribution has GCC 4.1, then you might hit on this bug (jscpucfg.c:374: internal compiler error: in dwarf2out_finish, at
dwarf2out.c:14116) during compilation.
You have two ways to fix it:
- Upgrade to GCC 4.1.2
- Or, turn on the optimisation flag while compiling
CFLAGS=-O2 make -f Makefile.ref
Installation is really simple.
sudo mkdir /usr/local/spidermonkeysudo cp Linux_All_DBG.OBJ/{js,jskwgen,jscpucfg,libjs.so} /usr/local/spidermonkeyexport PATH=$PATH:/usr/local/spidermonkey
Once the installation is done, you can invoke the shell by running js.
technorati tags:javascript, mozilla, spidermonkey, ubuntu, linux
Blogged with Flock
RSS Feed
February 7th, 2007 at 2:31 am
Other way to fix it is by disabling the -g flag in the optimiser in config.mk.
I was trying to fix this for the past few days.
How did you find the solution to this problem?
February 7th, 2007 at 8:56 am
It was pretty easy to find by searching usenet groups since it seemed to be a well known problem (like the GCC 4.0 visibility problem).