Closed
Description
The error mesage is:
`error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-L" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage0/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.138pesuvab4dy035.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.15kq92zzbmxot4k9.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.16u6js6g0l3k1ic6.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.1ckp3bwk0jmrbky4.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.1im38lueib99jsk0.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.1mvmz58owquyropc.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.1y16o1qfye96o7m0.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.1zeawhkbeobww1zn.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.1zwd8n7bcl3vhvvh.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.23tqyymcb18u96mb.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.2jqywn86b2gsqohu.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.2lyh15q6cjwzy18c.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.3171x0bwu82dptu7.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.35af7odfhiqsblci.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.3ayaeypdcro9d6yk.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.3cx7oljifvb206q7.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.3g94tobrpgum5dk6.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.3rngp6bm2u2q5z0y.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.43v6g0y2xsxoggnt.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.45nf4z58qqykpcpi.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.48721dc4k5qxei0u.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.49a7n47po4ttqjl7.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.4b8ptp1vn215jmoe.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.4dvpkvhelzqn37of.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.4xq48u46a1pwiqn7.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.4ybye971cqflgun6.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.4yh8x2b62dcih00t.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.4ypvbwho0bu5tnww.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.8xzrsc1ux72v29j.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.9elsx31vb4it187.rcgu.o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.e19kx9t7xhzajfl.rcgu.o" "-o" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50" "/home/draganm/work/rust/build/bootstrap/debug/deps/bootstrap-e1de2c0797369e50.crate.allocator.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs" "-L" "/home/draganm/work/rust/build/bootstrap/debug/deps" "-L" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage0/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib" "-Wl,-Bstatic" "/home/draganm/work/rust/build/bootstrap/debug/deps/libbootstrap-ae75a7d683cd3583.rlib" "/home/draganm/work/rust/build/bootstrap/debug/deps/libpetgraph-21e72575365cd228.rlib" "/home/draganm/work/rust/build/bootstrap/debug/deps/libordermap-5f1d6b4d32742667.rlib" "/home/draganm/work/rust/build/bootstrap/debug/deps/libfixedbitset-18048728a1801049.rlib" "/home/draganm/work/rust/build/bootstrap/debug/deps/libtime-736f43167516e58e.rlib" "/home/draganm/work/rust/build/bootstrap/debug/deps/libtoml-51916d91f90fa53e.rlib" "/home/draganm/work/rust/build/bootstrap/debug/deps/libnum_cpus-12ac34ed547f3180.rlib" "/home/draganm/work/rust/build/bootstrap/debug/deps/libgetopts-2a463d2722dba7b8.rlib" "/home/draganm/work/rust/build/bootstrap/debug/deps/libfiletime-c8a8e6c0f3aa27b0.rlib" "/home/draganm/work/rust/build/bootstrap/debug/deps/liblibc-2d42ca337778fc07.rlib" "/home/draganm/work/rust/build/bootstrap/debug/deps/libcfg_if-cf754c2e7fcf3720.rlib" "/home/draganm/work/rust/build/bootstrap/debug/deps/libcmake-72d576f6c4aa644f.rlib" "/home/draganm/work/rust/build/bootstrap/debug/deps/libcc-6cc2976f70db579f.rlib" "/home/draganm/work/rust/build/bootstrap/debug/deps/libserde_json-9db09363bcefa01f.rlib" "/home/draganm/work/rust/build/bootstrap/debug/deps/libitoa-9993a924e130a429.rlib" "/home/draganm/work/rust/build/bootstrap/debug/deps/libdtoa-ca37bbda1bb7c5a0.rlib" "/home/draganm/work/rust/build/bootstrap/debug/deps/libserde-9d7a61a020c48540.rlib" "/home/draganm/work/rust/build/bootstrap/debug/deps/libnum_traits-77a6d928f7bf0203.rlib" "/home/draganm/work/rust/build/bootstrap/debug/deps/liblazy_static-83ca103b78acf207.rlib" "/home/draganm/work/rust/build/bootstrap/debug/deps/libbuild_helper-807bedf9f7568fde.rlib" "-Wl,--start-group" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage0/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib/libstd-8d847bbe97fc9dc5.rlib" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage0/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib/libpanic_unwind-008c42aad548e7dd.rlib" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage0/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib/libunwind-0fe53371ec419e32.rlib" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage0/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib/liballoc_system-9dec1cbd51097ce1.rlib" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage0/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib/liblibc-6a4fb915dd86d140.rlib" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage0/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib/liballoc-7ebba6af2d3cc324.rlib" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage0/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib/libstd_unicode-7a26f8b3cf380464.rlib" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage0/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib/libcore-b0c2d164a9741309.rlib" "-Wl,--end-group" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage0/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib/libcompiler_builtins-66d072e25a9acee3.rlib" "-Wl,-Bdynamic" "-l" "util" "-l" "dl" "-l" "rt" "-l" "pthread" "-l" "gcc_s" "-l" "c" "-l" "m" "-l" "rt" "-l" "pthread" "-l" "util"
= note: /home/draganm/work/rust/build/bootstrap/debug/deps/libbootstrap-ae75a7d683cd3583.rlib(bootstrap-ae75a7d683cd3583.2w6xsa2hbi53xhak.rcgu.o): In function `<std::collections::hash::map::HashMap<K, V, S> as core::clone::Clone>::clone':
/checkout/src/libstd/collections/hash/map.rs:399:(.text._ZN102_$LT$std..collections..hash..map..HashMap$LT$K$C$$u20$V$C$$u20$S$GT$$u20$as$u20$core..clone..Clone$GT$5clone17hde56aa8496891c67E+0x8c): relocation truncated to fit: R_MIPS_CALL16 against `_Unwind_Resume@@GCC_3.0'
/home/draganm/work/rust/build/bootstrap/debug/deps/libbootstrap-ae75a7d683cd3583.rlib(bootstrap-ae75a7d683cd3583.2w6xsa2hbi53xhak.rcgu.o): In function `<std::collections::hash::map::HashMap<K, V, S> as core::iter::traits::IntoIterator>::into_iter':
/checkout/src/libstd/collections/hash/map.rs:1834:(.text._ZN116_$LT$std..collections..hash..map..HashMap$LT$K$C$$u20$V$C$$u20$S$GT$$u20$as$u20$core..iter..traits..IntoIterator$GT$9into_iter17h3971322724732454E+0x84): relocation truncated to fit: R_MIPS_CALL16 against `_Unwind_Resume@@GCC_3.0'
/home/draganm/work/rust/build/bootstrap/debug/deps/libbootstrap-ae75a7d683cd3583.rlib(bootstrap-ae75a7d683cd3583.2w6xsa2hbi53xhak.rcgu.o): In function `<std::collections::hash::map::HashMap<K, V, S> as core::iter::traits::Extend<(K, V)>>::extend':
/checkout/src/libstd/collections/hash/map.rs:2581:(.text._ZN136_$LT$std..collections..hash..map..HashMap$LT$K$C$$u20$V$C$$u20$S$GT$$u20$as$u20$core..iter..traits..Extend$LT$$LP$K$C$$u20$V$RP$$GT$$GT$6extend17h8b839c2a084c624aE+0xcc): relocation truncated to fit: R_MIPS_CALL16 against `_Unwind_Resume@@GCC_3.0'
/home/draganm/work/rust/build/bootstrap/debug/deps/libbootstrap-ae75a7d683cd3583.rlib(bootstrap-ae75a7d683cd3583.2w6xsa2hbi53xhak.rcgu.o): In function `<std::collections::hash::map::HashMap<K, V, S> as core::iter::traits::Extend<(K, V)>>::extend':
/checkout/src/libstd/collections/hash/map.rs:2581:(.text._ZN136_$LT$std..collections..hash..map..HashMap$LT$K$C$$u20$V$C$$u20$S$GT$$u20$as$u20$core..iter..traits..Extend$LT$$LP$K$C$$u20$V$RP$$GT$$GT$6extend17hb662b5607a17e017E+0xb4): relocation truncated to fit: R_MIPS_CALL16 against `_Unwind_Resume@@GCC_3.0'
/home/draganm/work/rust/build/bootstrap/debug/deps/libbootstrap-ae75a7d683cd3583.rlib(bootstrap-ae75a7d683cd3583.2w6xsa2hbi53xhak.rcgu.o): In function `<std::collections::hash::map::InternalEntry<K, V, &'a mut std::collections::hash::table::RawTable<K, V>>>::into_entry':
/checkout/src/libstd/collections/hash/map.rs:1680:(.text._ZN157_$LT$std..collections..hash..map..InternalEntry$LT$K$C$$u20$V$C$$u20$$RF$$u27$a$u20$mut$u20$std..collections..hash..table..RawTable$LT$K$C$$u20$V$GT$$GT$$GT$10into_entry17h96e9d8440f6f2c01E+0x2ac): relocation truncated to fit: R_MIPS_CALL16 against `memcpy@@GLIBC_2.0'
/checkout/src/libstd/collections/hash/map.rs:1686:(.text._ZN157_$LT$std..collections..hash..map..InternalEntry$LT$K$C$$u20$V$C$$u20$$RF$$u27$a$u20$mut$u20$std..collections..hash..table..RawTable$LT$K$C$$u20$V$GT$$GT$$GT$10into_entry17h96e9d8440f6f2c01E+0x44c): relocation truncated to fit: R_MIPS_CALL16 against `memcpy@@GLIBC_2.0'
/checkout/src/libstd/collections/hash/map.rs:1686:(.text._ZN157_$LT$std..collections..hash..map..InternalEntry$LT$K$C$$u20$V$C$$u20$$RF$$u27$a$u20$mut$u20$std..collections..hash..table..RawTable$LT$K$C$$u20$V$GT$$GT$$GT$10into_entry17h96e9d8440f6f2c01E+0x478): relocation truncated to fit: R_MIPS_CALL16 against `memcpy@@GLIBC_2.0'
/home/draganm/work/rust/build/bootstrap/debug/deps/libbootstrap-ae75a7d683cd3583.rlib(bootstrap-ae75a7d683cd3583.2w6xsa2hbi53xhak.rcgu.o): In function `<std::collections::hash::map::InternalEntry<K, V, &'a mut std::collections::hash::table::RawTable<K, V>>>::into_entry':
/checkout/src/libstd/collections/hash/map.rs:1680:(.text._ZN157_$LT$std..collections..hash..map..InternalEntry$LT$K$C$$u20$V$C$$u20$$RF$$u27$a$u20$mut$u20$std..collections..hash..table..RawTable$LT$K$C$$u20$V$GT$$GT$$GT$10into_entry17he24a1b5fedc0b2f6E+0x26c): relocation truncated to fit: R_MIPS_CALL16 against `memcpy@@GLIBC_2.0'
/checkout/src/libstd/collections/hash/map.rs:1686:(.text._ZN157_$LT$std..collections..hash..map..InternalEntry$LT$K$C$$u20$V$C$$u20$$RF$$u27$a$u20$mut$u20$std..collections..hash..table..RawTable$LT$K$C$$u20$V$GT$$GT$$GT$10into_entry17he24a1b5fedc0b2f6E+0x46c): relocation truncated to fit: R_MIPS_CALL16 against `memcpy@@GLIBC_2.0'
/home/draganm/work/rust/build/bootstrap/debug/deps/libbootstrap-ae75a7d683cd3583.rlib(bootstrap-ae75a7d683cd3583.2w6xsa2hbi53xhak.rcgu.o): In function `std::collections::hash::map::robin_hood':
/checkout/src/libstd/collections/hash/map.rs:503:(.text._ZN3std11collections4hash3map10robin_hood17h012217733b3b4b5aE+0xa4): relocation truncated to fit: R_MIPS_CALL16 against `_Unwind_Resume@@GCC_3.0'
/home/draganm/work/rust/build/bootstrap/debug/deps/libbootstrap-ae75a7d683cd3583.rlib(bootstrap-ae75a7d683cd3583.2w6xsa2hbi53xhak.rcgu.o): In function `std::collections::hash::map::robin_hood':
/checkout/src/libstd/collections/hash/map.rs:503:(.text._ZN3std11collections4hash3map10robin_hood17h03200646b79056ceE+0xa4): additional relocation overflows omitted from the output`
Not sure yet if there is a bug behind this. Posting this here just in case.
What happens is that we hit the limit of 8K GOT entries per single object file. I've tried using 1.25 instead of 1.26 as bootstrap compiler and the bootstrap build passes with offending object file having ~7K symbols needing GOT entry. I haven't been able to find exact reason for this. At first glance, while it sound counterintuitive, it seems that we have more inlining on 1.26 which pulls in more symbol references.
I was able to sidestep this by increasing opt-level for bootstrap build to 3. As a stopgap, is it ok to provide and option to bootstrap.py to build bootstrap tool in release mode ? I can send the PR.