Skip to content
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

Cannot build on linux via docker from mac, due to S2N #961

Closed
tadelv opened this issue Apr 16, 2023 · 2 comments
Closed

Cannot build on linux via docker from mac, due to S2N #961

tadelv opened this issue Apr 16, 2023 · 2 comments
Assignees
Labels
area/aws-crt Code change required in AWS CRT Swift bug This issue is a bug.

Comments

@tadelv
Copy link

tadelv commented Apr 16, 2023

Describe the bug

When trying to build aws-sdk-swift on Linux (docker Amazon Linux 2) from a Mac, an unexpected error occurs when trying to build S2N from aws-crt-swift.

error: 'aws-crt-swift': target 'S2N' has invalid header layout: umbrella header found at '/workspace/.build/checkouts/aws-crt-swift/aws-common-runtime/s2n/api/S2N.h', but directories exist next to it: /workspace/.build/checkouts/aws-crt-swift/aws-common-runtime/s2n/api/unstable; consider removing them
error: ExitCode(rawValue: 1)

I'm just adding this report in order to track when the aws-crt-swift changes will be merged into the sdk.

Expected Behavior

build should not fail

Current Behavior

Error pasted above

Reproduction Steps

Create a Swift package, add aws-sdk-swift as a dependency, build on Mac using Docker and amazonlinux2.

Or use my repo: https://github.com/tadelv/stars-and-planets.git, switch to branch feature/lambda , enter StarsAndPlanetsLambda folder and type (in terminal) $Scripts/build-and-package.sh

Possible Solution

Probably update dependencies when this is fixed/merged:

awslabs/aws-crt-swift#179

Additional Information/Context

It seems that this issue also happens because the default macOS volume is not case-sensitive:

awslabs/aws-crt-swift#163 (comment)

Creating another Volume, that is case-sensitive and building the project there seems to work around this issue.

AWS SWIFT SDK version used

0.14.0

Compiler and Version used

Swift 5.7

Operating System and version

MacOs 13, swift:amazonlinux2

@tadelv tadelv added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 16, 2023
@jbelkins
Copy link
Contributor

Thanks for your report. This is a known issue in the aws-crt-swift project, as you noted. We are currently working on a solution.

We will update this ticket when the issue is fixed in this SDK.

@jbelkins jbelkins added area/aws-crt Code change required in AWS CRT Swift and removed needs-triage This issue or PR still needs to be triaged. labels Apr 17, 2023
@epau epau changed the title Cannot build on linux due to S2N Cannot build on linux via docker from mac, due to S2N Apr 17, 2023
@jbelkins
Copy link
Contributor

This will be fixed in the next release of AWS SDK for Swift.

@jbelkins jbelkins self-assigned this May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/aws-crt Code change required in AWS CRT Swift bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants