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
[SR-10539] swift-api-digester: can't get it to work on Linux #52939
Comments
cc @akyrtzi |
It seems to me like you copied the `swift-api-digester` binary to some `/Users/johannes/devel/swift-nio` directory and try to run it from there, is this correct ? If this is correct and I did not misunderstood then this is not going to work, the same way it's not going to work if you copy the swift binary out of the toolchain and try to run it. You should run `swift-api-digester` from inside the toolchain it came with. I cannot guarantee it will definitely work though, we haven't tried to run it on linux. |
@akyrtzi aaah, sorry! Yes, you are absolutely right 🙂. Let me copy it next to |
@akyrtzi that gets us to the same point as after the symlink:
|
Where did you get it from, you should not be copying it at all, try running it from the OSS toolchain it came with (after making sure the same OSS toolchain was used to build swift-nio). |
@akyrtzi the OSS toolchains don't ship it:
So @tomerd built it from source and I'm copying it into the OSS toolchain of the same version. So they should be compatible I'd assume. |
That "Objective-C pointer type" bit is suspect. That kind of sounds like it's building for an Apple target. What happens if you pass an explicit -target? |
@belkadan I tried it with
|
Could you try with an OSS toolchain that already contains it ? And build swift-nio using the same toolchain before using it. |
it was compiled off the swift-5.0-branch on ubuntu 18.04. i don’t think it ships with the linux distributable, which is why we compiled it ourselves |
The binary is in latest snapshots, master and swift-5.1 |
Thanks @akyrtzi. I tried with the latest 5.1 snapshot, same issue:
|
even with the Swift toolchain installed in
|
@akyrtzi here's also a one-line repro that you can run straight from your Mac (or Linux obvs):
|
I can reproduce. I suspect this tool needs a '-disable-objc-interop' option. Or for something fancier disable it automatically like the driver does. |
@akyrtzi Cool, thanks, that makes sense. On Linux it could also just always disable objc interop, right? |
looks like this should fix it: #24776 |
I can confirm it now works on Linux, thanks so much @nkcsgexi! |
No worries, @weissi. Please let us know any issues or feature requests you may have for this tool 🙂 |
thank you @nkcsgexi, we will definitely do that. We're working on using it in SwiftNIO's CI system! Btw, did you see https://bugs.swift.org/browse/SR-10489 ? |
ah, I just self-assigned the issue and will take a look. |
Additional Detail from JIRA
md5: 053bdb70bea20d227cceaf10b751fc9b
Issue Description:
When I try to run swift-api-digester on Linux, I get
One of the issues seems to be that it assumes
Swift.swiftmodule
in one of those places:which doesn't make much sense. Just to see where we get, I've made a symlink
and sure enough, we're getting quite a bit further:
but now swift-api-digester seems to think that we have ObjC support enabled on Linux...
Version is 5.0.1.
The text was updated successfully, but these errors were encountered: