rules_rust icon indicating copy to clipboard operation
rules_rust copied to clipboard

Enable `@examples//ffi/rust_calling_c:matrix_dylib_test` on Darwin once we are on Bazel >= 4.2

Open hlopko opened this issue 4 years ago • 3 comments

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

hlopko avatar Aug 10 '21 07:08 hlopko

@illicitonion This can probably be done now that 4.2.0 is out.

UebelAndre avatar Aug 28 '21 17:08 UebelAndre

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)
================================================================================

UebelAndre avatar Jul 02 '22 12:07 UebelAndre

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.

purkhusid avatar Sep 14 '22 12:09 purkhusid