Comments (9)
The main and only notable difference between your steps and mine is that you are using AL2 or Ubuntu as host, and I'm using macOS.
But I finally found out the cause of my issue: my file system is case-insensitive 😠.
On macOS, default APFS volume is case-insensitive. When I did my steps with the mounted folder located in a case-sensitive APFS volume, I succeed in compiling aws-crt-swift.
This is due to this code in SPM:
let umbrellaHeader = publicHeadersDir.appending(component: moduleName + ".h")
if fileSystem.isFile(umbrellaHeader) {
// In this case, 'PublicHeadersDir' is expected to contain no subdirectories.
if directories.count != 0 {
diagnosticsEmitter.emit(.umbrellaHeaderHasSiblingDirectories(targetName: targetName, umbrellaHeader: umbrellaHeader, siblingDirs: directories))
return .none
}
return .umbrellaHeader(umbrellaHeader)
}
SPM will look for the S2N.h
file, which is the same as s2n.h
on a case-insensitive file system, but not on a case-sensitive file system like on AL2 or Ubuntu.
from aws-crt-swift.
Thank you, that's great debugging! I was able to successfully reproduce the issue, and I'm currently looking into possible solutions.
from aws-crt-swift.
Hi, we have fixed this issue in 0.12.0 release. Please feel free to reopen the issue if it still exists.
from aws-crt-swift.
FYI I was able to verify that this issue is fixed when I use 0.12.0 in AWS SDK for Swift
from aws-crt-swift.
Hi,
Thank you for creating the issue. I have tried it on both Amazon Linux 2 and Ubuntu 22.04 but could not reproduce the issue. It works fine for both. Could you please try cloning it again and building it? Also, you will need to install OpenSSL, please do the following.
For Ubuntu:
apt-get install openssl
apt-get install libssl-dev
For Amazon Linux 2:
yum install openssl
yum install openssl-devel
from aws-crt-swift.
Hi,
Thank you for your answer.
I tried with the swift:5.7-amazonlinux2
container image, and I succeed to reproduce the bug, but only if the repository was cloned on the host and mounted within a volume inside the container.
git clone --recurse https://github.com/awslabs/aws-crt-swift.git
cd aws-crt-swift
podman run -it --rm --volume "$(pwd)/:/src" --workdir "/src/" swift:5.7-amazonlinux2 swift build
I cannot reproduce if I clone the repository in the container.
I had the same ref for aws-crt-swift (0.6.1), and s2n submodule (v1.3.35)
Any ideas ?
from aws-crt-swift.
Hi,
Thank you for your answer. I have tried using both podman and docker to mount the source code, and I am able to do so without encountering any build issues. Could you please try cloning the repository again on the host to see if that resolves the problem? Thank you.
from aws-crt-swift.
Hi,
I cloned again the repository (now on commit ccec2f7
).
I've tried again on my machine (macOS 13.2.1 on Apple Silicon M1 Pro), and on another Mac (macOS 13.0.1, Intel), both with podman version 4.4.1 with vm Fedora CoreOS 37.X, unsuccessfully.
I've also tried with various versions of the container image swift:5.X-amazonlinux2
, unsuccessfully.
from aws-crt-swift.
Thank you for the response. Can you please explain a bit more about the steps that you are taking to encounter this issue, or what am I missing below?
- Create an AL2 or Ubuntu EC2 instance.
- SSH into the instance and clone the aws-crt-swift repository recursively using
git clone --recurse https://github.com/awslabs/aws-crt-swift.git
. - Install Podman/Docker.
- Run a
swift:5.X-amazonlinux2 container
using Podman/Docker and mount the code directory. - SSH into the container.
- do
yum install openssl-devel
. - do Swift build, and it works.
from aws-crt-swift.
Related Issues (20)
- Fix `ecs` credential provider HOT 1
- Expose additional API for creating a STS Web Identity Credential Provider HOT 1
- Process Credentials Provider HOT 1
- Use of GCD in asynchronous context
- Provide public init for TracingAllocator that doesn't require access to default allocator HOT 1
- Cognito Credential Provider - CRT Analysis HOT 3
- feat: Create Swift bindings for Cognito Credentials Provider
- Concurrent SES and DynamoDB use in Lambda causes Fatal error: Tls Context failed to create. HOT 4
- Add Swift support for flexible checksums HOT 2
- Support for AssumeRole Chain HOT 2
- Disable Fallback to IMDSv1 HOT 1
- posix_memalign failed to allocate memory when calling SDK with expired or missing credentials HOT 3
- Drop Swift 5.5 & 5.6 support HOT 1
- Access to private Apple APIs prevents acceptance to App Store HOT 4
- Enable HW Based Implementation for Checksum Algorithms HOT 2
- Specialize HTTP client for Apple platform to fix the connection issue while running in the background HOT 3
- Crash occurring when trying to force unwrap possible nil response header HOT 7
- Add support for writeChunk HOT 1
- Move MD5 hashing to a Data extension and return Data type directly + rename all checksum functions with `compute` prefix HOT 1
- AwsCommonRuntimeKit potentially needs a privacy manifest HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-crt-swift.