Closed
Description
Expected behavior
I'd like to be able to build the lambdas for Arm using a Linux host, because a buying a chonky Raspberry Pi is much cheaper than a new MacBook with Apple Silicon:
swift package archive --allow-network-connections docker
Actual behavior
The archiving stage fails with a permission error:
{lots of build output deleted}
[495/497] Compiling SuggestionGetFunction SuggestionGet.swift
[495/497] Write Objects.LinkFileList
/usr/lib/swift_static/linux/libFoundationEssentials.a(FoundationEssentials-1.o):FoundationEssentials-1.o:function $s20FoundationEssentials19createTemporaryFile33_FC9EC52B075D2ACCFF86F1C9F84293BELL2at6inPath6prefix7optionss5Int32V_SStSS_AA0Q5OrURLOSSAA4DataV14WritingOptionsVtKFTf4nnnd_n: warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
/usr/lib/swift_static/linux/libFoundationEssentials.a(FoundationEssentials-1.o):FoundationEssentials-1.o:function $s20FoundationEssentials19createTemporaryFile33_FC9EC52B075D2ACCFF86F1C9F84293BELL2at6inPath6prefix7optionss5Int32V_SStSS_AA0Q5OrURLOSSAA4DataV14WritingOptionsVtKFTf4nnnd_n: warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
/usr/lib/swift_static/linux/libFoundationEssentials.a(FoundationEssentials-1.o):FoundationEssentials-1.o:function $s20FoundationEssentials19createTemporaryFile33_FC9EC52B075D2ACCFF86F1C9F84293BELL2at6inPath6prefix7optionss5Int32V_SStSS_AA0Q5OrURLOSSAA4DataV14WritingOptionsVtKFTf4nnnd_n: warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
/usr/lib/swift_static/linux/libFoundationEssentials.a(FoundationEssentials-1.o):FoundationEssentials-1.o:function $s20FoundationEssentials19createTemporaryFile33_FC9EC52B075D2ACCFF86F1C9F84293BELL2at6inPath6prefix7optionss5Int32V_SStSS_AA0Q5OrURLOSSAA4DataV14WritingOptionsVtKFTf4nnnd_n: warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
/usr/lib/swift_static/linux/libFoundationEssentials.a(FoundationEssentials-1.o):FoundationEssentials-1.o:function $s20FoundationEssentials19createTemporaryFile33_FC9EC52B075D2ACCFF86F1C9F84293BELL2at6inPath6prefix7optionss5Int32V_SStSS_AA0Q5OrURLOSSAA4DataV14WritingOptionsVtKFTf4nnnd_n: warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
[496/497] Linking SuggestionGetFunction
Build of product 'SuggestionGetFunction' complete! (482.85s)
-------------------------------------------------------------------------
archiving "SuggestionGetFunction"
-------------------------------------------------------------------------
error: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission."
make: *** [Makefile:53: build-single-product] Error 1
(Wild guess: maybe this is due to the Docker container running as root, so the build artefacts are owned by root? ¯\_(ツ)_/¯ )
Steps to reproduce
- fresh installation of Ubuntu 24.10
- install
make
andzip
- install Swift 6.0.3 from tarball
- install the Docker engine using their installation docs
- clone my lambda repo
swift package archive --allow-network-connections docker
If possible, minimal yet complete reproducer code (or URL to code)
No response
What version of this project (swift-aws-lambda-runtime
) are you using?
Swift version
Swift version 6.0.3 (swift-6.0.3-RELEASE)
Target: aarch64-unknown-linux-gnu
Linux heslop 6.11.0-1005-raspi #5-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 22 13:24:30 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
Amazon Linux 2 docker image version
SWIFT_PLATFORM=amazonlinux2, SWIFT_BRANCH=swift-6.0.3-release