eclipse-iceoryx / iceoryx2

Eclipse iceoryx2™ - true zero-copy inter-process-communication in pure Rust
https://iceoryx.io
Apache License 2.0
455 stars 22 forks source link

crosspile in arm #70

Open fengtuo58 opened 6 months ago

fengtuo58 commented 6 months ago

/code/rust-trail/iceoryx2$ cargo build Compiling iceoryx2-pal-posix v0.1.1 (~/code/rust-trail/iceoryx2/iceoryx2-pal/posix) error: failed to run custom build command for iceoryx2-pal-posix v0.1.1 (~/code/rust-trail/iceoryx2/iceoryx2-pal/posix)

Caused by: process didn't exit successfully: ~/code/rust-trail/iceoryx2/target/debug/build/iceoryx2-pal-posix-187ccb108511064a/build-script-build (exit status: 101) --- stdout cargo:rustc-link-lib=pthread cargo:rerun-if-changed=src/c/posix.h cargo:rerun-if-env-changed=TARGET cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_arm-unknown-linux-gnueabi cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_arm_unknown_linux_gnueabi cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS

--- stderr /usr/include/bits/socket.h:390:10: fatal error: 'asm/socket.h' file not found thread 'main' panicked at iceoryx2-pal/posix/build.rs:45:18: Unable to generate bindings: ClangDiagnostic("/usr/include/bits/socket.h:390:10: fatal error: 'asm/socket.h' file not found\n") stack backtrace: 0: rust_begin_unwind at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:597:5 1: core::panicking::panic_fmt at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/panicking.rs:72:14 2: core::result::unwrap_failed at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/result.rs:1652:5 3: core::result::Result<T,E>::expect at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/result.rs:1034:23 4: build_script_build::main at ./build.rs:41:13 5: core::ops::function::FnOnce::call_once at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/ops/function.rs:250:5 note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.

elBoberido commented 6 months ago

Cross compiling iceoryx2 would be great. Maybe some inspiration could be taken from https://github.com/eclipse-iceoryx/iceoryx-rs/pull/74.

Do you intend to create a patch for this issue?

elfenpiff commented 6 months ago

@elBoberido @fengtuo58 I did some research and it seems that this is maybe related to the open issue in bindgen: https://github.com/rust-lang/rust-bindgen/issues/1229