-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
[D148266] [clang][driver] Linking to just-built libc++.dylib when bootstrapping libc++ with clang #77653
Comments
@llvm/issue-subscribers-clang-driver Author: Louis Dionne (ldionne)
This issue tracks picking up https://reviews.llvm.org/D148266 from the Phabricator archive.
Also related to rdar://107060541. |
I just built with your patch, but I'm getting...
I even rebuilt the runtimes with a second stage using the installed llvm, but that didn't work either. |
Working llvm 17.0.6 vs non-working llvm 18.1.0...
|
Seems like something with libcxx is messed up. Or maybe because I configured libunwind this time? |
I also tried manually changing libcxx's rpath out to the llvm 18.1.0 binary ...
But, when I do that, (or, if I deploy my working llvm17 to
|
Looks like
|
I tried disabling libunwind, and this happens...
|
OK, with your patch, everything works! Thanks a lot. I ended up having some issues where I was pulling in binaries from Here's my build script for anyone else who is seeing these issues. My problems were RPATH related. I had to remove a libzstd that was linked to a libc++ that no longer existed.
|
Also, if your
(where This is the issue that @ldionne was talking about. With the bootstrapped build (i.e. building the runtimes and the projects with a single If you look at the binary with
The other odd thing I've been seeing is that the boostrap build doesn't deploy
If I compile the runtimes separately and install them separately, the installation does deploy to |
Just compiled 18.1.3, and it still has issues. Is x86_64 not supported on macOS at this point? It's nearly impossible to get this to install correctly. Also, this diff isn't in 18.1.3. What's the best way to build at this point? Use XCode 15 to build clang 18.1.3, and then clang 18.1.3 to compile the runtimes in two steps? |
@hoyhoy I would like to kindly ask that you stop pinging this issue without additional information. We are aware of this bug, we understand it and we will get to it eventually. In the meantime, posting walls of text here is just making things more confusing. So let's please restrict this issue to new and useful information. |
OK, if you're aware of the issue and it's not fixed, and you haven't even merged the fix, why are you closing the issue? Just a helpful hint -- here's how LITERALLY EVERY OTHER SOFTWARE PROJECT DOES IT... (1) Fix issue. |
I posted all the errors in case anyone else had the problem. As for the solution, what worked for me is building the all the runtimes in a separate stage and manually specifying the RPATHs to my INSTALLed PATH.
|
@ldionne thanks again for the non-help! |
I closed #84392 cause it's a duplicate of this, and having duplicate issues lying around doesn't help anyone, it just creates confusion. And then you proceeded to spam the hell out of this thread. Please don't interact here again until you've learned to do it properly. |
For a couple of different reasons, I utilize a compiler wrapper script on macOS. An easy workaround that can be done without patching / recompiling clang is to simply add |
@sztomi I created a
I don't understand why I have to specifically link |
The latter temporary workarounds llvm/llvm-project#77653 (and llvm/llvm-project#84392)
The latter temporary workarounds llvm/llvm-project#77653 (and llvm/llvm-project#84392)
I'm not sure this is the same problem, but I'm trying to compile things with llvm 18.1.5 on macos 12.6.5 (ARM) and still run into this after upgrading the compiler:
With test.cpp
Can I do anything to work around this? |
I'm currently using the workaround commented here. |
@ldionne thankfully, I "spammed" the issue with my error log. |
The runtime cmake for llvm has so many bugs. I'm still having the hard-link |
Could this feature enable via command line option? |
Yes, this seems to have changed in a recent version of LLVM. We avoid this in Homebrew by making sure the appropriate https://github.com/Homebrew/homebrew-core/blob/cfa748fd18b9495aad647c8ada4304bc540baa52/Formula/l/llvm.rb#L145-L146 |
@carlocab thank you! I was actually looking for those. I based my script somewhat on this. https://src.fedoraproject.org/rpms/clang/blob/rawhide/f/clang.spec The last problem I don't understand is that the debugserver isn't working (yes, it's signed) and lldb now crashes if UBSAN throws a runtime an error. Also,
My one-stage build script is here: |
This issue tracks picking up https://reviews.llvm.org/D148266 from the Phabricator archive.
Also related to rdar://107060541.
The text was updated successfully, but these errors were encountered: