Open legokichi opened 6 years ago
I'm seeing the same error trying to compile for RPi Zero, with or without your env settings.
Compiling wiringpi v0.2.4
error: failed to run custom build command for `backtrace-sys v0.1.24`
process didn't exit successfully: `/source/target/release/build/backtrace-sys-723f8a9620720191/build-script-build` (exit code: 101)
--- stdout
TARGET = Some("x86_64-unknown-linux-gnu")
OPT_LEVEL = Some("3")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-gnu = None
CC_x86_64_unknown_linux_gnu = None
HOST_CC = None
CC = Some("arm-linux-gnueabihf-gcc")
CFLAGS_x86_64-unknown-linux-gnu = None
CFLAGS_x86_64_unknown_linux_gnu = None
HOST_CFLAGS = None
CFLAGS = None
DEBUG = Some("false")
running: "arm-linux-gnueabihf-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "src/libbacktrace" "-I" "/source/target/release/build/backtrace-sys-9444549bf911ecd5/out" "-fvisibility=hidden" "-DBACKTRACE_ELF_SIZE=64" "-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" "/source/target/release/build/backtrace-sys-9444549bf911ecd5/out/src/libbacktrace/alloc.o" "-c" "src/libbacktrace/alloc.c"
cargo:warning=arm-linux-gnueabihf-gcc: error: unrecognized command line option '-m64'
exit code: 1
--- stderr
thread 'main' panicked at '
Internal error occurred: Command "arm-linux-gnueabihf-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "src/libbacktrace" "-I" "/source/target/release/build/backtrace-sys-9444549bf911ecd5/out" "-fvisibility=hidden" "-DBACKTRACE_ELF_SIZE=64" "-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" "/source/target/release/build/backtrace-sys-9444549bf911ecd5/out/src/libbacktrace/alloc.o" "-c" "src/libbacktrace/alloc.c" with args "arm-linux-gnueabihf-gcc" did not execute successfully (status code exit code: 1).
', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.25/src/lib.rs:2260:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
warning: build failed, waiting for other jobs to finish...
error: build failed
Any ideas?
Made some progress by setting CC=gcc instead of CC=arm-linux-gnueabihf-gcc, but now I get this for hidapi and wiringpi:
error: failed to run custom build command for `wiringpi v0.2.4`
process didn't exit successfully: `/source/target/debug/build/wiringpi-abf2f2b7d89fa679/build-script-build` (exit code: 101)
--- stdout
TARGET = Some("arm-unknown-linux-gnueabihf")
OPT_LEVEL = Some("0")
HOST = Some("x86_64-unknown-linux-gnu")
CC_arm-unknown-linux-gnueabihf = None
CC_arm_unknown_linux_gnueabihf = None
TARGET_CC = None
CC = Some("gcc")
CFLAGS_arm-unknown-linux-gnueabihf = None
CFLAGS_arm_unknown_linux_gnueabihf = None
TARGET_CFLAGS = None
CFLAGS = None
DEBUG = Some("true")
running: "gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-march=armv6" "-marm" "-static" "-I" "wiringPi/" "-I" "wiringPi/wiringPi/" "-Wall" "-Wextra" "-o" "/source/target/arm-unknown-linux-gnueabihf/debug/build/wiringpi-88ef79ea228b60a2/out/wiringPi/wiringPi/ads1115.o" "-c" "wiringPi/wiringPi/ads1115.c"
cargo:warning=gcc: error: unrecognized command line option '-marm'
exit code: 1
host
target (raspberry pi zero w)
first i try
then
arm-linux-gnueabihf-gcc: error: unrecognized command line option '-m64'
.I found this issue https://github.com/alexcrichton/backtrace-rs/issues/106 so I try
and then
gcc: error: unrecognized command line option '-marm'
.finaly this setting works
it works!