Via cargo build --target aarch64-unknown-linux-gnu I compiled the code into libvodozemac.rlib and copied that file in my project directory under /lib, and added it to my project.
Hi. I don’t know much about rust but it looks like rlib is a rust only thing that is designed to be statically linked to the final binary at compile time by the rust compiler, while you are trying to load it like a dynamic shared object library.
[lib] name = “vodozemac” crate-type = [“lib”, “cdylib”]
3. Compiled again via cargo build
Now I am getting following errors
/usr/lib64/gcc/aarch64-suse-linux/14/ld: cannot find crti.o: No such file or directory
/usr/lib64/gcc/aarch64-suse-linux/14/ld: cannot find -lc: No such file or directory
/usr/lib64/gcc/aarch64-suse-linux/14/ld: cannot find -lm: No such file or directory
/usr/lib64/gcc/aarch64-suse-linux/14/ld: cannot find -lrt: No such file or directory
/usr/lib64/gcc/aarch64-suse-linux/14/ld: cannot find -lpthread: No such file or directory
/usr/lib64/gcc/aarch64-suse-linux/14/ld: cannot find -lgcc_s: No such file or directory
/usr/lib64/gcc/aarch64-suse-linux/14/ld: cannot find -lutil: No such file or directory
/usr/lib64/gcc/aarch64-suse-linux/14/ld: cannot find -lrt: No such file or directory
/usr/lib64/gcc/aarch64-suse-linux/14/ld: cannot find -lpthread: No such file or directory
/usr/lib64/gcc/aarch64-suse-linux/14/ld: cannot find -lm: No such file or directory
/usr/lib64/gcc/aarch64-suse-linux/14/ld: cannot find -ldl: No such file or directory
/usr/lib64/gcc/aarch64-suse-linux/14/ld: cannot find -lc: No such file or directory
/usr/lib64/gcc/aarch64-suse-linux/14/ld: cannot find crtn.o: No such file or directory
Seems I am missing files for this type of cross compilation, but I don’t know how to solve this. I’m using OpenSUSE LEAP 15.6 with following cross-compilation packages installed: cross-aarch64-binutils, cross-aarch64-gcc11, cross-aarch64-gcc14-bootstrap, cross-aarch64-linux-glibc-devel
Thank you, I will try to build the Whisperfish application and learn of it, but looks very elaborate, I’m not there yet with my app
Currently I just want to generate a library based on the vodozemac Rust code, library to be used for C++ code within Sailfish application.
I also tried sfdk config target=SailfishOS-5.0.0.62-aarch64 sfdk build-shell cargo build -Znext-lockfile-bump
now getting other errors
error: failed to download base64ct v1.8.0
Caused by:
unable to get packages from source
Caused by:
failed to download replaced source registry crates-io
Caused by:
failed to parse manifest at /home/mersdk/.cargo/registry/src/index.crates.io-1cd66030c949c28d/base64ct-1.8.0/Cargo.toml
Caused by:
feature edition2024 is required
The package requires the Cargo feature called edition2024, but that feature is not stabilized in this version of Cargo (1.75.0-nightly).
Consider trying a more recent nightly release.
See Unstable Features - The Cargo Book for more information about the status of this feature.