Hi everyone,
I have some problems with building swift compiler
first i cloned the repo
git clone https://github.com/ziad-ashraf7/swift.git
cd swift
and then ran this command to install the dependencies
utils/update-checkout --clone-with-ssh
after that i ran this command to build the project
utils/build-script \
--release \
--debug-swift -j6
and after a while i got some error (and after getting these error the build is still continuing)
prefix/lib/libdispatch.so" to "$ORIGIN"
[1505/1688][ 89%][1923.545s] Linking CXX executable bin/swift-refactor
FAILED: bin/swift-refactor
....
/home/ziad/GSoC/Swift/swift/lib/ASTGen/Sources/ASTGen/StableHasher.swift:291: error: undefined reference to '$sSlss16IndexingIteratorVyxG0B0RtzrlE04makeB0ACyFSnySiG_Tg5'
/home/ziad/GSoC/Swift/swift/lib/ASTGen/Sources/ASTGen/StableHasher.swift:291: error: undefined reference to '$ss16IndexingIteratorV4next7ElementQzSgyFSnySiG_Tg5'
/home/ziad/GSoC/Swift/swift-experimental-string-processing/Sources/_RegexParser/Regex/Printing/DumpAST.swift:61: error: undefined reference to '$sSa5countSivgSS_Tg5'
/home/ziad/GSoC/Swift/swift-experimental-string-processing/Sources/_RegexParser/Regex/Printing/DumpAST.swift:62: error: undefined reference to '$sSayxSicigSS_Tg5'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
[1506/1688][ 89%][1923.766s] Linking CXX executable bin/swift-ast-script
FAILED: bin/swift-ast-script
.....
/home/ziad/GSoC/Swift/swift/lib/ASTGen/Sources/ASTGen/StableHasher.swift:291: error: undefined reference to '$sSlss16IndexingIteratorVyxG0B0RtzrlE04makeB0ACyFSnySiG_Tg5'
/home/ziad/GSoC/Swift/swift/lib/ASTGen/Sources/ASTGen/StableHasher.swift:291: error: undefined reference to '$ss16IndexingIteratorV4next7ElementQzSgyFSnySiG_Tg5'
/home/ziad/GSoC/Swift/swift-experimental-string-processing/Sources/_RegexParser/Regex/Printing/DumpAST.swift:61: error: undefined reference to '$sSa5countSivgSS_Tg5'
/home/ziad/GSoC/Swift/swift-experimental-string-processing/Sources/_RegexParser/Regex/Printing/DumpAST.swift:62: error: undefined reference to '$sSayxSicigSS_Tg5'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
after getting these logs and errors , the build is not interrupted yet.
then at the end of it I got this last error
[#StrictMemorySafety]: <file:///home/ziad/GSoC/Swift/build/Ninja-ReleaseAssert+swift-DebugAssert/swift-linux-x86_64/share/doc/swift/diagnostics/strict-memory-safety.md>
ninja: build stopped: subcommand failed.
ERROR: command `['/home/ziad/GSoC/Swift/swift/utils/build-script-impl', '--workspace', '/home/ziad/GSoC/Swift', '--build-dir', '/home/ziad/GSoC/Swift/build/Ninja-ReleaseAssert+swift-DebugAssert', '--install-prefix', '/usr', '--host-target', 'linux-x86_64', '--stdlib-deployment-targets=linux-x86_64', '--host-cc', '/usr/bin/clang', '--host-cxx', '/usr/bin/clang++', '--darwin-xcrun-toolchain', 'default', '--darwin-deployment-version-osx=13.0', '--darwin-deployment-version-ios=16.0', '--darwin-deployment-version-tvos=16.0', '--darwin-deployment-version-watchos=6.0', '--darwin-deployment-version-xros=1.0', '--cmake', '/usr/bin/cmake', '--llvm-build-type', 'Release', '--swift-build-type', 'Debug', '--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', '6', '--lit-jobs', '6', '--common-cmake-options=-G Ninja -DCMAKE_C_COMPILER:PATH=/usr/bin/clang -DCMAKE_CXX_COMPILER:PATH=/usr/bin/clang++ -DCMAKE_Swift_COMPILER:PATH=/usr/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=-j6', '--dsymutil-jobs', '1', '--build-swift-libexec', 'true', '--swift-enable-backtracing', 'true', '--build-swift-clang-overlays', 'true', '--build-swift-remote-mirror', 'true', '--swift-source-dirname', 'swift', '--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_BACKTRACING:BOOL=TRUE -DSWIFT_ENABLE_EXPERIMENTAL_OBSERVATION:BOOL=TRUE -DSWIFT_ENABLE_SYNCHRONIZATION:BOOL=TRUE -DSWIFT_ENABLE_VOLATILE:BOOL=TRUE -DSWIFT_ENABLE_RUNTIME_MODULE: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=TRUE -DSWIFT_SHOULD_BUILD_EMBEDDED_STDLIB_CROSS_COMPILING=FALSE -DSWIFT_STDLIB_BUILD_SYMBOL_GRAPHS:BOOL=FALSE -DSWIFT_TOOLS_LD64_LTO_CODEGEN_ONLY_FOR_SUPPORTING_TARGETS:BOOL=FALSE -DSWIFT_ENABLE_EXPERIMENTAL_PARSER_VALIDATION:BOOL=TRUE -USWIFT_DEBUGINFO_NON_LTO_ARGS -DSWIFT_ENABLE_NEW_RUNTIME_BUILD:BOOL=FALSE', '--build-stdlib-deployment-targets', 'all', '--ninja-bin=/usr/bin/ninja', '--install-destdir', '/home/ziad/GSoC/Swift/build/Ninja-ReleaseAssert+swift-DebugAssert/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/ziad/GSoC/Swift/swift-syntax -DSWIFT_BUILD_SWIFT_SYNTAX:BOOL=TRUE -DSWIFTSYNTAX_ENABLE_ASSERTIONS:BOOL=TRUE -DSWIFT_EARLY_SWIFT_DRIVER_BUILD=/home/ziad/GSoC/Swift/build/Ninja-ReleaseAssert+swift-DebugAssert/earlyswiftdriver-linux-x86_64/debug/bin', '--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
and then the build has finished.
How to solve this error?
OS : Manjaro Linux
if you need any further information about the errors and my system please let me know.
Thank you in advance!