levivic
(Leo)
1
Hi there, I have been trying to build swift 5.0 from source on linux. The build is fine, however i have experienced clang related error when running the validation test:
...
/root/swift5/llvm/tools/clang/include/clang/Basic/Diagnostic.h:489: error: undefined reference to 'clang::DiagnosticsEngine::DiagStateMap::dump(clang::SourceManager&, llvm::StringRef) const'
/root/swift5/llvm/tools/clang/include/clang/Basic/Diagnostic.h:491: error: undefined reference to 'clang::DiagnosticsEngine::DiagStateMap::dump(clang::SourceManager&, llvm::StringRef) const'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[4/43] Building CXX object unittests/IDE/CMakeFiles/SwiftIDETests.dir/Placeholders.cpp.o
ninja: build stopped: subcommand failed.
./utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting
Any ideas? This is Unbuntu 18.04 with clang 6.0.0.
jrose
(Jordan Rose)
2
That sounds like your Swift repo is out of sync with your Clang repo. You can use swift/utils/update-checkout --scheme swift-5.0-branch to make sure they're all consistent.
levivic
(Leo)
3
Thanks for the reply. I did use that command and they are all the same swift-5.0-branch.
jrose
(Jordan Rose)
4
blangmuir
(Ben Langmuir)
5
Nope, never seen that. But I don't know if I've ever tried to build swift-5.0-branch on Linux either. @akyrtzi?
levivic
(Leo)
7
What clang version am i suppose to use? This error was seen with clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)