When cross-compiling cjdns-v22 the build fails during the build of the libsodium-sys library.
I'm building for x86_64 with Ubuntu 22.04 on Apple Silicon (M1) via a Multipass VM.
The cause for the failure is not a compilation error, but the fact that the libsodium-sys tests (make check) are executed, which shouldn't be done when cross-compiling.
The sodiumoxidebuild.rs has a line which should prevent executing the tests, but for some strange reason the libsodium-sys build obviously gets the wrong TARGET environment variable value. Somewhere in the output file of the build (target/release/build/cjdns_sys-051ac9670f9a8917/output) I find the following lines:
This is strange, because I explicitly set the TARGET_ARCH environment variable as required in the cross-do script, and I even try to set the TARGET environment variable explicitly as shown below:
So how can it happen that the libsodium-sys build ends up with a wrong TARGET env var value, although I explicitly set it to a different value before the build?
The same is probably happening to the ring library, but since it doesn't seem to have any tests executed during the build, the problem is hidden (for now):
When cross-compiling
cjdns-v22
the build fails during the build of thelibsodium-sys
library. I'm building for x86_64 with Ubuntu 22.04 on Apple Silicon (M1) via a Multipass VM. The cause for the failure is not a compilation error, but the fact that the libsodium-systests
(make check
) are executed, which shouldn't be done when cross-compiling.The
sodiumoxide
build.rs has a line which should prevent executing the tests, but for some strange reason the libsodium-sys build obviously gets the wrongTARGET
environment variable value. Somewhere in the output file of the build (target/release/build/cjdns_sys-051ac9670f9a8917/output) I find the following lines:This is strange, because I explicitly set the
TARGET_ARCH
environment variable as required in the cross-do script, and I even try to set theTARGET
environment variable explicitly as shown below:So how can it happen that the
libsodium-sys
build ends up with a wrongTARGET
env var value, although I explicitly set it to a different value before the build?The same is probably happening to the
ring
library, but since it doesn't seem to have any tests executed during the build, the problem is hidden (for now):