Closed zonyitoo closed 6 months ago
Further more, same problem could be found when building for target armv7-unknown-linux-musleabihf
:
Compiling shadowsocks-rust v1.19.0 (/project)
error: linking with `arm-linux-musleabihf-gcc` failed: exit status: 1
|
= note: LC_ALL="C" PATH="/rust/lib/rustlib/x86_64-unknown-linux-gnu/bin:/rust/lib/rustlib/x86_64-unknown-linux-gnu/bin/self-contained:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/rust/bin" VSLANG="1033" "arm-linux-musleabihf-gcc" "/rust/lib/rustlib/armv7-unknown-linux-musleabihf/lib/self-contained/crt1.o" "/rust/lib/rustlib/armv7-unknown-linux-musleabihf/lib/self-contained/crti.o" "/rust/lib/rustlib/armv7-unknown-linux-musleabihf/lib/self-contained/crtbegin.o" "/tmp/rustcThA1GS/symbols.o" "/target/armv7-unknown-linux-musleabihf/release/deps/sslocal-351200f3718edcbc.sslocal.bfb2638088c0dfbd-cgu.0.rcgu.o" "-Wl,--as-needed" "-L" "/target/armv7-unknown-linux-musleabihf/release/deps" "-L" "/target/release/deps" "-L" "/target/armv7-unknown-linux-musleabihf/release/build/openssl-sys-78fc496f0f791454/out/openssl-build/install/lib" "-L" "/target/armv7-unknown-linux-musleabihf/release/build/ring-48035827ecb53254/out" "-L" "/target/armv7-unknown-linux-musleabihf/release/build/ring-5c07b5e2b190f099/out" "-L" "/target/armv7-unknown-linux-musleabihf/release/build/zstd-sys-eb415a1bafaa948c/out" "-L" "/target/armv7-unknown-linux-musleabihf/release/build/aws-lc-sys-3c0baa9ba01ab963/out/build/artifacts/" "-L" "/rust/lib/rustlib/armv7-unknown-linux-musleabihf/lib" "-Wl,-Bstatic" "/tmp/rustcThA1GS/libopenssl_sys-0617dfd9b98df13d.rlib" "-latomic" "/tmp/rustcThA1GS/libaws_lc_sys-a5380391b2deb1d8.rlib" "/tmp/rustcThA1GS/libzstd_sys-b2344cf0f1a536a9.rlib" "/tmp/rustcThA1GS/libring-ee8a3c4283835c4c.rlib" "/tmp/rustcThA1GS/libring-00e0dec3131afd27.rlib" "-lunwind" "-lc" "/rust/lib/rustlib/armv7-unknown-linux-musleabihf/lib/libcompiler_builtins-12f423a053b39417.rlib" "-Wl,-Bdynamic" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-nostartfiles" "-L" "/rust/lib/rustlib/armv7-unknown-linux-musleabihf/lib" "-L" "/rust/lib/rustlib/armv7-unknown-linux-musleabihf/lib/self-contained" "-o" "/target/armv7-unknown-linux-musleabihf/release/deps/sslocal-351200f3718edcbc" "-Wl,--gc-sections" "-static" "-no-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-Wl,--strip-all" "-nodefaultlibs" "/rust/lib/rustlib/armv7-unknown-linux-musleabihf/lib/self-contained/crtend.o" "/rust/lib/rustlib/armv7-unknown-linux-musleabihf/lib/self-contained/crtn.o"
= note: /usr/local/bin/../lib/gcc/arm-linux-musleabihf/9.2.0/../../../../arm-linux-musleabihf/bin/ld: /tmp/rustcThA1GS/libaws_lc_sys-a5380391b2deb1d8.rlib(sha256-armv4.S.o): in function `sha256_block_data_order_neon':
(.text+0xc90): multiple definition of `sha256_block_data_order_neon'; /tmp/rustcThA1GS/libopenssl_sys-0617dfd9b98df13d.rlib(libcrypto-lib-sha256-armv4.o):(.text+0xc90): first defined here
/usr/local/bin/../lib/gcc/arm-linux-musleabihf/9.2.0/../../../../arm-linux-musleabihf/bin/ld: /tmp/rustcThA1GS/libaws_lc_sys-a5380391b2deb1d8.rlib(sha512-armv4.S.o): in function `sha512_block_data_order_neon':
(.text+0x710): multiple definition of `sha512_block_data_order_neon'; /tmp/rustcThA1GS/libopenssl_sys-0617dfd9b98df13d.rlib(libcrypto-lib-sha512-armv4.o):(.text+0x710): first defined here
collect2: error: ld returned 1 exit status
error: could not compile `shadowsocks-rust` (bin "sslocal") due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: linking with `arm-linux-musleabihf-gcc` failed: exit status: 1
|
= note: LC_ALL="C" PATH="/rust/lib/rustlib/x86_64-unknown-linux-gnu/bin:/rust/lib/rustlib/x86_64-unknown-linux-gnu/bin/self-contained:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/rust/bin" VSLANG="1033" "arm-linux-musleabihf-gcc" "/rust/lib/rustlib/armv7-unknown-linux-musleabihf/lib/self-contained/crt1.o" "/rust/lib/rustlib/armv7-unknown-linux-musleabihf/lib/self-contained/crti.o" "/rust/lib/rustlib/armv7-unknown-linux-musleabihf/lib/self-contained/crtbegin.o" "/tmp/rustc1ZHeGi/symbols.o" "/target/armv7-unknown-linux-musleabihf/release/deps/ssservice-e3ee515ae4e02a3b.ssservice.848519e29[620](https://github.com/shadowsocks/shadowsocks-rust/actions/runs/9237206906/job/25414561792#step:5:621)55fc-cgu.0.rcgu.o" "-Wl,--as-needed" "-L" "/target/armv7-unknown-linux-musleabihf/release/deps" "-L" "/target/release/deps" "-L" "/target/armv7-unknown-linux-musleabihf/release/build/openssl-sys-78fc496f0f791454/out/openssl-build/install/lib" "-L" "/target/armv7-unknown-linux-musleabihf/release/build/ring-48035827ecb53254/out" "-L" "/target/armv7-unknown-linux-musleabihf/release/build/ring-5c07b5e2b190f099/out" "-L" "/target/armv7-unknown-linux-musleabihf/release/build/zstd-sys-eb415a1bafaa948c/out" "-L" "/target/armv7-unknown-linux-musleabihf/release/build/aws-lc-sys-3c0baa9ba01ab963/out/build/artifacts/" "-L" "/rust/lib/rustlib/armv7-unknown-linux-musleabihf/lib" "-Wl,-Bstatic" "/tmp/rustc1ZHeGi/libopenssl_sys-0617dfd9b98df13d.rlib" "-latomic" "/tmp/rustc1ZHeGi/libaws_lc_sys-a5380391b2deb1d8.rlib" "/tmp/rustc1ZHeGi/libzstd_sys-b2344cf0f1a536a9.rlib" "/tmp/rustc1ZHeGi/libring-ee8a3c4283835c4c.rlib" "/tmp/rustc1ZHeGi/libring-00e0dec3131afd27.rlib" "-lunwind" "-lc" "/rust/lib/rustlib/armv7-unknown-linux-musleabihf/lib/libcompiler_builtins-12f423a053b39417.rlib" "-Wl,-Bdynamic" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-nostartfiles" "-L" "/rust/lib/rustlib/armv7-unknown-linux-musleabihf/lib" "-L" "/rust/lib/rustlib/armv7-unknown-linux-musleabihf/lib/self-contained" "-o" "/target/armv7-unknown-linux-musleabihf/release/deps/ssservice-e3ee515ae4e02a3b" "-Wl,--gc-sections" "-static" "-no-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-Wl,--strip-all" "-nodefaultlibs" "/rust/lib/rustlib/armv7-unknown-linux-musleabihf/lib/self-contained/crtend.o" "/rust/lib/rustlib/armv7-unknown-linux-musleabihf/lib/self-contained/crtn.o"
= note: /usr/local/bin/../lib/gcc/arm-linux-musleabihf/9.2.0/../../../../arm-linux-musleabihf/bin/ld: /tmp/rustc1ZHeGi/libaws_lc_sys-a5380391b2deb1d8.rlib(sha256-armv4.S.o): in function `sha256_block_data_order_neon':
(.text+0xc90): multiple definition of `sha256_block_data_order_neon'; /tmp/rustc1ZHeGi/libopenssl_sys-0617dfd9b98df13d.rlib(libcrypto-lib-sha256-armv4.o):(.text+0xc90): first defined here
/usr/local/bin/../lib/gcc/arm-linux-musleabihf/9.2.0/../../../../arm-linux-musleabihf/bin/ld: /tmp/rustc1ZHeGi/libaws_lc_sys-a5380391b2deb1d8.rlib(sha512-armv4.S.o): in function `sha512_block_data_order_neon':
(.text+0x710): multiple definition of `sha512_block_data_order_neon'; /tmp/rustc1ZHeGi/libopenssl_sys-0617dfd9b98df13d.rlib(libcrypto-lib-sha512-armv4.o):(.text+0x710): first defined here
collect2: error: ld returned 1 exit status
I believe the problem related to the Cross.toml configuration that you have here. See my comment on your other issue. Since I believe these have the same root cause, I will close this issue.
Problem:
This is the build on Snap (build log): https://snapcraft.io/shadowsocks-rust/builds/2492790#footer
Relevant details
AWS-LC for Rust versions or commit: (crates.io aws-lc-rs v1.7.2)
System information: for linux, below info can be collected by running
uname -srvmp