Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to compile on Darwin aarch64 using Nix's llvm 11 #31

Closed
bbhoss opened this issue Jul 26, 2023 · 2 comments · Fixed by #32
Closed

Fails to compile on Darwin aarch64 using Nix's llvm 11 #31

bbhoss opened this issue Jul 26, 2023 · 2 comments · Fixed by #32

Comments

@bbhoss
Copy link

bbhoss commented Jul 26, 2023

Similar to #28, I'm having this issue on Darwin too using nix's llvm.

==> exile
mkdir -p priv
clang -I/nix/store/jn1dk40cm39cxmnd1g4fa3zl89zylzbi-erlang-25.2.1/lib/erlang/usr/include -fPIC -undefined dynamic_lookup -dynamiclib -Wextra -Wall -Werror -Wno-unused-parameter -pedantic -std=c99 -O2 -fsanitize=undefined c_src/exile.c -o priv/exile.so
ld: file not found: /nix/store/bwscr98440mhhlg556fqhp5ll2fxnfic-clang-wrapper-11.1.0/resource-root/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:22: priv/exile.so] Error 1

I removed the statement from the darwin block like your fix for #28 and confirm that it fixes my issue as well. I confirmed that this library compiles cleanly on standard Mac so it's definitely due to my Nix config but I am using a different version of llvm. I can understand if you don't want to support this configuration but as far as I can tell it's a blocker for me because Nix's llvm seems like it doesn't support this. As you mentioned a proper fix would be to detect if UBSan is available and functional :)

@akash-akya
Copy link
Owner

akash-akya commented Jul 27, 2023

Hi @bbhoss, thanks for reporting the issue.
I think we have to remove ubsan, till we do a proper fix to dynamically enable it.
I'll push the changes soon

@akash-akya
Copy link
Owner

@bbhoss its removed and released v0.7.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants