在win10上交叉编译arm7的程序,报错如下,请问有碰到过的吗?
error: linking with D:/TMP-APP/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc.exe
failed: exit code: 1
= note: "D:/TMP-APP/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc.exe" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-Wl,--eh-frame-hdr" "-L" "C:\Users\fengqi\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\armv7-unknown-linux-gnueabihf\lib" "D:\git\iot-gateway\target\armv7-unknown-linux-gnueabihf\debug\deps\iot_gateway-ca624a4528c7d108.11d95sizvr59wjvi.rcgu.o" "D:\git\iot-gateway\target\armv7-unknown-linux-gnueabihf\debug\deps\iot_gateway-ca624a4528c7d108.11n2eut2ram0dfsd.rcgu.o"
...(省略,太多了)
.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\armv7-unknown-linux-gnueabihf\lib\libcompiler_builtins-346d0172de053d25.rlib" "-Wl,-Bdynamic" "-lutil" "-Wl,-Bstatic" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-lgcc_eh" "-lgcc" "-Wl,-Bdynamic" "-lutil"
= note: d:/tmp-app/arm-linux-gnueabihf/bin/../arm-linux-gnueabihf/libc/usr/lib\libc.a(memcpy.o): In function __aeabi_memcpy8': /home/tcwg-buildslave/workspace/tcwg-make-release_1/snapshots/glibc.git~release~2.25~master/string/../sysdeps/arm/armv7/multiarch/memcpy_impl.S:300: multiple definition of
__aeabi_memcpy'
C:\Users\fengqi.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\armv7-unknown-linux-gnueabihf\lib\libcompiler_builtins-346d0172de053d25.rlib(compiler_builtins-346d0172de053d25.compiler_builtins.3dnodzen-cgu.14.rcgu.o):/cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.36/src/mem.rs:15: first defined here
d:/tmp-app/arm-linux-gnueabihf/bin/../arm-linux-gnueabihf/libc/usr/lib\libc.a(memcpy.o): In function __aeabi_memcpy8': /home/tcwg-buildslave/workspace/tcwg-make-release_1/snapshots/glibc.git~release~2.25~master/string/../sysdeps/arm/armv7/multiarch/memcpy_impl.S:300: multiple definition of
__aeabi_memcpy4'
C:\Users\fengqi.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\armv7-unknown-linux-gnueabihf\lib\libcompiler_builtins-346d0172de053d25.rlib(compiler_builtins-346d0172de053d25.compiler_builtins.3dnodzen-cgu.14.rcgu.o):/cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.36/src/arm.rs:11: first defined here
d:/tmp-app/arm-linux-gnueabihf/bin/../arm-linux-gnueabihf/libc/usr/lib\libc.a(memcpy.o): In function __aeabi_memcpy8': /home/tcwg-buildslave/workspace/tcwg-make-release_1/snapshots/glibc.git~release~2.25~master/string/../sysdeps/arm/armv7/multiarch/memcpy_impl.S:300: multiple definition of
__aeabi_memcpy8'
C:\Users\fengqi.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\armv7-unknown-linux-gnueabihf\lib\libcompiler_builtins-346d0172de053d25.rlib(compiler_builtins-346d0172de053d25.compiler_builtins.3dnodzen-cgu.14.rcgu.o):/cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.36/src/arm.rs:11: first defined here
...(省略,太多了)
评论区
写评论应该是跟openssl有关,最后用了mio_httpc = { version = "0.8", features = ["rtls"] }才解决问题
经过排查,跟http-client = "6.2.0"这个crate有关。