-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
llvm: fix advertise of libxml2.tbd as system-libs #61005
Conversation
@bcardiff Is this PR a solution to this problem? clang++ -g test.cpp `llvm-config --cxxflags --ldflags --system-libs --libs core mcjit native` -O3 -o test
ld: library not found for -llibxml2.tbd
clang-10: error: linker command failed with exit code 1 (use -v to see invocation) |
Is this also submitted upstream? |
@huanghantao yes @SMillerDev the patch was extracted from change in upstream master, but they were not ported to the 10.x maintenance branch. |
97c77e1
to
42c3012
Compare
CI passed. Patch files now references a commit in master branch of the patches repo. FYI, The pull request instructions does not validate some checks regarding the order of some methods in the formula. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bcardiff ! Without contributions like yours it'd be impossible to keep homebrew going with the high standards that users have come to expect from the project. You can feel good knowing that you've made the world a tiny bit better for homebrew users around the world! 👍 🎉
🤖 A scheduled task has triggered a merge. |
Thanks @SMillerDev. Although I use llvm, I know nothing of the llvm code itself and nothing of CMake. Yet, with git and a bit patience it was enough to make the fix. I appreciate the recognition. I know at least that Crystal osx devs and its CI will be happier now at least. That was what pushed me forward. I sent the patch to llvm just in case also at https://reviews.llvm.org/D87590 |
Dlang OSX devs say hi, and thanks a mil for the fix and follow up! |
The bug it was working around has been fixed in Homebrew#61005
Open source at it's finest 👌 |
Appreciate everyone's effort here as I too was hitting this issue. After updating to 10.0.1_1, I still see Note: I ran |
I can confirm the 10.0.1_1 bottle is still advertising the libxml2.tbd, but when building the formula from source everything is good.
|
This is going to make Zig users happy, too. Thanks for that fix! |
Looks like even after rebuilding from source, |
I'm up to date and linking against llvm is still throwing "ld: library not found for -llibxml2.tbd" |
Without any guidance of why --build-from-source locally gives a different result than the bottle I'm in a blind spot regarding this. Maybe it would be better to rollback 10.0.1 in brew and leave the latest 10.0.0 bottle until 10.0.1 is patched correctly (note that that will probably help for 11.0.0) |
Does having libxml (from Homebrew, not the system one) installed before compiling llvm 10.0.1 make a difference? |
I also made the mistake up upgrading to the latesst release of XCode, and LLVM 10.0.1 hasn't caught up on the toolchain yet, so my source build errors out with:
😞 |
I've been trying to figure out how to pin to an earlier version, but many of the docs and suggests are unclear (I'm fairly new to this) and the one method that seemed to work has moved from 'deprecated' to 'removed'. |
when I ran Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> Updated Formulae
Updated 128 formulae.
==> New Casks
copytranslator home-assistant
==> Updated Casks
activedock cytoscape jami latexdraw netnewswire odrive parallels react-native-debugger shift vuescan wondershare-uniconverter
chromium disk-drill kext-updater metasploit netron osquery postbox rotato tinymediamanager webcatalog wrike
Error: No available formula with the name "Formula/llvm.rb"
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found. then I did some random guess, and tried |
@jedisct1 having or not brew's libxml2 installed before building from source leads to the same result for me. @garybernhardt you would need to checkout this repo and from that working directory run the --build-from-source. Formula/llvm.rb will be a valid path there. That's at least how I do it while working on PRs for brew. |
Can this issue be reopened and the update to 10.0.1_1 be reverted? |
Building from source works, but isn't a great experience. |
It doesn't even seem that building from source works for all, see a couple of comments up: #61005 (comment) |
Since I don't know what is different between the working environment and those that don't work, I send #62480 since it's the only actionable from my side right now. |
For those who have rebuilt from source without success: can you report your versions of macOS and XCode / CommandLineTools? Building LLVM asked me to upgrade my CommandLineTools to the ones for XCode 12 (and Apple must have done something wrong, but that worked eventually). |
Ref: https://discourse.brew.sh/t/llvm-config-10-0-1-advertise-libxml2-tbd-as-system-libs/8593
Depends on: Homebrew/formula-patches#303