Building cargo / rust software on community OBS

Some “progress”: cargo vendor without locked or offline flags, after adding

aws-lc-rs = { version = "1", features = ["bindgen"] }

to the dependencies of librespot (in Cargo.toml).

This is because according to Platform Support - AWS Libcrypto for Rust User Guide, only aarch64-unknown-linux-gnu and x86_64-unknown-linux-gnu from what we use are pre-generated bindings, and arm-unknown-linux-gnueabihf is not.

The change in the toml file also required creating a patch after that cargo vendor, like git diff -u > ../rpm/001-aws_lc_rs-feature-bindgen.patch so it is applied after checking out the submodule (plus, a change from rpm %setup to %autosetup)

Now, the error changes in that it needs libclang.so.X.0.Y. While I did add clang-libs to BuildRequires, it may be an error that rust is again outside the target while searching for libs ? Also, with this change, the intel target doesn’t build anymore ( fatal error: 'stddef.h' file not found - probably requires more deps, but again, the SB2 virtualised platforms really struggle to find the right tools/libs. ).

Maybe this “aws-lc-rs” is not actually needed, and can be removed, but it is a transient dependency, hard to tell at this hour. maybe some other time.