Cross-compiling spidermonkey for aarch64 fails with baldrapi compile error
Categories
(Core :: JavaScript: WebAssembly, defect, P3)
Tracking
()
People
(Reporter: lth, Assigned: bbouvier)
References
Details
Attachments
(3 files)
Reporter | ||
Comment 1•6 years ago
|
||
Reporter | ||
Comment 2•6 years ago
|
||
Reporter | ||
Comment 3•6 years ago
|
||
Assignee | ||
Comment 4•6 years ago
|
||
Assignee | ||
Comment 5•6 years ago
|
||
Reporter | ||
Comment 6•6 years ago
|
||
Reporter | ||
Comment 7•6 years ago
|
||
Assignee | ||
Comment 8•6 years ago
|
||
Comment 9•6 years ago
|
||
Comment 10•6 years ago
|
||
Comment 11•6 years ago
|
||
Reporter | ||
Comment 12•6 years ago
|
||
Comment 13•6 years ago
|
||
Hit this yesteray, when going for a cross-compile of firefox based on nightly mozilla-central. Did you found out more since this has been reported six months ago?
Comment 14•6 years ago
|
||
(In reply to tt_1 from comment #13)
Hit this yesteray, when going for a cross-compile of firefox based on nightly mozilla-central. Did you found out more since this has been reported six months ago?
No, but we are at least able to cross-compile successfully on a debian9-based system in mozilla automation; I don't know whether lth has been more or less successful since then. That suggests that the problem is with Ubuntu in some way. If you're willing to dig in and provide more details along the lines of comment 2 and comment 11, that would be helpful.
Comment 15•6 years ago
|
||
I'm not on ubuntu and not on any debianish distro either, so could you point out to the debian9-based stuff for me to learn from it?
Reporter | ||
Comment 16•6 years ago
|
||
I don't know whether lth has been more or less successful since then
lth made no further attempts.
Comment 17•6 years ago
|
||
I dug a bit further into this:
download gecko-dev-master.zip from github, it saved me a lof of traffic compared to a hg checkout, then:
cd gecko-dev-master/js/src/
autoconf-2.13
mkdir build_OPT.OBJ && cd build_OPT.OBJ
../configure --target=aarch64-unknown-linux-gnu --disable-jemalloc --enable-readline --with-system-nspr --with-system-zlib --disable-optimize --with-intl-api --with-system-icu --disable-debug --enable-ion --disable-tests
make -j12
and fails with this error:
--- stderr
/usr/include/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-32.h' file not found
/usr/include/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-32.h' file not found, err: true
thread 'main' panicked at 'Unable to generate baldrapi.h bindings: ()', src/libcore/result.rs:1009:5
I'll attach the build.log as soon as I find out where
Is this
a) part of cranelift, and hence --disable-cranelift may be helping?
b) a indication that rust has to be build with wasm target? wasm seems to be 32bit, so might be the source of the wrong include? (wasm32-unknown-unknown)
Comment 18•6 years ago
|
||
full build.log
Comment 19•6 years ago
|
||
--disable-cranelift makes the standalone compile work
Comment 20•6 years ago
|
||
file libmozjs-68a1.so
libmozjs-68a1.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[sha1]=2c5b4115e3ef39eb62b5d7f2db4a7e5623d941e6, with debug_info, not stripped
file js
js: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=76063aeac6f98edfb4cd78c443de8e7c7f2ccc83, with debug_info, not stripped
and stripped:
libmozjs-68a1.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[sha1]=2c5b4115e3ef39eb62b5d7f2db4a7e5623d941e6, stripped
js: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=76063aeac6f98edfb4cd78c443de8e7c7f2ccc83, stripped
seems legit?
Comment 21•6 years ago
|
||
So, after having a bit of a chat with the cranelift-devs it turns out that there is only runtime support for amd64 at the moment. That means it might be possible to compile it on other arches, but there isn't yet any port ready, other than amd64.
For firefox/spidermonkey this means passing --disable-cranelift by default unless the build is meant for amd64, should be sufficent as a temporarilly workaround.
Oh, and there's another bug in the cc crate, which misdetects gcc if it's a crosscompile and the individual symlink to the gcc cross-compiler isn't to be found in /usr/bin/, with debianish name-patterns. /usr/bin/arm-linux-gnueabihf-gcc is what it seeks, at least fedora and gentoo have different CHOST. Setting a symlink is sufficent as a workaround.
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Comment 22•5 years ago
|
||
Lars, is this still an issue, or can we close it?
Reporter | ||
Comment 23•5 years ago
|
||
Let's not worry about it; it works in automation, and I'm no longer on Ubuntu, plus I have an ARM64 dev system :-)
Description
•