Again probably another noob question. My thanks to Roland for the help on compiling. Now I have binaries that execute on the target. However, once on the target when the executable is run (after a reboot), I get
: error while loading shared libraries: libstd-42431e74081a30a8.so
: cannot open shared object file : No such file or directory
On the host, I find this library in a sub-directory within .rustup, copy it over to the target, and it is still not found. There also seems to be several .so and .rlib files in the .rustup dir. and where I find them on the target makes no sense. You'd think I'd find them in /lib, but they are in /media/sda1/rustlib. Again no documentation speaks to how these files should be implemented for a RUST executable.
my .cargo/config says
[target.armv7-unknown-linux-gnueabihf]
ar = "arm-dey-linux-gnueabi-gcc-ar"
linker = "gcc-sysroot"
[build]
rustflags = ["-C", "prefer-dynamic"]
and I compile as
cargo build --target=arm7-unkknown-linux-gnueabihf --release
and my rustup is v1.34 which was installed (on the host) just before the compile problems were resolved and when I did a build.
and in reading other shared library problem here. The Cargo.toml says:
[package]
name = "xyz-firmware"
version = "0.1.0"
authors = ["previous author's name and e-mail"]
[dependencies]
bytes = "0.4"
futures = "0.1"
futures-cpupool = "0.1"
lazy_static = "1.0"
mio = "0.6"
serde = "1.0"
serde_derive = "1.0"
socketcan = "1.7"
tokio-core = "0.1"
tokio-io = "0.1"
enum-common = { path = "../enum-common" }
enum-derive = { path = "../enum-derive" }
service = { path = "../service" }
[lib]
crate-type = ["dylib"]
[dependencies.sysfs_gpio]
version = "0.5"
features = ["tokio"]
My question is. Do I have to copy all these files to the target or is there a compile time switch for the libraries to be build into the binaries? or is there some other simple fix?