Skip to content

missing c++ interop components in toolchain build for Windows #67462

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

Closed
compnerd opened this issue Jul 22, 2023 · 12 comments · Fixed by swiftlang/swift-installer-scripts#218
Closed
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. c++ interop Feature: Interoperability with C++ swift 5.9 triage needed This issue needs more specific labels Windows Platform: Windows

Comments

@compnerd
Copy link
Member

Building the latest 5.9 snapshot fails to package due to missing files.

https://dev.azure.com/compnerd/swift-build/_build/results?buildId=61846&view=logs&j=3d6d6336-35c7-5975-2a77-9c4cad333d2b&t=abe84523-3dab-5ac8-8c4b-5a986786345c

##[error]platforms\Windows\sdk-amd64.wxs(449,0): Error WIX0103: Cannot find the File file 'D:\a\1/windows-sdk-amd64/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk\usr\lib\swift\windows\x86_64\libcxxshim.h'. The following paths were checked: D:\a\1/windows-sdk-amd64/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk\usr\lib\swift\windows\x86_64\libcxxshim.h
##[error]platforms\Windows\sdk-amd64.wxs(453,0): Error WIX0103: Cannot find the File file 'D:\a\1/windows-sdk-amd64/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk\usr\lib\swift\windows\x86_64\libcxxshim.modulemap'. The following paths were checked: D:\a\1/windows-sdk-amd64/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk\usr\lib\swift\windows\x86_64\libcxxshim.modulemap

We are failing to install libcxxshim.h and libcxxshim.modulemap.

@compnerd compnerd added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. c++ interop Feature: Interoperability with C++ Windows Platform: Windows triage needed This issue needs more specific labels swift 5.9 labels Jul 22, 2023
@hyp
Copy link
Contributor

hyp commented Jul 25, 2023

@compnerd is that something you're going to be fixing for 5.9?

@compnerd
Copy link
Member Author

I think that we should fix this for 5.9. If you can get it fixed before I can that would be great - but this is blocking the Windows releases on 5.9 :-(.

@hyp
Copy link
Contributor

hyp commented Jul 25, 2023

Cc @egorzhdan do you know what's going wrong here?

@hyp
Copy link
Contributor

hyp commented Jul 26, 2023

@compnerd why do we need them to be under x86_64\libcxxshim.modulemap? they should be just in windows I believe. What kind of check is looking for these files?

@compnerd
Copy link
Member Author

The installer places them at x86_64, I couldn't really tell you why that path over the architecture agnostic one (I suspect that it is where it is on the other platforms as well).

https://github.com/apple/swift-installer-scripts/blob/release/5.9/platforms/Windows/sdk-amd64.wxs#L447-L455

@hyp
Copy link
Contributor

hyp commented Jul 27, 2023

We need:

- windows/ibcxxshim.h
- windows/libcxxshim.modulemap
- windows/libcxxstdlibshim.h

to match what we do for linux . On linux we don't put them under x86_64.

@compnerd
Copy link
Member Author

Oh! I think I know whats happening. swiftlang/swift-installer-scripts#213 was not merged into release/5.9!

@compnerd
Copy link
Member Author

It seems that we aren't packaging libcxxstdlibshims.h on windows, is that supposed to be distributed as well?

compnerd added a commit to compnerd/swift-installer-scripts that referenced this issue Jul 27, 2023
This adjusts the Windows installation logic after the changes in swiftlang/swift#66765

rdar://110788977

Fixes: swiftlang/swift#67462
@egorzhdan
Copy link
Contributor

It seems that we aren't packaging libcxxstdlibshims.h on windows, is that supposed to be distributed as well?

Yes, we'll need that on Windows to get the swiftCxxStdlib module (the overlay for the C++ stdlib) working.

compnerd added a commit to swiftlang/swift-installer-scripts that referenced this issue Jul 27, 2023
This adjusts the Windows installation logic after the changes in swiftlang/swift#66765

rdar://110788977

Fixes: swiftlang/swift#67462
compnerd added a commit to compnerd/swift-installer-scripts that referenced this issue Aug 3, 2023
This file was not being packaged into the installer, which gives us an
incomplete module.

Partially fixes: swiftlang/swift#67462
compnerd added a commit to compnerd/swift-installer-scripts that referenced this issue Aug 3, 2023
This file was not being packaged into the installer, which gives us an
incomplete module.

Fixes: swiftlang/swift#67462
@compnerd
Copy link
Member Author

compnerd commented Aug 3, 2023

Okay, the last bit for this is up and waiting for CI before I merge the changes. This gets part of the problem resolved I think.

compnerd added a commit to swiftlang/swift-installer-scripts that referenced this issue Aug 4, 2023
This file was not being packaged into the installer, which gives us an
incomplete module.

Partially fixes: swiftlang/swift#67462
@compnerd compnerd reopened this Aug 4, 2023
@compnerd
Copy link
Member Author

compnerd commented Aug 4, 2023

The 5.9 issue stands here still.

compnerd added a commit to swiftlang/swift-installer-scripts that referenced this issue Aug 4, 2023
This file was not being packaged into the installer, which gives us an
incomplete module.

Fixes: swiftlang/swift#67462
@compnerd
Copy link
Member Author

compnerd commented Aug 5, 2023

5.9 packaging for this component is done. There is still CxxStdlib to package up, but that requires a bit more preparation.

@compnerd compnerd closed this as completed Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. c++ interop Feature: Interoperability with C++ swift 5.9 triage needed This issue needs more specific labels Windows Platform: Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants