Skip to content

Can't build swift from source because swiftrt.o not shipped into ~/.local/lib #143

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
ADKaster opened this issue Jul 22, 2024 · 4 comments
Closed

Comments

@ADKaster
Copy link

When building swift from source, the swift build (./utils/build-script --release) fails with swiftly use main-snapshot-2024-07-15` due to a missing lib file.

-- Build files have been written to: /home/andrew/swift/build/Ninja+cmark-ReleaseAssert+llvm-Release+swift-ReleaseAssert+stdlib-ReleaseAssert/swift-linux-x86_64
+ popd
~/swift/swift
+ /home/andrew/swift/build/cmake-linux-x86_64/bin/cmake --build /home/andrew/swift/build/Ninja+cmark-ReleaseAssert+llvm-Release+swift-ReleaseAssert+stdlib-ReleaseAssert/swift-linux-x86_64 -- -j32 all swift-test-stdlib-linux-x86_64 swift-libexec-linux-x86_64
ninja: error: '/home/andrew/.local/lib/swift/linux/x86_64/swiftrt.o', needed by 'bin/swift-frontend', missing and no known rule to make it
ERROR: command `['/home/andrew/swift/swift/utils/build-script-impl', '--workspace', '/home/andrew/swift', '--build-dir', '/home/andrew/swift/build/Ninja+cmark-ReleaseAssert+llvm-Release+swift-ReleaseAssert+stdlib-ReleaseAssert', '--install-prefix', '/usr', '--host-target', 'linux-x86_64', '--stdlib-deployment-targets=linux-x86_64', '--host-cc', '/home/andrew/.local/bin/clang', '--host-cxx', '/home/andrew/.local/bin/clang++', '--darwin-xcrun-toolchain', 'default', '--darwin-deployment-version-osx=10.13', '--darwin-deployment-version-ios=11.0', '--darwin-deployment-version-tvos=11.0', '--darwin-deployment-version-watchos=4.0', '--darwin-deployment-version-xros=1.0', '--cmake', '/home/andrew/swift/build/cmake-linux-x86_64/bin/cmake', '--llvm-build-type', 'Release', '--swift-build-type', 'Release', '--swift-stdlib-build-type', 'Release', '--lldb-build-type', 'Release', '--foundation-build-type', 'Release', '--libdispatch-build-type', 'Release', '--xctest-build-type', 'Release', '--llbuild-build-type', 'Release', '--swift-enable-assertions', 'true', '--swift-stdlib-enable-assertions', 'true', '--swift-analyze-code-coverage', 'false', '--llbuild-enable-assertions', 'true', '--lldb-assertions', 'true', '--cmake-generator', 'Ninja', '--cross-compile-append-host-target-to-destdir', 'true', '--build-jobs', '32', '--lit-jobs', '32', '--common-cmake-options=-G Ninja -DCMAKE_C_COMPILER:PATH=/home/andrew/.local/bin/clang -DCMAKE_CXX_COMPILER:PATH=/home/andrew/.local/bin/clang++ -DCMAKE_Swift_COMPILER:PATH=/home/andrew/.local/bin/swiftc -DCMAKE_LIBTOOL:PATH=/usr/bin/libtool -DCMAKE_AR:PATH=/usr/bin/ar -DCMAKE_RANLIB:PATH=/usr/bin/ranlib -DLLVM_VERSION_MAJOR:STRING=17 -DLLVM_VERSION_MINOR:STRING=0 -DLLVM_VERSION_PATCH:STRING=0 -DCLANG_VERSION_MAJOR:STRING=17 -DCLANG_VERSION_MINOR:STRING=0 -DCLANG_VERSION_PATCH:STRING=0 -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja', '--build-args=-j32', '--dsymutil-jobs', '1', '--build-swift-libexec', 'true', '--swift-enable-backtracing', 'true', '--build-swift-clang-overlays', 'true', '--build-swift-remote-mirror', 'true', '--swift-cmake-options=-DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE -DSWIFT_FORCE_OPTIMIZED_TYPECHECKER:BOOL=FALSE -DSWIFT_STDLIB_ENABLE_STDLIBCORE_EXCLUSIVITY_CHECKING:BOOL=FALSE -DSWIFT_ENABLE_EXPERIMENTAL_DIFFERENTIABLE_PROGRAMMING:BOOL=TRUE -DSWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY:BOOL=TRUE -DSWIFT_ENABLE_EXPERIMENTAL_CXX_INTEROP:BOOL=TRUE -DSWIFT_ENABLE_CXX_INTEROP_SWIFT_BRIDGING_HEADER:BOOL=TRUE -DSWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED:BOOL=TRUE -DSWIFT_ENABLE_EXPERIMENTAL_NONESCAPABLE_TYPES:BOOL=FALSE -DSWIFT_ENABLE_BACKTRACING:BOOL=TRUE -DSWIFT_ENABLE_EXPERIMENTAL_OBSERVATION:BOOL=TRUE -DSWIFT_ENABLE_SYNCHRONIZATION:BOOL=TRUE -DSWIFT_ENABLE_VOLATILE:BOOL=TRUE -DSWIFT_STDLIB_STATIC_PRINT=FALSE -DSWIFT_FREESTANDING_IS_DARWIN:BOOL=FALSE -DSWIFT_STDLIB_BUILD_PRIVATE:BOOL=TRUE -DSWIFT_STDLIB_ENABLE_UNICODE_DATA=TRUE -DSWIFT_SHOULD_BUILD_EMBEDDED_STDLIB_CROSS_COMPILING=FALSE -DSWIFT_TOOLS_LD64_LTO_CODEGEN_ONLY_FOR_SUPPORTING_TARGETS:BOOL=FALSE -DSWIFT_ENABLE_EXPERIMENTAL_PARSER_VALIDATION:BOOL=FALSE -USWIFT_DEBUGINFO_NON_LTO_ARGS', '--build-stdlib-deployment-targets', 'all', '--ninja-bin=/usr/bin/ninja', '--install-destdir', '/home/andrew/swift/build/Ninja+cmark-ReleaseAssert+llvm-Release+swift-ReleaseAssert+stdlib-ReleaseAssert/toolchain-linux-x86_64', '--skip-build-foundation', '--skip-build-xctest', '--skip-build-lldb', '--skip-build-llbuild', '--skip-build-libcxx', '--skip-build-libdispatch', '--skip-build-libxml2', '--skip-build-zlib', '--skip-build-curl', '--build-swift-dynamic-stdlib', '--build-swift-dynamic-sdk-overlay', '--skip-build-android', '--skip-test-swift', '--skip-test-lldb', '--skip-test-llbuild', '--skip-test-xctest', '--skip-test-foundation', '--skip-test-libdispatch', '--skip-test-benchmarks', '--android-deploy-device-path', '/data/local/tmp', '--host-libtool', '/usr/bin/libtool', '--extra-cmake-options=-USWIFT_DARWIN_SUPPORTED_ARCHS -DSWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE:PATH=/home/andrew/swift/swift-syntax -DSWIFT_BUILD_SWIFT_SYNTAX:BOOL=TRUE -DSWIFTSYNTAX_ENABLE_ASSERTIONS:BOOL=TRUE', '--llvm-lit-args=-sv --param color_output', '--llvm-install-components=llvm-ar;llvm-cov;llvm-profdata;IndexStore;clang;clang-resource-headers;compiler-rt;clangd;LTO;lld', '--musl-path=/usr/local/musl', '--linux-static-archs=x86_64;aarch64', '--only-execute', 'linux-x86_64-swift-build']` terminated with a non-zero exit status 1, aborting
@adam-fowler
Copy link
Contributor

Are you sure this is the correct place to report this? This is the repository for swiftly the swift installation manager

@ADKaster
Copy link
Author

I think the real issue I was hitting is this one you mentioned here? #122 (comment)

I was able to get swift as installed by swiftly to find that file by symlinking the lib directory.

@adam-fowler
Copy link
Contributor

Ok going to close this as a duplicate

@ethanc8
Copy link

ethanc8 commented Jan 29, 2025

I am still experiencing this issue with swift-6.0.3-RELEASE (building swift-6.0.3-RELEASE from source while having 6.0.3 toolchain installed by swiftly).

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

3 participants