-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[sourcekitd-test] Remove LLVM Core static library that is getting linked twice #29454
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
Conversation
@swift-ci please test |
The fact this passes the CI implies this library is already linked elsewhere on the CI too (or extremely unlikely, the Swift compiler tests never invoke anything from it 😉 ). That means there's some linking issue where linking this static library twice will sometimes cause problems, as it did for me and Daniel, though I don't know what that ELF or linker issue would be. |
BTW, I am also seeing the same issue in my local Linux builds ( |
/cc @benlangmuir @rintaro which has been working in this lately @compnerd: seems that you added the original |
This seems wrong. |
I just experimented with this on an Android host by removing each library on this line one by one, and it turns out that simply deleting this line completely had no effect on linking and running
Maybe this line can be deleted altogether because of the recent LLVM monorepo or other config changes? |
@compnerd: it might seem wrong, but as the build results prove, it doesn't seem necessary, and fixes the build for several people. I don't understand where the double linking is coming from, but looking at the code of @swift-ci please test |
Build failed |
Build failed |
CI failures are spurious and it says they were restarted, but I don't know where those are. |
This is the failure:
(from https://ci.swift.org/job/swift-PR-osx/18140/console) Seems that some of those libraries are necessary in macOS. |
Thanks, looks like it passed on linux, just like it did for me on Android. Should I add |
This library is already supplied by the LLVM CMake config, so adding it here sometimes causes the CommandLine option parser to fail, as it registers the same option twice.
Tracked down when those last two dependencies were added, 8531c5d three years back, apparently for linux. I searched for those two functions he mentioned, but only found the Since I don't know how and when those dependencies are pulled in and it's untested by the linux CI, I just added them back in to be safe. @alblue, let us know if anything has changed. This pull just removes the clearly redundant LLVMCore library now, which seems to already be supplied by the LLVM config elsewhere on all platforms. |
They were a necessary inclusion at the time, but if it can be built without them then they can be removed as far as I am concerned. I'm not working on the sourcekit or related functionality any more though. |
@swift-ci please test |
Ping, ready to go? |
On Linux and Android, this Core library is presumably already supplied by the LLVM CMake config, so adding it here causes the CommandLine option parser to fail as it registers the same option twice.
I have not dug into exactly where the previous dependency's coming from or why it changed, but I can consistently reproduce since late last year on an Android host and in the one time I tried it on Arch Linux x86_64. What happens is that any invocation of sourcekitd-test fails with this error, after building with this command on Linux x86_64:
@drodriguez says he's seen this intermittently in Linux too, "Yes, I have seen this in one my setups (a chrooted Ubuntu in a CentOS), but I think only from time to time. I couldn't find a reason why this is not happening in CI."
@compnerd, you last modified this line to remove another LLVM library, so maybe you know what's going on.