Cross compile for RPI3 (arm-linux-gnueabihf-gcc)
- Dominant language
- JavaScript
- Stars
- 2k
- Forks
- 179
- PR merge metrics
- No merged PRs in 30d
Description
Can't cross compile for target arm-linux-gnueabihf-gcc
My .cargo/config file
> [target.armv7-unknown-linux-gnueabihf]
> linker = "arm-linux-gnueabihf-gcc"
Create new rust project
cargo new hello_world --bin
Add depedency:
> [dependencies]
> web-view = { version = "0.6" }
Compile!
> user@machine:~/hello_world$ PKG_CONFIG_ALLOW_CROSS=1 cargo build --target armv7-unknown-linux-gnueabihf
> Compiling hello_world v0.1.0 (/home/user/hello_world)
> error: linking with `arm-linux-gnueabihf-gcc` failed: exit code: 1
> |
> = note: "arm-linux-gnueabihf-gcc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-L" "/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "/home/user/hello_world/target/armv7-unknown-linux-gnueabihf/debug/deps/hello_world-8c0c889708fd3581.388tdatz8cpkgdva.rcgu.o" "/home/user/hello_world/target/armv7-unknown-linux-gnueabihf/debug/deps/hello_world-8c0c889708fd3581.3p0wvcx5m5l3nqja.rcgu.o" "/home/user/hello_world/target/armv7-unknown-linux-gnueabihf/debug/deps/hello_world-8c0c889708fd3581.4eee6e6scav1opv3.rcgu.o" "/home/user/hello_world/target/armv7-unknown-linux-gnueabihf/debug/deps/hello_world-8c0c889708fd3581.hnp0u67i9lz27kn.rcgu.o" "/home/user/hello_world/target/armv7-unknown-linux-gnueabihf/debug/deps/hello_world-8c0c889708fd3581.iyb1o2l0dwbmjzn.rcgu.o" "/home/user/hello_world/target/armv7-unknown-linux-gnueabihf/debug/deps/hello_world-8c0c889708fd3581.iyrrzr1ysgyopql.rcgu.o" "-o" "/home/user/hello_world/target/armv7-unknown-linux-gnueabihf/debug/deps/hello_world-8c0c889708fd3581" "/home/user/hello_world/target/armv7-unknown-linux-gnueabihf/debug/deps/hello_world-8c0c889708fd3581.to81if3xn9lemh3.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/home/user/hello_world/target/armv7-unknown-linux-gnueabihf/debug/deps" "-L" "/home/user/hello_world/target/debug/deps" "-L" "/home/user/hello_world/target/armv7-unknown-linux-gnueabihf/debug/build/tinyfiledialogs-c5b0994d13e36eb8/out" "-L" "/usr/lib/x86_64-linux-gnu" "-L" "/home/user/hello_world/target/armv7-unknown-linux-gnueabihf/debug/build/webview-sys-b3a06310c042d741/out" "-L" "/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-Wl,--start-group" "-Wl,-Bstatic" "/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libstd-9a3b918057294c1a.rlib" "/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libpanic_unwind-aa54deb15d614941.rlib" "/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libhashbrown-3ffb7942d33970fe.rlib" "/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/librustc_std_workspace_alloc-f43dc044e78388fb.rlib" "/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libbacktrace-0384b5c762f5cacf.rlib" "/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libbacktrace_sys-f893a57a8e653816.rlib" "/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/librustc_demangle-caf5f22f9e1dfcd5.rlib" "/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libunwind-39d4159d678a0e9b.rlib" "/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libcfg_if-07b38c6e4da8cbb9.rlib" "/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/liblibc-d13c69336fa07db7.rlib" "/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/liballoc-6f3a3514fbed0035.rlib" "/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/librustc_std_workspace_core-76318543e1900ee7.rlib" "/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libcore-6e2a268a7cf40c59.rlib" "-Wl,--end-group" "/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libcompiler_builtins-322b9bc0d21e6a3a.rlib" "-Wl,-Bdynamic" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"
> = note: /usr/lib/x86_64-linux-gnu/libdl.so: file not recognized: File format not recognized
> collect2: error: ld returned 1 exit status
>
>
> error: aborting due to previous error
>
> error: could not compile `hello_world`.
>
> To learn more, run the command again with --verbose.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.