Closed swift-ci closed 5 years ago
Did you forget to checkout swift-compiler-rt?
Comment by David Petroni (JIRA)
I have the same issue on swift-3.1-branch
I have updated the submodules using
./swift/utils/update-checkout --scheme swift-3.1-branch
and I'm trying to build swift.
1st issue:
[9/202] Building CXX object tools/SourceKit/lib/Support/CMakeFiles/SourceKitSupport.dir/Concurrency-libdispatch.cpp.o
FAILED: tools/SourceKit/lib/Support/CMakeFiles/SourceKitSupport.dir/Concurrency-libdispatch.cpp.o
/srv/tools/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/SourceKit/lib/Support -I/home/david/dev/swift-sources/swift/tools/SourceKit/lib/Support -I/home/david
/dev/swift-sources/swift/tools/SourceKit/include -Iinclude -I/home/david/dev/swift-sources/swift/include -I/home/david/dev/swift-sources/llvm/include -I/home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/include
-I/home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/tools/clang/include -I/home/david/dev/swift-sources/llvm/tools/clang/include -I/home/david/dev/swift-sources/cmark/src -I/home/david/dev/swift-sources/build/N
inja-DebugAssert/cmark-linux-x86_64/src -I/home/david/dev/swift-sources/swift-corelibs-libdispatch -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wcovered-s
witch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Werror=date-time -std=c++11 -fcolor-diagnostics -Wdocumentation -Wimplicit-fallthrough -Wunreachable-code -Woverloaded-virtual -g -fno-exceptions -fno-rtti -target x86_6
4-unknown-linux-gnu -O0 -g -UNDEBUG -fblocks -MD -MT tools/SourceKit/lib/Support/CMakeFiles/SourceKitSupport.dir/Concurrency-libdispatch.cpp.o -MF tools/SourceKit/lib/Support/CMakeFiles/SourceKitSupport.dir/Concurrency-libdispatch.c
pp.o.d -o tools/SourceKit/lib/Support/CMakeFiles/SourceKitSupport.dir/Concurrency-libdispatch.cpp.o -c /home/david/dev/swift-sources/swift/tools/SourceKit/lib/Support/Concurrency-libdispatch.cpp
/home/david/dev/swift-sources/swift/tools/SourceKit/lib/Support/Concurrency-libdispatch.cpp:20:10: fatal error: 'Block.h' file not found
#include <Block.h>
I've done an horrible link here
/home/david/dev/swift-sources/cmark/src
which of course solved the include issue.
Then, 2nd issue:
FAILED: lib/libsourcekitdInProc.so
: && /srv/tools/bin/clang++ -fPIC -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Werr
or=date-time -std=c++11 -fcolor-diagnostics -Wdocumentation -Wimplicit-fallthrough -Wunreachable-code -Woverloaded-virtual -g -target x86_64-unknown-linux-gnu -lpthread -ldl -lBlocksRuntime -shared -Wl,-soname,libsourcekitdInProc.s
o -o lib/libsourcekitdInProc.so tools/SourceKit/tools/sourcekitd/bin/InProc/CMakeFiles/sourcekitdInProc.dir/sourcekitdInProc.cpp.o -L/home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/./lib lib/libSourceKitSwift
Lang.a lib/libsourcekitdAPI.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMSupport.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMCoverage.a -lBlocksRuntime
lib/libSourceKitSwiftLang.a lib/libSourceKitCore.a lib/libswiftDriver.a lib/libswiftIndex.a lib/libswiftIDE.a lib/libswiftFrontend.a lib/libswiftIRGen.a lib/libswiftSILGen.a lib/libswiftSILOptimizer.a lib/libswiftLLVMPasses.a lib/l
ibswiftClangImporter.a lib/libswiftParse.a lib/libswiftSIL.a lib/libswiftSema.a lib/libswiftSerialization.a lib/libswiftClangImporter.a lib/libswiftParse.a lib/libswiftSIL.a lib/libswiftSema.a lib/libswiftSerialization.a lib/libswif
tAST.a lib/libswiftMarkup.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libclangIndex.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libclangFormat.a /home/david/dev/swi
ft-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libclangToolingCore.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libclangFrontendTool.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/
llvm-linux-x86_64/lib/libclangCodeGen.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMCoverage.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libclangARCMigrate.a /
home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libclangStaticAnalyzerFrontend.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libclangStaticAnalyzerCheckers.a /home/david/dev
/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libclangASTMatchers.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libclangStaticAnalyzerCore.a /home/david/dev/swift-sources/build/Ninja-De
bugAssert/llvm-linux-x86_64/lib/libclangRewriteFrontend.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libclangFrontend.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/lib
clangDriver.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libclangSerialization.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libclangParse.a /home/david/dev/swift-sour
ces/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libclangSema.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libclangAnalysis.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/
lib/libclangEdit.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libclangRewrite.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libclangAST.a /home/david/dev/swift-sources
/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libclangLex.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libclangAPINotes.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/
libclangBasic.a lib/libswiftOption.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/cmark-linux-x86_64/src/libcmark.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/./lib/libclangIndex.a /home/david/d
ev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/./lib/libclangFormat.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/./lib/libclangToolingCore.a /home/david/dev/swift-sources/build/Ninja-DebugAss
ert/llvm-linux-x86_64/./lib/libclangFrontendTool.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/./lib/libclangFrontend.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/./lib/libcla
ngDriver.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/./lib/libclangCodeGen.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/./lib/libclangSerialization.a /home/david/dev/swift-s
ources/build/Ninja-DebugAssert/llvm-linux-x86_64/./lib/libclangParse.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/./lib/libclangSema.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86
_64/./lib/libclangAnalysis.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/./lib/libclangEdit.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/./lib/libclangRewriteFrontend.a /home/
david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/./lib/libclangLex.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/./lib/libclangAST.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/
llvm-linux-x86_64/./lib/libclangAPINotes.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMX86CodeGen.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMX86AsmPars
er.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMX86Desc.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMX86AsmPrinter.a /home/david/dev/swift-sources/build
/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMX86Utils.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMX86Disassembler.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/
lib/libLLVMX86Info.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMARMCodeGen.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMARMAsmParser.a /home/david/dev/s
wift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMARMDisassembler.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMARMDesc.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/l
lvm-linux-x86_64/lib/libLLVMARMAsmPrinter.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMARMInfo.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMAArch64CodeG
en.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMGlobalISel.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMAArch64AsmParser.a /home/david/dev/swift-sources
/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMAArch64Disassembler.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMAArch64Desc.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-
linux-x86_64/lib/libLLVMAArch64AsmPrinter.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMAArch64Info.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMAArch64U
tils.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMPowerPCCodeGen.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMPowerPCAsmParser.a /home/david/dev/swift-s
ources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMPowerPCDesc.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMPowerPCAsmPrinter.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/l
lvm-linux-x86_64/lib/libLLVMPowerPCDisassembler.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMPowerPCInfo.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMSy
stemZCodeGen.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMAsmPrinter.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMDebugInfoCodeView.a /home/david/dev/sw
ift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMDebugInfoMSF.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMSelectionDAG.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/
llvm-linux-x86_64/lib/libLLVMSystemZAsmParser.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMSystemZDisassembler.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/lib
LLVMSystemZDesc.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMSystemZAsmPrinter.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMSystemZInfo.a /home/david/de
v/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMMCDisassembler.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMDebugInfoDWARF.a /home/david/dev/swift-sources/build/Ninja-Debu
gAssert/llvm-linux-x86_64/lib/libLLVMLTO.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMPasses.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMipo.a /home/da
vid/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMIRReader.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMAsmParser.a /home/david/dev/swift-sources/build/Ninja-DebugAsse
rt/llvm-linux-x86_64/lib/libLLVMLinker.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMCodeGen.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMBitWriter.a /ho
me/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMInstrumentation.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMTarget.a /home/david/dev/swift-sources/build/Ninja-
DebugAssert/llvm-linux-x86_64/lib/libLLVMScalarOpts.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMInstCombine.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLL
VMVectorize.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMOption.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMObjCARCOpts.a /home/david/dev/swift-sources
/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMTransformUtils.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMAnalysis.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x8
6_64/lib/libLLVMObject.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMBitReader.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMMCParser.a /home/david/dev/sw
ift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMMC.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMProfileData.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-
x86_64/lib/libLLVMCore.a lib/libSourceKitSupport.a -lBlocksRuntime lib/libswiftBasic.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/lib/libLLVMSupport.a -lrt -ldl -ltinfo -lpthread -lz -lm /usr/lib64/libuu
id.so /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/./lib/libclangRewrite.a /home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/./lib/libclangBasic.a /home/david/dev/swift-sources/build/
Ninja-DebugAssert/libdispatch-linux-x86_64/src/.libs/libdispatch.so -Wl,-rpath,/home/david/dev/swift-sources/build/Ninja-DebugAssert/llvm-linux-x86_64/./lib:/home/david/dev/swift-sources/build/Ninja-DebugAssert/libdispatch-linux-x86
_64/src/.libs && :
/usr/bin/ld: cannot find -lBlocksRuntime
/usr/bin/ld: cannot find -lBlocksRuntime
/usr/bin/ld: cannot find -lBlocksRuntime
clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation)
[51/124] Building CXX object stdlib/public/stubs/CMakeFiles/swiftStdlibStubs-linux-x86_64.dir/LibcShims.cpp.o
I'm indeed missing the blocks runtime.
How can I do?
Comment by Ryan Lovelett (JIRA)
The official build on Ubuntu relies on the presence of the libblocksruntime-dev
package. As far as I can tell, this package is not a part of the official Fedora repositories.
We now build and share blocks runtime as part of libdispatch.
Attachment: Download
Environment
Create a scratchdirectory and put the attached buildswift script in it. chmod +x buildscript to make it executable. then run the following docker command > docker run -it -v \[scratchdirectory\]:/root/swift-source --name fedora25clean fedora bash once the image loads and drops into bash $cd /root/swift-source $./buildswift This will setup the compiler environment, and then run update-checkout to get the source and start the build. You can inspect the script to see what packages are loaded, and what the build-script options are.Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 3 | |Component/s | Foundation | |Labels | Bug, BuildScript, Fedora, Linux | |Assignee | None | |Priority | Medium | md5: 9232745c20558702b691dfd52234e38bIssue Description:
Started getting this recently
See "Environment" for instructions on how to bring up on Fedora 25 inside docker.