rust-crosscompiler-arm
rust-crosscompiler-arm copied to clipboard
serialport throws libudev.so: file format not recognized
trafficstars
When I use any code that tries to build anything from serialport package, I get the following error:
error: linking with `arm-linux-gnueabihf-gcc-with-link-search` failed: exit code: 1
|
= note: "arm-linux-gnueabihf-gcc-with-link-search" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-L" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib" "/source/target/arm-unknown-linux-gnueabihf/release/deps/ferm-3fdc3e8485851ba0.ferm.24vd4lm7-cgu.0.rcgu.o"
<redacted>
"/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libcompiler_builtins-5f64e7823d30511e.rlib" "-Wl,-Bdynamic" "-ludev" "-lutil" "-lutil" "-ldl" "-lrt" "-lpthread" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"
= note: /usr/lib/x86_64-linux-gnu/libudev.so: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
error: aborting due to previous error
cargo tree shows:
├── serialport v3.1.0
│ ├── CoreFoundation-sys v0.1.4
│ │ ├── libc v0.2.44
│ │ └── mach v0.1.2
│ │ └── libc v0.2.44 (*)
│ ├── IOKit-sys v0.1.5
│ │ ├── CoreFoundation-sys v0.1.4 (*)
│ │ ├── libc v0.2.44 (*)
│ │ └── mach v0.1.2 (*)
│ ├── bitflags v1.0.4
│ ├── mach v0.2.3
│ │ └── libc v0.2.44 (*)
│ └── nix v0.11.0
│ ├── bitflags v1.0.4 (*)
│ ├── cfg-if v0.1.6
│ ├── libc v0.2.44 (*)
│ └── void v1.0.2
connect serial port I suspect this is I suspect this is related to I don't know apt-get update && apt-get install -y libudev-dev
Same thing here.
= note: /usr/lib/libudev.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 `bridges`.
Caused by:
process didn't exit successfully: `rustc --edition=2018 --crate-name bridges src/main.rs --color always --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=4a79882c44fb469d -C extra-filename=-4a79882c44fb469d --out-dir /home/patrick/git/patrick/bridges/target/armv7-unknown-linux-gnueabihf/debug/deps --target armv7-unknown-linux-gnueabihf -C linker=arm-linux-gnueabihf-gcc -C incremental=/home/patrick/git/patrick/bridges/target/armv7-unknown-linux-gnueabihf/debug/incremental -L dependency=/home/patrick/git/patrick/bridges/target/armv7-unknown-linux-gnueabihf/debug/deps -L dependency=/home/patrick/git/patrick/bridges/target/debug/deps --extern clap=/home/patrick/git/patrick/bridges/target/armv7-unknown-linux-gnueabihf/debug/deps/libclap-21fd3cc5a54aee73.rlib --extern libc=/home/patrick/git/patrick/bridges/target/armv7-unknown-linux-gnueabihf/debug/deps/liblibc-aaea030eaa01561e.rlib --extern mio=/home/patrick/git/patrick/bridges/target/armv7-unknown-linux-gnueabihf/debug/deps/libmio-9408e9e805797b78.rlib --extern mio_serial=/home/patrick/git/patrick/bridges/target/armv7-unknown-linux-gnueabihf/debug/deps/libmio_serial-c5cbc2832fee4bcc.rlib --extern serialport=/home/patrick/git/patrick/bridges/target/armv7-unknown-linux-gnueabihf/debug/deps/libserialport-e7c479ba49978260.rlib -L native=/usr/lib` (exit code: 1)