You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
building a project using the SDK with swift build --swift-sdk aarch64-swift-linux-musl will fail because aws-crt-swift/aws-common-runtime/aws-c-common/source/posix/system_info.c tries to include execinfo.h
After removing this manually, it fails again in .build/checkouts/smithy-swift/Sources/ClientRuntime/Networking/Http/CRT/CRTClientEngine.swift since it only checks for Glibc on Linux, which is not available using the static Linux SDK. When canImport(Musl), that should be imported instead.
This is necessary to be able to build a binary using the aws swift sdk in a machine (running either Linux or macOS) and then install the binaries to be used in some other linux machine without the need of copying (possibly incompatible) dynamic libraries/shared objects along with it.
Proposed Solution
allow fort the system to not have execinfo.h
In swift files, also check for canImport(Musl), not only Glibc
both steps may have other consequences in code that requires Darwin or Glibc
Other Information
No response
Acknowledgements
I may be able to implement this feature request
This feature might incur a breaking change
The text was updated successfully, but these errors were encountered:
Hi @marcelo-paredes! Thanks for bringing this up. Until now, we hadn't really looked at statically-linked Linux binaries.
aws-crt-swift is maintained by a different team, their repo is at https://github.com/awslabs/aws-crt-swift . I suggest you file an issue there for the best response.
Describe the feature
building a project using the SDK with
swift build --swift-sdk aarch64-swift-linux-musl
will fail becauseaws-crt-swift/aws-common-runtime/aws-c-common/source/posix/system_info.c
tries to include execinfo.hAfter removing this manually, it fails again in
.build/checkouts/smithy-swift/Sources/ClientRuntime/Networking/Http/CRT/CRTClientEngine.swift
since it only checks for Glibc on Linux, which is not available using the static Linux SDK. When canImport(Musl), that should be imported instead.Use Case
This is necessary to be able to build a binary using the aws swift sdk in a machine (running either Linux or macOS) and then install the binaries to be used in some other linux machine without the need of copying (possibly incompatible) dynamic libraries/shared objects along with it.
Proposed Solution
both steps may have other consequences in code that requires Darwin or Glibc
Other Information
No response
Acknowledgements
The text was updated successfully, but these errors were encountered: