Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to cross compile to Openwrt #148

Closed
Hentioe opened this issue Dec 30, 2018 · 1 comment
Closed

Unable to cross compile to Openwrt #148

Hentioe opened this issue Dec 30, 2018 · 1 comment

Comments

@Hentioe
Copy link

Hentioe commented Dec 30, 2018

My .cargo/config:

[target.arm-unknown-linux-musleabi]
linker = "arm-openwrt-linux-gcc"

Compile command:

 cargo build --target=arm-unknown-linux-musleabi

Output:

error: failed to run custom build command for `backtrace-sys v0.1.28`
process didn't exit successfully: `/home/data/code/optweaks/target/debug/build/backtrace-sys-6bd48a810fde4c30/build-script-build` (exit code: 101)
--- stdout
cargo:rustc-cfg=rbt
TARGET = Some("arm-unknown-linux-musleabi")
OPT_LEVEL = Some("0")
HOST = Some("x86_64-unknown-linux-gnu")
CC_arm-unknown-linux-musleabi = None
CC_arm_unknown_linux_musleabi = None
TARGET_CC = None
CC = None
CROSS_COMPILE = None
CFLAGS_arm-unknown-linux-musleabi = None
CFLAGS_arm_unknown_linux_musleabi = None
TARGET_CFLAGS = None
CFLAGS = None
running: "arm-linux-musleabi-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-static" "-march=armv6" "-marm" "-mfloat-abi=soft" "-I" "src/libbacktrace" "-I" "/home/data/code/optweaks/target/arm-unknown-linux-musleabi/debug/build/backtrace-sys-31b7a6d9d47eb337/out" "-fvisibility=hidden" "-DBACKTRACE_ELF_SIZE=32" "-DBACKTRACE_SUPPORTED=1" "-DBACKTRACE_USES_MALLOC=1" "-DBACKTRACE_SUPPORTS_THREADS=0" "-DBACKTRACE_SUPPORTS_DATA=0" "-DHAVE_DL_ITERATE_PHDR=1" "-D_GNU_SOURCE=1" "-D_LARGE_FILES=1" "-Dbacktrace_full=__rbt_backtrace_full" "-Dbacktrace_dwarf_add=__rbt_backtrace_dwarf_add" "-Dbacktrace_initialize=__rbt_backtrace_initialize" "-Dbacktrace_pcinfo=__rbt_backtrace_pcinfo" "-Dbacktrace_syminfo=__rbt_backtrace_syminfo" "-Dbacktrace_get_view=__rbt_backtrace_get_view" "-Dbacktrace_release_view=__rbt_backtrace_release_view" "-Dbacktrace_alloc=__rbt_backtrace_alloc" "-Dbacktrace_free=__rbt_backtrace_free" "-Dbacktrace_vector_finish=__rbt_backtrace_vector_finish" "-Dbacktrace_vector_grow=__rbt_backtrace_vector_grow" "-Dbacktrace_vector_release=__rbt_backtrace_vector_release" "-Dbacktrace_close=__rbt_backtrace_close" "-Dbacktrace_open=__rbt_backtrace_open" "-Dbacktrace_print=__rbt_backtrace_print" "-Dbacktrace_simple=__rbt_backtrace_simple" "-Dbacktrace_qsort=__rbt_backtrace_qsort" "-Dbacktrace_create_state=__rbt_backtrace_create_state" "-Dbacktrace_uncompress_zdebug=__rbt_backtrace_uncompress_zdebug""-o" "/home/data/code/optweaks/target/arm-unknown-linux-musleabi/debug/build/backtrace-sys-31b7a6d9d47eb337/out/src/libbacktrace/alloc.o" "-c" "src/libbacktrace/alloc.c"

--- stderr
thread 'main' panicked at '

Internal error occurred: Failed to find tool. Is `arm-linux-musleabi-gcc` installed?

But the compiler I configured is arm-openwrt-linux-gcc, why does it need arm-linux-musleabi-gcc?

@alexcrichton
Copy link
Member

Thanks for the report! I think this is unfortunately suffering from rust-lang/cc-rs#82 where the cc crate doesn't ready cargo configuration, so you'll need to also set env vars

tor-oscar added a commit to tor-oscar/rpi-moisture-sensor that referenced this issue Jan 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants