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
When building a SwiftPM package on a path with spaces in it there is a build failure on Linux.
Run this command from a swift-package manager Linux development environment:
swift run swift-build -v --build-system=swiftbuild --package-path=Fixtures/Miscellaneous/Spaces\ Fixture
It's expected that this should pass as it does for similar packages without spaces in the package path.
Instead, we get an error from clang:
info: Link Module Name 1_Module.o (aarch64)
cd /swiftpm/Fixtures/Miscellaneous/Spaces\ Fixture
/usr/bin/clang -target aarch64-unknown-linux-gnu -r --sysroot / -O0 -L/swiftpm/Fixtures/Miscellaneous/Spaces\ Fixture/.build/aarch64-unknown-linux-gnu/Intermediates.noindex/EagerLinkingTBDs/Debug-linux -L/swiftpm/Fixtures/Miscellaneous/Spaces\ Fixture/.build/aarch64-unknown-linux-gnu/Products/Debug-linux -L/usr/lib @/swiftpm/Fixtures/Miscellaneous/Spaces\ Fixture/.build/aarch64-unknown-linux-gnu/Intermediates.noindex/Spaces\ Fixture.build/Debug-linux/Module\ Name\ 1_Module.build/Objects-normal/aarch64/Module\ Name\ 1_Module.LinkFileList -nostdlib -rdynamic -o /swiftpm/Fixtures/Miscellaneous/Spaces\ Fixture/.build/aarch64-unknown-linux-gnu/Products/Debug-linux/Module\ Name\ 1_Module.o
error: unknown No such file or directory: '/swiftpm/Fixtures/Miscellaneous/Spaces' []
error: unknown No such file or directory: 'Fixture/.build/aarch64-unknown-linux-gnu/Intermediates.noindex/Spaces' []
error: unknown No such file or directory: 'Fixture.build/Debug-linux/Module' []
error: unknown No such file or directory: 'Name' []
error: unknown No such file or directory: '1_Module.build/Objects-normal/aarch64/Modules/Module_Name_1.o' []
error: unknown No such file or directory: '/swiftpm/Fixtures/Miscellaneous/Spaces' []
error: unknown No such file or directory: 'Fixture/.build/aarch64-unknown-linux-gnu/Intermediates.noindex/Spaces' []
info: Compile main.swift (aarch64)
cd /swiftpm/Fixtures/Miscellaneous/Spaces\ Fixture
error: unknown No such file or directory: 'Fixture.build/Debug-linux/Module' []
error: unknown No such file or directory: 'Name' []
error: unknown No such file or directory: '1_Module.build/Objects-normal/aarch64/Foo.o' []
info: clang: error: no such file or directory: '/swiftpm/Fixtures/Miscellaneous/Spaces'
clang: error: no such file or directory: 'Fixture/.build/aarch64-unknown-linux-gnu/Intermediates.noindex/Spaces'
clang: error: no such file or directory: 'Fixture.build/Debug-linux/Module'
clang: error: no such file or directory: 'Name'
clang: error: no such file or directory: '1_Module.build/Objects-normal/aarch64/Modules/Module_Name_1.o'
clang: error: no such file or directory: '/swiftpm/Fixtures/Miscellaneous/Spaces'
clang: error: no such file or directory: 'Fixture/.build/aarch64-unknown-linux-gnu/Intermediates.noindex/Spaces'
clang: error: no such file or directory: 'Fixture.build/Debug-linux/Module'
clang: error: no such file or directory: 'Name'
clang: error: no such file or directory: '1_Module.build/Objects-normal/aarch64/Foo.o'
error: Build failed
The text was updated successfully, but these errors were encountered:
// ld64 reads lines from the file using fgets, without doing any other processing.
This comment:
// ld64 reads lines from the file using fgets, without doing any other processing.
It only applies to a specific linker, ld64. If clang, or other linkers are interpreting this file then some might have other conventions. For example, clang will directly interpret the list with @, but if the file is sent to the linker via an -Xlinker flag then the linker will read the file. It is currently unknown what binutils ld, and lld-link.exe will do in these cases.
When building a SwiftPM package on a path with spaces in it there is a build failure on Linux.
Run this command from a swift-package manager Linux development environment:
It's expected that this should pass as it does for similar packages without spaces in the package path.
Instead, we get an error from clang:
The text was updated successfully, but these errors were encountered: