Unable to build swift

It's my first time using swift. While building swift according to the GitHub instructions, I am getting this error.

Warning, treated as error:
/home/crekiron/swift-source/swift/docs/Modules.rst:443:duplicate term description of module, other instance in LibraryEvolution
[78/622][ 12%][98.084s] Building CXX o...n-dump.dir/swift-reflection-dump.cpp.o
ninja: build stopped: subcommand failed.
ERROR: command terminated with a non-zero exit status 1, aborting

I am using Linux. When I go to these both contain the description of the module. Is it bug? Or I am doing something wrong? Looking for an early reply.

This is whole message:

[crekiron@crekiron-pc ~/swift-source/swift]$ utils/build-script --release-debuginfo
[utils/build-script] NOTE: Using toolchain default
+ cmake --version
+ mkdir -p /home/crekiron/swift-source/build/Ninja-RelWithDebInfoAssert
Building the standard library for: swift-test-stdlib-linux-x86_64
+ /usr/bin/cmake --build /home/crekiron/swift-source/build/Ninja-RelWithDebInfoAssert/cmark-linux-x86_64 -- -j4 all
ninja: no work to do.
symlinking the system headers (/usr/include/c++) into the local clang build directory (/home/crekiron/swift-source/build/Ninja-RelWithDebInfoAssert/llvm-linux-x86_64/include).
+ ln -s -f /usr/include/c++ /home/crekiron/swift-source/build/Ninja-RelWithDebInfoAssert/llvm-linux-x86_64/include
+ /usr/bin/cmake --build /home/crekiron/swift-source/build/Ninja-RelWithDebInfoAssert/llvm-linux-x86_64 -- -j4 all
ninja: no work to do.
+ /usr/bin/cmake --build /home/crekiron/swift-source/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64 -- -j4 all swift-test-stdlib-linux-x86_64
[1/548][  0%][0.015s] Performing build step for 'libdispatch'
ninja: no work to do.
[6/542][  1%][4.855s] Building HTML documentation
FAILED: docs/CMakeFiles/docs_html 
cd /home/crekiron/swift-source/swift/docs && /usr/bin/sphinx-build -W -D latex_elements.papersize=letter -d /home/crekiron/swift-source/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/doctrees -b html . /home/crekiron/swift-source/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/docs/html
Running Sphinx v3.0.4
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 59 source files that are out of date
updating environment: [new config] 59 added, 0 changed, 0 removed
reading sources... [  1%] ABI/CallingConvention
reading sources... [  3%] ABI/Mangling
reading sources... [  5%] ABI/TypeLayout
reading sources... [  6%] ABI/TypeMetadata
reading sources... [  8%] ARCOptimization
reading sources... [ 10%] AccessControl
reading sources... [ 11%] AccessControlInStdlib
reading sources... [ 13%] Arrays
reading sources... [ 15%] ErrorHandling
reading sources... [ 16%] ErrorHandlingRationale
reading sources... [ 18%] FailableInitializers
reading sources... [ 20%] Generics
reading sources... [ 22%] HighLevelSILOptimizations
reading sources... [ 23%] InitializerProblems
reading sources... [ 25%] LibraryEvolution
reading sources... [ 27%] Modules
reading sources... [ 28%] MutationModel
reading sources... [ 30%] OptimizationTips
reading sources... [ 32%] SIL
reading sources... [ 33%] SequencesAndCollections
reading sources... [ 35%] Serialization
reading sources... [ 37%] StdlibAPIGuidelines
reading sources... [ 38%] StdlibRationales
reading sources... [ 40%] StoredAndComputedVariables
reading sources... [ 42%] StringDesign
reading sources... [ 44%] TextFormatting
reading sources... [ 45%] TypeChecker
reading sources... [ 47%] contents
reading sources... [ 49%] proposals/Accessors
reading sources... [ 50%] proposals/ArrayBridge
reading sources... [ 52%] proposals/AttrC
reading sources... [ 54%] proposals/CPointerArgumentInterop
reading sources... [ 55%] proposals/CPointerInteropLanguageModel
reading sources... [ 57%] proposals/Concurrency
reading sources... [ 59%] proposals/DeclarationTypeChecker
reading sources... [ 61%] proposals/EnumStyle
reading sources... [ 62%] proposals/Enums
reading sources... [ 64%] proposals/Initialization
reading sources... [ 66%] proposals/InitializerInheritance
reading sources... [ 67%] proposals/InoutCOWOptimization
reading sources... [ 69%] proposals/Inplace
reading sources... [ 71%] proposals/ObjCInteroperation
reading sources... [ 72%] proposals/OptimizerEffects
reading sources... [ 74%] proposals/OptionSets
reading sources... [ 76%] proposals/RemoteMirrors
reading sources... [ 77%] proposals/TypeState
reading sources... [ 79%] proposals/UnsupportedOptimizationAttributes
reading sources... [ 81%] proposals/ValueSemantics
reading sources... [ 83%] proposals/WholeModuleOptimization
reading sources... [ 84%] proposals/archive/MemoryAndConcurrencyModel
reading sources... [ 86%] proposals/archive/ProgramStructureAndCompilationModel
reading sources... [ 88%] proposals/archive/UnifiedFunctionSyntax
reading sources... [ 89%] proposals/rejected/BridgingContainerProtocolsToClassClusters
reading sources... [ 91%] proposals/rejected/ClassConstruction
reading sources... [ 93%] proposals/rejected/Clonable
reading sources... [ 94%] proposals/rejected/Constructors
reading sources... [ 96%] proposals/rejected/KeywordArguments
reading sources... [ 98%] proposals/valref
reading sources... [100%] weak


Warning, treated as error:
/home/crekiron/swift-source/swift/docs/Modules.rst:443:duplicate term description of module, other instance in LibraryEvolution
[9/542][  1%][15.916s] Building CXX ob...r.dir/LoopTransforms/COWArrayOpt.cpp.o
ninja: build stopped: subcommand failed.
ERROR: command terminated with a non-zero exit status 1, aborting

[crekiron@crekiron-pc ~/swift-source/swift]$

I've seen this error when building on Arch linux. I just disable it with this patch, never looked into why it happens:

diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index c748bd36eba..eef2c349848 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -10,7 +10,6 @@ SET(SWIFT_SPHINX_PAPER_SIZE "letter"
   CACHE STRING "Paper size for generated documentation")

 SET(SPHINX_ARGS
-  -W
   -D latex_elements.papersize=${SWIFT_SPHINX_PAPER_SIZE}
   -d ${CMAKE_BINARY_DIR}/doctrees)
 

thanks for the hint, @buttaface included as a patch into the arch linux swift build now:

https://aur.archlinux.org/packages/swift-language-git/

created: https://bugs.swift.org/browse/SR-13335

Terms of Service

Privacy Policy

Cookie Policy