gemarcano Tux's lil' helper
Joined: 04 Jun 2012 Posts: 100 Location: California
|
Posted: Mon Oct 14, 2013 8:01 pm Post subject: spidermonkey fails to cross-compile - make jscpucfg fails |
|
|
More cross-compilation problems!
Below is a snippit of the build log when the problem happens. I tried, just in case, making sure that this wasn't a parallelism issue by making MAKEOPTS="-j1", but that didn't help.
Code: | ...
invoking /usr/bin/gmake to create js17-config script
rm -f js17-config.tmp
/usr/bin/python2.7 ./config/Preprocessor.py --marker="%" -Dprefix="/usr" -Dexec_prefix="/usr" -Dincludedir="/usr/include" -Dlibdir="/usr/lib" -DMODULE="js-17.0" -DMOZILLA_VERSION="17.0.4esrpre" -DLIBRARY_NAME="mozjs-17.0" -DJS_CONFIG_LIBS="-Wl,-version-script,symverscript -lplds4 -lplc4 -lnspr4 -lpthread -ldl -ldl -lm -lz -ldl" -DJS_CONFIG_MOZ_JS_LIBS="-L/usr/lib -lmozjs-17.0" -DMOZJS_MAJOR_VERSION="17" -DMOZJS_MINOR_VERSION="0" -DMOZJS_PATCH_VERSION="4esrpre" -DMOZJS_ALPHA="" -DNSPR_CFLAGS="-I/usr/include/nspr" -DNSPR_PKGCONF_CHECK="nspr >= 4.9.2" js-config.in > js17-config.tmp \
&& mv js17-config.tmp js17-config && chmod +x js17-config
>>> Source configured.
>>> Compiling source in /usr/armv6zk-hardfloat-linux-gnueabihf/tmp/portage/dev-lang/spidermonkey-17.0.0-r1/work/mozjs17.0.0 ...
make: *** No rule to make target `jscpucfg'. Stop.
|
It seems src_compile in the ebuild has some interesting code for cross-compilation: Code: | src_compile() {
cd "${BUILDDIR}"
+ if tc-is-cross-compiler; then
+ make CFLAGS="" CXXFLAGS="" \
+ CC=$(tc-getBUILD_CC) CXX=$(tc-getBUILD_CXX) \
+ jscpucfg host_jsoplengen host_jskwgen || die
+ make CFLAGS="" CXXFLAGS="" \
+ CC=$(tc-getBUILD_CC) CXX=$(tc-getBUILD_CXX) \
+ -C config nsinstall || die
+ mv {,native-}jscpucfg
+ mv {,native-}host_jskwgen
+ mv {,native-}host_jsoplengen
+ mv config/{,native-}nsinstall
+ sed -e 's@./jscpucfg@./native-jscpucfg@' \
+ -e 's@./host_jskwgen@./native-host_jskwgen@' \
+ -e 's@./host_jsoplengen@./native-host_jsoplengen@' \
+ -i Makefile
+ sed -e 's@/nsinstall@/native-nsinstall@' -i config/config.mk
+ rm config/host_nsinstall.o \
+ config/host_pathsub.o \
+ host_jskwgen.o \
+ host_jsoplengen.o
+ fi
emake || die
} |
This was introduced as a solution for bug 414473. I don't think jscpucfg exists anymore. After tweaking the ebuild slightly to accomodate for the nonexistence of jscpucfg, the cross-compilation goes further, but then crashes with: Code: | make[1]: *** [jsalloc.o] Error 1" |
The output was a pain to parse, so I did a grep for errors, and got the following: Code: | ./dist/include/mozilla/Assertions.h:111:90: error: size of array 'moz_static_assert7' is negative
./dist/include/mozilla/Assertions.h:111:90: error: size of array 'moz_static_assert12' is negative
./dist/include/mozilla/Assertions.h:111:90: error: size of array 'moz_static_assert39' is negative
./dist/include/mozilla/Assertions.h:111:90: error: size of array 'moz_static_assert40' is negative
./gc/Heap.h:751:41: error: size of array 'padding' is too large
./dist/include/mozilla/Assertions.h:111:90: error: size of array 'moz_static_assert41' is negative
./dist/include/mozilla/Assertions.h:111:90: error: size of array 'moz_static_assert48' is negative
./dist/include/mozilla/Assertions.h:111:90: error: size of array 'moz_static_assert74' is negative
./dist/include/mozilla/Assertions.h:111:90: error: size of array 'moz_static_assert76' is negative
./dist/include/mozilla/Assertions.h:111:90: error: size of array 'moz_static_assert83' is negative
./dist/include/mozilla/Assertions.h:111:90: error: size of array 'moz_static_assert101' is negative
make[1]: *** [jsalloc.o] Error 1
make: *** [default] Error 2 |
I'm not sure how to proceed. I've found some mentions of similar issues online (like here), but I don't know if that applies, or what to do regarding this situation. It seems spidermonkey is extremely sensitive to cross-compilation, at least through the use of crossdev. I even applied the patch suggested by the mozilla bug report (which really just adds padding) and I still get the same errors I'm repoting above. Any input would be appreciated! |
|