Skip to content

stm32-uart-echo Build Error #4

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
fumoboy007 opened this issue Apr 5, 2024 · 8 comments
Closed

stm32-uart-echo Build Error #4

fumoboy007 opened this issue Apr 5, 2024 · 8 comments
Assignees

Comments

@fumoboy007
Copy link

fumoboy007 commented Apr 5, 2024

I am trying to build the stm32-uart-echo example but not sure what I am doing wrong. I get the following error during the swift-build step:

<unknown>:0: error: unable to load standard library for target 'armv7em-apple-none-macho'

My build command:

TOOLCHAINS="Swift Development Snapshot 2024-04-03 (a)" make

Any ideas?

@MaxDesiatov
Copy link
Member

MaxDesiatov commented Apr 6, 2024

What's the output of swift --version after setting TOOLCHAINS this way? I suspect the value of TOOLCHAINS is wrong, I've never seen it set in this format. IIUC the top-level swift shim expects to be a plist key instead of a human readable version string.

@fumoboy007
Copy link
Author

Hi, @MaxDesiatov! Both Swift Development Snapshot 2024-04-03 (a) and org.swift.59202404031a produce the same result:

% TOOLCHAINS="Swift Development Snapshot 2024-04-03 (a)" swift --version
Apple Swift version 6.0-dev (LLVM cb4f50b342f3cf9, Swift fc5da5342ce965c)
Target: arm64-apple-macosx14.0

Here is the full build log (with some newlines to improve readability):

% TOOLCHAINS=org.swift.59202404031a make   
           
compling...
/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/bin/swift-build \
		--configuration release \
		--verbose \
		--triple armv7em-apple-none-macho \
		-Xcc -D__APPLE__ -Xcc -D__MACH__ \
		-Xswiftc -Xfrontend -Xswiftc -disable-stack-protector

warning: 'stm32-uart-echo': /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/bin/swift-frontend -frontend -c -primary-file /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/Package.swift -target arm64-apple-macosx13.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -I /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/pm/ManifestAPI -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -vfsoverlay /var/folders/kn/9dnh9mbx24zcltl6p8syx1w00000gn/T/TemporaryDirectory.fIYEGn/vfs.yaml -swift-version 5 -package-description-version 5.10.0 -disable-implicit-concurrency-module-import -disable-implicit-string-processing-module-import -empty-abi-descriptor -Xcc -working-directory -Xcc /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo -resource-dir /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift -module-name main -target-sdk-version 14.4 -target-sdk-name macosx14.4 -external-plugin-path '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/swift/host/plugins#/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server' -external-plugin-path '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/local/lib/swift/host/plugins#/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server' -plugin-path /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/host/plugins -plugin-path /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/local/lib/swift/host/plugins -o /var/folders/kn/9dnh9mbx24zcltl6p8syx1w00000gn/T/TemporaryDirectory.oSAmSg/Package-1.o

/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/bin/clang /var/folders/kn/9dnh9mbx24zcltl6p8syx1w00000gn/T/TemporaryDirectory.oSAmSg/Package-1.o -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk --target=arm64-apple-macosx13.0 /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/macosx/libswiftCompatibilityPacks.a -L /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/macosx -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/lib/swift -L /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/pm/ManifestAPI -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -L /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/pm/ManifestAPI -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -lPackageDescription -Xlinker -rpath -Xlinker /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/pm/ManifestAPI -o /var/folders/kn/9dnh9mbx24zcltl6p8syx1w00000gn/T/TemporaryDirectory.E0czcf/stm32-uart-echo-manifest

Apple Swift version 6.0-dev (LLVM cb4f50b342f3cf9, Swift fc5da5342ce965c)
Target: arm64-apple-macosx13.0
Planning build

warning: 'swift-mmio': /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/bin/swift-frontend -frontend -c -primary-file /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/checkouts/swift-mmio/Package.swift -target arm64-apple-macosx13.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -I /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/pm/ManifestAPI -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -vfsoverlay /var/folders/kn/9dnh9mbx24zcltl6p8syx1w00000gn/T/TemporaryDirectory.sn4R1Z/vfs.yaml -swift-version 5 -package-description-version 5.9.0 -disable-implicit-concurrency-module-import -disable-implicit-string-processing-module-import -empty-abi-descriptor -Xcc -working-directory -Xcc /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo -resource-dir /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift -module-name main -target-sdk-version 14.4 -target-sdk-name macosx14.4 -external-plugin-path '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/swift/host/plugins#/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server' -external-plugin-path '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/local/lib/swift/host/plugins#/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server' -plugin-path /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/host/plugins -plugin-path /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/local/lib/swift/host/plugins -o /var/folders/kn/9dnh9mbx24zcltl6p8syx1w00000gn/T/TemporaryDirectory.rSnA19/Package-1.o

/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/bin/clang /var/folders/kn/9dnh9mbx24zcltl6p8syx1w00000gn/T/TemporaryDirectory.rSnA19/Package-1.o -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk --target=arm64-apple-macosx13.0 /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/macosx/libswiftCompatibilityPacks.a -L /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/macosx -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/lib/swift -L /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/pm/ManifestAPI -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -L /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/pm/ManifestAPI -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -lPackageDescription -Xlinker -rpath -Xlinker /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/pm/ManifestAPI -o /var/folders/kn/9dnh9mbx24zcltl6p8syx1w00000gn/T/TemporaryDirectory.tkTpC7/swift-mmio-manifest

Apple Swift version 6.0-dev (LLVM cb4f50b342f3cf9, Swift fc5da5342ce965c)
Target: arm64-apple-macosx13.0

warning: 'swift-syntax': /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/bin/swift-frontend -frontend -c -primary-file /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/checkouts/swift-syntax/Package.swift -target arm64-apple-macosx13.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -I /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/pm/ManifestAPI -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -vfsoverlay /var/folders/kn/9dnh9mbx24zcltl6p8syx1w00000gn/T/TemporaryDirectory.Wc95g8/vfs.yaml -swift-version 5 -package-description-version 5.7.0 -disable-implicit-concurrency-module-import -disable-implicit-string-processing-module-import -empty-abi-descriptor -Xcc -working-directory -Xcc /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo -resource-dir /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift -module-name main -target-sdk-version 14.4 -target-sdk-name macosx14.4 -external-plugin-path '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/swift/host/plugins#/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server' -external-plugin-path '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/local/lib/swift/host/plugins#/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server' -plugin-path /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/host/plugins -plugin-path /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/local/lib/swift/host/plugins -o /var/folders/kn/9dnh9mbx24zcltl6p8syx1w00000gn/T/TemporaryDirectory.3hb3tm/Package-1.o

/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/bin/clang /var/folders/kn/9dnh9mbx24zcltl6p8syx1w00000gn/T/TemporaryDirectory.3hb3tm/Package-1.o -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk --target=arm64-apple-macosx13.0 /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/macosx/libswiftCompatibilityPacks.a -L /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/macosx -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/lib/swift -L /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/pm/ManifestAPI -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -L /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/pm/ManifestAPI -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -lPackageDescription -Xlinker -rpath -Xlinker /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/pm/ManifestAPI -o /var/folders/kn/9dnh9mbx24zcltl6p8syx1w00000gn/T/TemporaryDirectory.fZWB30/swift-syntax-manifest

Apple Swift version 6.0-dev (LLVM cb4f50b342f3cf9, Swift fc5da5342ce965c)
Target: arm64-apple-macosx13.0
Building for production...

/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/bin/clang -target armv7em-apple-none-macho -O2 -DSWIFT_PACKAGE=1 -fblocks -I /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/Sources/Support/include --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -fPIC -g -D__APPLE__ -D__MACH__ -MD -MT dependencies -MF /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/Support.build/startup.S.d -c /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/Sources/Support/startup.S -o /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/Support.build/startup.S.o

/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/bin/clang -target armv7em-apple-none-macho -O2 -DSWIFT_PACKAGE=1 -fblocks -I /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/Sources/Support/include --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -fPIC -g -D__APPLE__ -D__MACH__ -MD -MT dependencies -MF /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/Support.build/Support.c.d -c /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/Sources/Support/Support.c -o /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/Support.build/Support.c.o

Write auxiliary file /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/swift-version--53E1F52610E069FA.txt

/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/bin/swiftc -module-name SwiftSyntax509 -emit-dependencies -emit-module -emit-module-path /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/Modules/SwiftSyntax509.swiftmodule -output-file-map /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/SwiftSyntax509.build/output-file-map.json -parse-as-library -whole-module-optimization -num-threads 10 -c @/Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/SwiftSyntax509.build/sources -I /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/Modules -target armv7em-apple-none-macho -swift-version 5 -v -O -j10 -DSWIFT_PACKAGE -module-cache-path /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/ModuleCache -parseable-output -parse-as-library -color-diagnostics -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -g -Xfrontend -disable-stack-protector -Xcc --sysroot -Xcc /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk -Xcc -F -Xcc /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -Xcc -fPIC -Xcc -g -Xcc -D__APPLE__ -Xcc -D__MACH__ -suppress-warnings

/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/bin/swiftc -module-name MMIOUtilities -emit-dependencies -emit-module -emit-module-path /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/Modules/MMIOUtilities.swiftmodule -output-file-map /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/MMIOUtilities.build/output-file-map.json -parse-as-library -whole-module-optimization -num-threads 10 -c @/Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/MMIOUtilities.build/sources -I /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/Modules -target armv7em-apple-none-macho -swift-version 5 -v -O -j10 -DSWIFT_PACKAGE -module-cache-path /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/ModuleCache -parseable-output -parse-as-library -color-diagnostics -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -g -Xfrontend -disable-stack-protector -Xcc --sysroot -Xcc /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk -Xcc -F -Xcc /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -Xcc -fPIC -Xcc -g -Xcc -D__APPLE__ -Xcc -D__MACH__ -suppress-warnings -package-name swift_mmio

Apple Swift version 6.0-dev (LLVM cb4f50b342f3cf9, Swift fc5da5342ce965c)
Apple Swift version 6.0-dev (LLVM cb4f50b342f3cf9, Swift fc5da5342ce965c)
Target: armv7em-apple-none-macho
Target: armv7em-apple-none-macho

/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/bin/swift-frontend -frontend -c /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/checkouts/swift-syntax/Sources/SwiftSyntax509/Empty.swift -emit-module-path /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/Modules/SwiftSyntax509.swiftmodule -emit-module-doc-path /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/Modules/SwiftSyntax509.swiftdoc -emit-module-source-info-path /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/Modules/SwiftSyntax509.swiftsourceinfo -emit-dependencies-path /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/SwiftSyntax509.build/SwiftSyntax509.d -target armv7em-apple-none-macho -disable-objc-interop -I /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/Modules -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -color-diagnostics -g -debug-info-format=dwarf -dwarf-version=4 -module-cache-path /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/ModuleCache -suppress-warnings -swift-version 5 -O -D SWIFT_PACKAGE -disable-stack-protector -empty-abi-descriptor -Xcc -working-directory -Xcc /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo -resource-dir /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift -file-compilation-dir /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo -Xcc --sysroot -Xcc /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk -Xcc -F -Xcc /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -Xcc -fPIC -Xcc -g -Xcc -D__APPLE__ -Xcc -D__MACH__ -module-name SwiftSyntax509 -plugin-path /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/host/plugins -plugin-path /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/local/lib/swift/host/plugins -enable-default-cmo -parse-as-library -num-threads 10 -o /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/SwiftSyntax509.build/Empty.swift.o

/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/bin/swift-frontend -frontend -c /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/checkouts/swift-mmio/Sources/MMIOUtilities/LLVMDiagnostics/LLVMDiagnostic.swift /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/checkouts/swift-mmio/Sources/MMIOUtilities/LLVMDiagnostics/LLVMDiagnosticKind.swift /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/checkouts/swift-mmio/Sources/MMIOUtilities/LLVMDiagnostics/Parser+LLVMDiagnostic.swift /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/checkouts/swift-mmio/Sources/MMIOUtilities/Parser+Integer.swift /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/checkouts/swift-mmio/Sources/MMIOUtilities/Parser.swift /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/checkouts/swift-mmio/Sources/MMIOUtilities/StringInterpolation+Hex.swift -supplementary-output-file-map /var/folders/kn/9dnh9mbx24zcltl6p8syx1w00000gn/T/TemporaryDirectory.i7R5Bg/supplementaryOutputs-1 -target armv7em-apple-none-macho -disable-objc-interop -I /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/Modules -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -color-diagnostics -g -debug-info-format=dwarf -dwarf-version=4 -module-cache-path /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/ModuleCache -suppress-warnings -swift-version 5 -O -D SWIFT_PACKAGE -disable-stack-protector -empty-abi-descriptor -Xcc -working-directory -Xcc /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo -resource-dir /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift -file-compilation-dir /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo -Xcc --sysroot -Xcc /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk -Xcc -F -Xcc /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -Xcc -fPIC -Xcc -g -Xcc -D__APPLE__ -Xcc -D__MACH__ -module-name MMIOUtilities -package-name swift_mmio -plugin-path /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/lib/swift/host/plugins -plugin-path /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-04-03-a.xctoolchain/usr/local/lib/swift/host/plugins -enable-default-cmo -parse-as-library -num-threads 10 -o /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/MMIOUtilities.build/LLVMDiagnostic.swift.o -o /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/MMIOUtilities.build/LLVMDiagnosticKind.swift.o -o /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/MMIOUtilities.build/Parser+LLVMDiagnostic.swift.o -o /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/MMIOUtilities.build/Parser+Integer.swift.o -o /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/MMIOUtilities.build/Parser.swift.o -o /Users/fumoboy007/Downloads/swift-embedded-examples/stm32-uart-echo/.build/armv7em-apple-none-macho/release/MMIOUtilities.build/StringInterpolation+Hex.swift.o

<unknown>:0: error: unable to load standard library for target 'armv7em-apple-none-macho'
<unknown>:0: error: unable to load standard library for target 'armv7em-apple-none-macho'

make: *** [build] Error 1

@fumoboy007
Copy link
Author

There seem to be a lot of references to Xcode. I wonder if that’s expected.

@unnamedd
Copy link

unnamedd commented Apr 6, 2024

@fumoboy007 give a try checking the swift-playdate-examples source code, especially this part here where the toolchain is being taken automatically to help in the compilation.

@fumoboy007
Copy link
Author

@unnamedd As I have shown above, I think the correct toolchain is being selected. Thanks for the additional example though!

@andelf
Copy link

andelf commented Apr 14, 2024

Same here. Any ideas?
-enable-experimental-feature Embedded is not added while building, this might be the reason why standard library is required.
If I added this, then swift-mmio dependency fails complaining about String is not available in embedded Swift.

@kubamracek
Copy link
Collaborator

I think (a part of) the problem is the TOOLCHAINS="Swift Development Snapshot 2024-07-07 (a)" syntax -- this doesn't actually select the right toolchain. Use the TOOLCHAINS=org.swift.59202407071a syntax.

I have just tried building the stm32-uart-echo example with the latest downloadable swift.org toolchain and it builds correctly. @fumoboy007 can you try again, too?

@fumoboy007
Copy link
Author

fumoboy007 commented Jul 14, 2024

It’s not related to the environment variable syntax. It seems something was broken in the 2024-04-03 Swift toolchain. 2024-07-11 works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants