-
Notifications
You must be signed in to change notification settings - Fork 30
SwiftPM doesn't work in the Linux build #713
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
Comments
This is apparently needed for SwiftPM to cross-compile on Linux, which I think causes #713.
I got some progress here, turns out we don't copy enough
Now after pasting that
The most peculiar bit here is I've spent a lot of time trying to understand where this |
@MaxDesiatov Thanks for update.
The default sysroot path is hardcoded in https://github.com/swiftwasm/wasi-sdk/blob/swiftwasm/Makefile#L6. |
This doesn't seem to be an issue with SwiftPM, but an issue with our build of clang. In our Linux build both After I copy
|
Or, to paraphrase it, the problem is that our build of clang uses |
This is definitely a problem with our #include <stdio.h>
int main() {
return 0;
} fails to compile:
Passing sysroot explicitly doesn't help when invoked this way |
@MaxDesiatov
|
I understand that, but the problem as I described above is that we need
|
To clarify, |
@MaxDesiatov Oh, sorry I misunderstood what you said 🙇 |
Here's what happens with our
|
@MaxDesiatov I found the reason for this issue. So we need to build the clang for X64, or don't use the wasi-sdk version clang and copy clang from |
Yeah, that's my theory as well 👍 |
lld is not included in the build bin directory, so please add flag |
Maybe we could copy just |
Yes, we can copy them from wasi-sdk. It's OK at this time. But honestly saying, I want to remove wasi-sdk dependency from this project because it's hard to sync llvm version between them. If we don't need to copy binaries from wasi-sdk, we only need to copy wasi-libc's wasi-sysroot to the toolchain. It's simpler than current build steps. P.S. |
Awesome, thanks! I'll keep the possible LLVM version incompatibility in mind. |
SwiftPM works fine in the macOS build of our toolchain, but it fails in the Linux build as can be seen in this WASFoundation CI run:
The text was updated successfully, but these errors were encountered: