-
Notifications
You must be signed in to change notification settings - Fork 127
Closed
Labels
freebsdSupport for the FreeBSD platformSupport for the FreeBSD platform
Description
Building an executable package from template fails with the following error:
# swift build --build-system swiftbuild
error: /root/testpkg/Package.swift Linker command failed with exit code 1 (use -v to see invocation)
error: Ld /root/testpkg/.build/x86_64-unknown-freebsd/Products/Debug-freebsd/ExecutableModules/testpkg-4A664059B3045C89-testable.o normal failed with a nonzero exit code. Command line: cd /root/testpkg
/root/usr/bin/clang -target x86_64-unknown-freebsd14.3 -r --sysroot / -O0 -L/root/testpkg/.build/x86_64-unknown-freebsd/Intermediates.noindex/EagerLinkingTBDs/Debug-freebsd -L/root/testpkg/.build/x86_64-unknown-freebsd/Products/Debug-freebsd -L/root/usr/lib @/root/testpkg/.build/x86_64-unknown-freebsd/Intermediates.noindex/testpkg.build/Debug-freebsd/testpkg-4A664059B3045C89-testable.build/Objects-normal/x86_64/testpkg-4A664059B3045C89-testable.LinkFileList -nostdlib -rdynamic -fuse-ld\=lld -o /root/testpkg/.build/x86_64-unknown-freebsd/Products/Debug-freebsd/ExecutableModules/testpkg-4A664059B3045C89-testable.o
error: Ld /root/testpkg/.build/x86_64-unknown-freebsd/Products/Debug-freebsd/testpkg normal failed with a nonzero exit code. Command line: cd /root/testpkg
/root/usr/bin/swiftc -target x86_64-unknown-freebsd14.3 -emit-executable -sysroot / -L/root/testpkg/.build/x86_64-unknown-freebsd/Intermediates.noindex/EagerLinkingTBDs/Debug-freebsd -L/root/testpkg/.build/x86_64-unknown-freebsd/Products/Debug-freebsd -L/root/usr/lib @/root/testpkg/.build/x86_64-unknown-freebsd/Intermediates.noindex/testpkg.build/Debug-freebsd/testpkg.build/Objects-normal/x86_64/testpkg.LinkFileList -Xlinker --gc-sections -Xclang-linker -rdynamic -lswiftCore -lswiftSwiftOnoneSupport -L/root/usr/lib/swift/freebsd -L/usr/lib/swift @/root/testpkg/.build/x86_64-unknown-freebsd/Intermediates.noindex/testpkg.build/Debug-freebsd/testpkg.build/Objects-normal/x86_64/testpkg.autolink -use-ld\=lld -o /root/testpkg/.build/x86_64-unknown-freebsd/Products/Debug-freebsd/testpkg
error: Build failed
root@freebsd:~/testpkg # swift --version
Swift version 6.3-dev (LLVM c9d322e8f6b5e97, Swift f149a8bce4ce25b)
Target: x86_64-unknown-freebsd14.3
Build config: +assertionsInvoking the link command shows the real error:
# /root/usr/bin/clang -target x86_64-unknown-freebsd14.3 -r --sysroot / -O0 -L/root/testpkg/.build/x86_64-unknown-freebsd/Intermediates.noindex/EagerLinkingTBDs/Debug-freebsd -L/root/testpkg/.build/x86_64-unknown-freebsd/Products/Debug-freebsd -L/root/usr/lib @/root/testpkg/.build/x86_64-unknown-freebsd/Intermediates.noindex/testpkg.build/Debug-freebsd/testpkg-4A664059B3045C89-testable.build/Objects-normal/x86_64/testpkg-4A664059B3045C89-testable.LinkFileList -nostdlib -rdynamic -fuse-ld\=lld -o /root/testpkg/.build/x86_64-unknown-freebsd/Products/Debug-freebsd/ExecutableModules/testpkg-4A664059B3045C89-testable.o
ld.lld: error: -r and --export-dynamic may not be used togetherThis package succeeds with the native build system and fails with Swift Build.
lin72h
Metadata
Metadata
Assignees
Labels
freebsdSupport for the FreeBSD platformSupport for the FreeBSD platform
Type
Projects
Status
Done
Status
Done