Closed
Bug 1412674
Opened 8 years ago
Closed 8 years ago
32 Bit Cross Compile Build Failing on Linux
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
mozilla57
People
(Reporter: pete, Unassigned)
Details
Attachments
(2 files)
My 32 bit cross compile linux build is failing and not sure why:
~/Desktop/build/opt-vanilla-i686-pc-linux/toolkit/library/rust $ make
make[1]: Entering directory `/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/toolkit/library/rust'
make[1]: Nothing to be done for `pre-export'.
make[1]: Leaving directory `/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/toolkit/library/rust'
make[1]: Entering directory `/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/toolkit/library/rust'
make[1]: Nothing to be done for `export'.
make[1]: Leaving directory `/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/toolkit/library/rust'
force-cargo-library-build
make[1]: Entering directory `/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/toolkit/library/rust'
env RUSTC_BOOTSTRAP=1 RUSTFLAGS=' -C debuginfo=2 ' CARGO_TARGET_DIR=/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/toolkit/library RUSTC=/usr/local/rustc32/rustc MOZ_SRC=/home/petejc/Desktop/build/mozilla-beta MOZ_DIST=/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist LIBCLANG_PATH="/usr/local/lib" CLANG_PATH="/usr/local/bin/clang" PKG_CONFIG_ALLOW_CROSS=1 RUST_BACKTRACE=full MOZ_TOPOBJDIR=/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux MOZ_CARGO_WRAP_LDFLAGS="-lpthread -L/usr/local/lib -Wl,-z,noexecstack -Wl,-z,text -Wl,-z,relro -Wl,--build-id -Wl,-rpath-link,/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/bin -Wl,-rpath-link,/usr/local/lib" MOZ_CARGO_WRAP_LD=" /usr/bin/ccache /usr/local/bin/gcc -m32 -march=pentium-m -std=gnu99" CARGO_TARGET_I686_UNKNOWN_LINUX_GNU_LINKER=/home/petejc/Desktop/build/mozilla-beta/build/cargo-linker /usr/local/rustc32/cargo rustc --release --frozen --manifest-path /home/petejc/Desktop/build/mozilla-beta/toolkit/library/rust/Cargo.toml --lib --target=i686-unknown-linux-gnu --features "servo bindgen cubeb_pulse_rust simd-accel no-static-ideograph-encoder-tables" -- -C lto
Compiling style v0.0.1 (file:///home/petejc/Desktop/build/mozilla-beta/servo/components/style)
error: failed to run custom build command for `style v0.0.1 (file:///home/petejc/Desktop/build/mozilla-beta/servo/components/style)`
process didn't exit successfully: `/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/toolkit/library/release/build/style-855c5a79d1475243/build-script-build` (exit code: 101)
| Reporter | ||
Comment 1•8 years ago
|
||
| Reporter | ||
Comment 2•8 years ago
|
||
I compared my build env to one of the Linux 32 bit cross compile builds and everything looks good.
What OS are you guys successfully compiling Linux 32 bit on? I am using Fedora 20x64.
More importantly what is the release reference platforms for Linux FF57?
| Reporter | ||
Comment 3•8 years ago
|
||
64 bit compiles with no problem.
| Reporter | ||
Updated•8 years ago
|
Assignee: mozilla → nobody
Component: Distributions → Build Config
Product: Firefox → Core
Target Milestone: --- → mozilla57
Comment 4•8 years ago
|
||
Relevant output when failing to build some Rust code:
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/toolkit/library/i686-unknown-linux-gnu/release/build/style-3a7fa15cc95870f0/out/gecko/atom_macro.rs is not changed, skip
cargo:rerun-if-changed=/home/petejc/Desktop/build/mozilla-beta/servo/components/style/gecko/pseudo_element_definition.mako.rs
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/toolkit/library/i686-unknown-linux-gnu/release/build/style-3a7fa15cc95870f0/out/gecko/pseudo_element_definition.rs is not changed, skip
error: invalid value 'c++14' in '-std=c++14', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:190:15: error: unknown type name 'char16_t', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:194:1: error: C++ requires a type specifier for all declarations, err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:194:22: error: use of undeclared identifier 'char16_t', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:195:1: error: C++ requires a type specifier for all declarations, err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:195:15: error: use of undeclared identifier 'char16_t', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:195:30: error: use of undeclared identifier 'char16_t', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:196:1: error: C++ requires a type specifier for all declarations, err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:196:22: error: use of undeclared identifier 'u', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:197:1: error: C++ requires a type specifier for all declarations, err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:197:22: error: use of undeclared identifier 'u', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:49:10: error: unknown type name 'constexpr', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:49:21: error: expected ';' at end of declaration list, err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:50:11: error: unknown type name 'T', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:101:36: error: use of undeclared identifier 'char16_t', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:182:35: warning: variadic templates are a C++11 extension [-Wc++11-extensions], err: false
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:267:27: warning: rvalue references are a C++11 extension [-Wc++11-extensions], err: false
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:442:25: error: use of undeclared identifier 'char16_t', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:579:24: warning: default template arguments for a function template are a C++11 extension [-Wc++11-extensions], err: false
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:620:24: warning: default template arguments for a function template are a C++11 extension [-Wc++11-extensions], err: false
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:894:25: warning: rvalue references are a C++11 extension [-Wc++11-extensions], err: false
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:956:12: warning: rvalue references are a C++11 extension [-Wc++11-extensions], err: false
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/IntegerTypeTraits.h:90:17: error: missing 'typename' prior to dependent type name 'IsIntegral<IntegerType>::value', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/IntegerTypeTraits.h:91:17: error: expected parameter declarator, err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/IntegerTypeTraits.h:91:17: error: expected ')', err: true
fatal error: too many errors emitted, stopping now [-ferror-limit=], err: true
error: invalid value 'c++14' in '-std=c++14', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:190:15: error: unknown type name 'char16_t', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:194:1: error: C++ requires a type specifier for all declarations, err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:194:22: error: use of undeclared identifier 'char16_t', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:195:1: error: C++ requires a type specifier for all declarations, err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:195:15: error: use of undeclared identifier 'char16_t', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:195:30: error: use of undeclared identifier 'char16_t', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:196:1: error: C++ requires a type specifier for all declarations, err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:196:22: error: use of undeclared identifier 'u', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:197:1: error: C++ requires a type specifier for all declarations, err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:197:22: error: use of undeclared identifier 'u', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:49:10: error: unknown type name 'constexpr', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:49:21: error: expected ';' at end of declaration list, err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:50:11: error: unknown type name 'T', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:101:36: error: use of undeclared identifier 'char16_t', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:182:35: warning: variadic templates are a C++11 extension [-Wc++11-extensions], err: false
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:267:27: warning: rvalue references are a C++11 extension [-Wc++11-extensions], err: false
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:442:25: error: use of undeclared identifier 'char16_t', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:579:24: warning: default template arguments for a function template are a C++11 extension [-Wc++11-extensions], err: false
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:620:24: warning: default template arguments for a function template are a C++11 extension [-Wc++11-extensions], err: false
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:894:25: warning: rvalue references are a C++11 extension [-Wc++11-extensions], err: false
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:956:12: warning: rvalue references are a C++11 extension [-Wc++11-extensions], err: false
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TemplateLib.h:30:29: warning: variadic templates are a C++11 extension [-Wc++11-extensions], err: false
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TemplateLib.h:33:10: error: unknown type name 'constexpr', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TemplateLib.h:33:26: error: expected ';' at end of declaration list, err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TemplateLib.h:42:10: error: unknown type name 'constexpr', err: true
fatal error: too many errors emitted, stopping now [-ferror-limit=], err: true
error: invalid value 'c++14' in '-std=c++14', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:190:15: error: unknown type name 'char16_t', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:194:1: error: C++ requires a type specifier for all declarations, err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:194:22: error: use of undeclared identifier 'char16_t', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:195:1: error: C++ requires a type specifier for all declarations, err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:195:15: error: use of undeclared identifier 'char16_t', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:195:30: error: use of undeclared identifier 'char16_t', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:196:1: error: C++ requires a type specifier for all declarations, err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:196:22: error: use of undeclared identifier 'u', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:197:1: error: C++ requires a type specifier for all declarations, err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/Char16.h:197:22: error: use of undeclared identifier 'u', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:49:10: error: unknown type name 'constexpr', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:49:21: error: expected ';' at end of declaration list, err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:50:11: error: unknown type name 'T', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:101:36: error: use of undeclared identifier 'char16_t', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:182:35: warning: variadic templates are a C++11 extension [-Wc++11-extensions], err: false
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:267:27: warning: rvalue references are a C++11 extension [-Wc++11-extensions], err: false
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:442:25: error: use of undeclared identifier 'char16_t', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:579:24: warning: default template arguments for a function template are a C++11 extension [-Wc++11-extensions], err: false
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:620:24: warning: default template arguments for a function template are a C++11 extension [-Wc++11-extensions], err: false
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:894:25: warning: rvalue references are a C++11 extension [-Wc++11-extensions], err: false
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TypeTraits.h:956:12: warning: rvalue references are a C++11 extension [-Wc++11-extensions], err: false
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TemplateLib.h:30:29: warning: variadic templates are a C++11 extension [-Wc++11-extensions], err: false
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TemplateLib.h:33:10: error: unknown type name 'constexpr', err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TemplateLib.h:33:26: error: expected ';' at end of declaration list, err: true
/home/petejc/Desktop/build/opt-vanilla-i686-pc-linux/dist/include/mozilla/TemplateLib.h:42:10: error: unknown type name 'constexpr', err: true
fatal error: too many errors emitted, stopping now [-ferror-limit=], err: true
My guess is the compiler being used by Rust lacks required features? I seem to recall a bug where the compiler used by Rust may not be the compiler the build system is configured to use. This bug is either that or our configure checks aren't doing a good enough job validating the compiler.
A workaround is to ensure a modern clang is being used and is available on PATH before non-modern compilers.
needinfo glandium because I recall him saying something about cargo/rust potentially not using the correct toolchain.
Flags: needinfo?(mh+mozilla)
| Reporter | ||
Comment 5•8 years ago
|
||
From my system:
0:04.06 checking the host C compiler version... 6.4.0
0:04.08 checking the host C compiler works... yes
0:04.10 checking the host C++ compiler version... 6.4.0
0:04.12 checking the host C++ compiler works... yes
0:05.80 checking rustc version... 1.21.0
0:05.82 checking cargo version... 0.22.0
I am using llvm 5.0.0 x64 bit.
Comment 6•8 years ago
|
||
There's this in layout/style/ServoBindings.toml:
[build]
args = [
"-x", "c++", "-std=c++14",
"-DTRACING=1", "-DIMPL_LIBXUL", "-DMOZ_STYLO_BINDINGS=1",
"-DMOZILLA_INTERNAL_API", "-DRUST_BINDGEN", "-DMOZ_STYLO"
]
Note the -std=c++14, which doesn't match what we set at configure time (-std=gnu++11)
Flags: needinfo?(mh+mozilla)
Comment 7•8 years ago
|
||
There's the same in js/rust/build.rs too fwiw.
Comment 8•8 years ago
|
||
> /usr/local/rustc32/cargo
This suggests you're also using a 32-bits rust, and you probably shouldn't. That will likely result in out-of-memory errors if you don't disable debug symbols.
| Reporter | ||
Comment 9•8 years ago
|
||
I am explicitly using rustc 32 bit because when trying to cross compile, configure fails...
------
1:39.31 checking for rustc... /usr/local/rustc/rustc
1:39.31 checking for cargo... /usr/local/rustc/cargo
2:01.18 checking rustc version... 1.21.0
2:04.85 checking cargo version... 0.22.0
2:11.14 DEBUG: Executing: `/usr/local/rustc/rustc --crate-type staticlib --target=i686-unknown-linux-gnu -o /tmp/conftestdJ2qhp.rlib /tmp/conftestuQZJzW.rs`
2:11.14 DEBUG: The command returned non-zero exit status 101.
2:11.15 DEBUG: Its error output was:
2:11.15 DEBUG: | error[E0463]: can't find crate for `std`
2:11.15 DEBUG: | |
2:11.15 DEBUG: | = note: the `i686-unknown-linux-gnu` target may not be installed
2:11.15 DEBUG: |
2:11.15 DEBUG: | error: aborting due to previous error
2:11.15 DEBUG: |
2:11.15 ERROR: Cannot compile for i686-pc-linux-gnu with /usr/local/rustc/rustc
2:11.15 The target may be unsupported, or you may not have
2:11.15 a rust std library for that target installed. Try:
2:11.15
2:11.15 rustup target add i686-unknown-linux-gnu
2:11.15
2:11.16 *** Fix above errors and then restart with\
2:11.16 "/usr/bin/gmake -f client.mk build"
2:11.16 gmake: *** [configure] Error 1
Comment 10•8 years ago
|
||
You don't need a 32-bits rust, you need support for the 32-bits target, which you can have with a 64-bits rust.
| Reporter | ||
Comment 11•8 years ago
|
||
All I need is updated documentation as to the toolchain and specific Linux distribution version you guys use to build and deliver mozilla-beta 57 releases for Linux 32 bit.
If I can get specifics to reference platform builds, OS/Distro/Version/packages, I can then replicate that environment.
This doc is pretty outdated: https://wiki.mozilla.org/ReferencePlatforms
Heck a working Linux 32 cross compile .mozconfig would be handy too...
I am replicating the build config in about:config from the Linux 32 build beta you guys post but I am obviously missing something.
Windows, OSX, and Linux64 all build fine. Just can't get Linux 32 bit to cross compile...
| Reporter | ||
Comment 12•8 years ago
|
||
Duh, please don't tell me all I had to do was:
$ rustup target add i686-unknown-linux-gnu
Downloading now... *sigh*
Comment 13•8 years ago
|
||
(In reply to Pete Collins (MDG) from comment #12)
> Duh, please don't tell me all I had to do was:
>
> $ rustup target add i686-unknown-linux-gnu
>
> Downloading now... *sigh*
We won't. ;)
| Reporter | ||
Comment 14•8 years ago
|
||
Success!
I will write up some xcompile build docs as soon as I have time as they are necessary at this point.
| Reporter | ||
Comment 15•8 years ago
|
||
Ok, I wrote up some docs on how to set up VM's to build Firefox 57 Release for Windows, OSX, and Linux (including cross compile)
VM Toolchain Setup to Build Firefox 57
https://www.mozdevgroup.com/dropbox/air/docs/
I think these docs will come in useful for folks who need to spin builds from this release.
| Reporter | ||
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Updated•8 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•