-
-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
brew install zig
installs broken zig: Unable to find target for this triple (no targets are registered)
#53198
Comments
It seems the upstream install instructions create a broken install as you figured out. Can you cross-post of there's new instructions there? |
yes, please keep this open though to make life easy towards a fix |
Here's how homebrew can fix this immediately:
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -384,6 +384,9 @@ target_link_libraries(zig_cpp LINK_PUBLIC
${CLANG_LIBRARIES}
${LLD_LIBRARIES}
${LLVM_LIBRARIES}
+ "-Wl,/usr/local/opt/llvm/lib/libPolly.a"
+ "-Wl,/usr/local/opt/llvm/lib/libPollyPPCG.a"
+ "-Wl,/usr/local/opt/llvm/lib/libPollyISL.a"
)
add_library(opt_c_util STATIC ${OPTIMIZED_C_SOURCES}) This will solve the problem until LLVM 10.0.1 is released with a fix to https://bugs.llvm.org/show_bug.cgi?id=44870. |
ziglang/zig#5092 would avoid having to patch |
I'll look at the situation tomorrow - it's quite late here. From first glance, I'm happy with either way. |
Looks like Zig has many other linkage issues depending on the build environment where LLVM is built. I explicitly disabled z3 support here: e3753ac. It wasn't activated in the bottles we built, but it may have been for those who build from source and had z3 installed already. There is likely more. As such, I can only realistically provide support for Zig when LLVM and/or Zig is installed from a bottle. The short-term patch for Polly is now applied to the Zig formula. Please run |
Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
brew update
and can still reproduce the problem?brew doctor
, fixed all issues and can still reproduce the problem?only irrelevant unrelated issues
brew gist-logs <formula>
(where<formula>
is the name of the formula that failed) and included the output link?brew gist-logs
didn't work: ranbrew config
andbrew doctor
and included their output with your issue?NA
What you were trying to do (and why)
brew install zig
(tried both
brew install zig
andbrew install --build-from-source zig
(after brew uninstall zig))this works, see gist: https://gist.github.com/timotheecour/f7dc4baa86f256695307731e35177dde
then use it:
zig build-exe --c-source thelloc.c --library c
What happened (include command output)
Unable to find target for this triple (no targets are registered)
What you expected to happen
works, just like it does when I download and unzip https://github.com/ziglang/zig/releases/download/0.6.0/zig-macos-x86_64-0.6.0.tar.xz and use
export PATH=/Users/timothee/Downloads/zig-macos-x86_64-0.6.0/:$PATH
Step-by-step reproduction instructions (by running
brew install
commands)see above
links
root cause of ziglang/zig#5055
The text was updated successfully, but these errors were encountered: