rules_rust
rules_rust copied to clipboard
Enable `@examples//ffi/rust_calling_c:matrix_dylib_test` on Darwin once we are on Bazel >= 4.2
Once we set install name on Darwin (which happens on Bazel 4.2.0) we can enable this test on the CI.
https://github.com/bazelbuild/rules_rust/blob/main/.bazelci/presubmit.yml#L34
@illicitonion This can probably be done now that 4.2.0 is out.
On 5.2.0 this target still fails with the following error
INFO: From Testing //ffi/rust_calling_c:matrix_dylib_test:
==================== Test output for //ffi/rust_calling_c:matrix_dylib_test:
dyld[90395]: Library not loaded: @rpath/libffi_Srust_Ucalling_Uc_Sc_Slibnative_Umatrix_Uso.so
Referenced from: /private/var/tmp/_bazel_user/1426ad6c00f8f7b996ddc75bef70871c/execroot/examples/bazel-out/darwin-fastbuild/bin/ffi/rust_calling_c/matrix_dylib_test
Reason: tried: '/private/var/tmp/_bazel_user/1426ad6c00f8f7b996ddc75bef70871c/execroot/examples/bazel-out/darwin-fastbuild/bin/ffi/rust_calling_c/../../_solib_darwin_x86_64/_U_S_Sffi_Srust_Ucalling_Uc_Sc_Cnative_Umatrix_Uso___Uffi_Srust_Ucalling_Uc_Sc/libffi_Srust_Ucalling_Uc_Sc_Slibnative_Umatrix_Uso.so' (no such file), '/private/var/tmp/_bazel_user/1426ad6c00f8f7b996ddc75bef70871c/execroot/examples/bazel-out/darwin-fastbuild/bin/ffi/rust_calling_c/../../_solib_darwin_x86_64/_U_S_Sffi_Srust_Ucalling_Uc_Sc_Cnative_Umatrix_Uso___Uffi_Srust_Ucalling_Uc_Sc/libffi_Srust_Ucalling_Uc_Sc_Slibnative_Umatrix_Uso.so' (no such file), '/usr/local/lib/libffi_Srust_Ucalling_Uc_Sc_Slibnative_Umatrix_Uso.so' (no such file), '/usr/lib/libffi_Srust_Ucalling_Uc_Sc_Slibnative_Umatrix_Uso.so' (no such file)
================================================================================
Are there any workarounds to get runtime linking working on MacOS? It seems like the PR that was supposed to fix it in Bazel 4.2 was reverted.