[PATCH] D62040: [docs] Add new document on building distributions

Wink Saville via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 19 14:24:50 PDT 2019


winksaville added a comment.

> What have I done wrong?

One thing I apparently did wrong was not supply LLVM_ENABLE_PROJECTS so
I added that and CMAKE_INSTALL_PREFIX:

  $ cmake ../llvm -G Ninja -C ../clang/cmake/caches/DistributionExample.cmake -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_INSTALL_PREFIX=/home/wink/local-dist

With there is now a stage2-distribution and it started compiling but eventually failed:

  ++ ninja stage2-distribution -j11 -v
  [1/1999] /usr/bin/c++  -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Support -I/home/wink/prgs/llvm/llvm-project-2/llvm/lib/Support -I/usr/include/libxml2 -Iinclude -I/home/wink/prgs/llvm/llvm-project-2/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG    -fno-exceptions -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/Atomic.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/Atomic.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/Atomic.cpp.o -c /home/wink/prgs/llvm/llvm-project-2/llvm/lib/Support/Atomic.cpp
  ...
  
  [1997/1999] cd /home/wink/prgs/llvm/llvm-project-2/build-dist/tools/clang/stage2-bins && /usr/bin/cmake -DCMAKE_INSTALL_PREFIX=/home/wink/local-dist -C /home/wink/prgs/llvm/llvm-project-2/clang/cmake/caches/DistributionExample-stage2.cmake -DLLVM_ENABLE_LTO=ON -DLLVM_EXTERNAL_CLANG_SOURCE_DIR=/home/wink/prgs/llvm/llvm-project-2/llvm/../clang -DPACKAGE_VERSION=9.0.0svn -DPACKAGE_VENDOR=LLVM.org -DLLVM_VERSION_MAJOR=9 -DLLVM_VERSION_MINOR=0 -DLLVM_VERSION_PATCH=0 -DCLANG_VERSION_MAJOR=9 -DCLANG_VERSION_MINOR=0 -DCLANG_VERSION_PATCHLEVEL=0 -DLLVM_VERSION_SUFFIX=svn -DLLVM_BINUTILS_INCDIR= -DCLANG_REPOSITORY_STRING= -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja -DLLVM_ENABLE_PROJECTS=clang -DCLANG_STAGE=stage2 -DCMAKE_CXX_COMPILER=/home/wink/prgs/llvm/llvm-project-2/build-dist/./bin/clang++ -DCMAKE_C_COMPILER=/home/wink/prgs/llvm/llvm-project-2/build-dist/./bin/clang -DCMAKE_ASM_COMPILER=/home/wink/prgs/llvm/llvm-project-2/build-dist/./bin/clang -DCMAKE_ASM_COMPILER_ID=Clang -DCMAKE_AR=/home/wink/prgs/llvm/llvm-project-2/build-dist/./bin/llvm-ar -DCMAKE_RANLIB=/home/wink/prgs/llvm/llvm-project-2/build-dist/./bin/llvm-ranlib -GNinja /home/wink/prgs/llvm/llvm-project-2/llvm && /usr/bin/cmake -E touch /home/wink/prgs/llvm/llvm-project-2/build-dist/tools/clang/stage2-stamps//stage2-configure
  loading initial cache file /home/wink/prgs/llvm/llvm-project-2/clang/cmake/caches/DistributionExample-stage2.cmake
  -- The C compiler identification is Clang 9.0.0
  -- The CXX compiler identification is Clang 9.0.0
  -- The ASM compiler identification is Clang
  -- Found assembler: /home/wink/prgs/llvm/llvm-project-2/build-dist/./bin/clang
  -- Check for working C compiler: /home/wink/prgs/llvm/llvm-project-2/build-dist/./bin/clang
  -- Check for working C compiler: /home/wink/prgs/llvm/llvm-project-2/build-dist/./bin/clang -- works
  ...
  CMake Error at CMakeLists.txt:1108 (message):
    Specified distribution component 'builtins' doesn't have a target
  
  
  CMake Error at CMakeLists.txt:1114 (message):
    Specified distribution component 'builtins' doesn't have an install target
  
  
  CMake Error at CMakeLists.txt:1120 (message):
    Specified distribution component 'builtins' doesn't have an
    install-stripped target.  Its installation target creation should be
    changed to use add_llvm_install_targets, or you should manually create the
    'install-builtins-stripped' target.
  
  
  CMake Error at CMakeLists.txt:1108 (message):
    Specified distribution component 'runtimes' doesn't have a target
  
  
  CMake Error at CMakeLists.txt:1114 (message):
    Specified distribution component 'runtimes' doesn't have an install target
  
  
  CMake Error at CMakeLists.txt:1120 (message):
    Specified distribution component 'runtimes' doesn't have an
    install-stripped target.  Its installation target creation should be
    changed to use add_llvm_install_targets, or you should manually create the
    'install-runtimes-stripped' target.
  
  
  -- Failed to find LLVM FileCheck
  ...
  -- Performing Test HAVE_STEADY_CLOCK
  -- Performing Test HAVE_STEADY_CLOCK
  -- Performing Test HAVE_STEADY_CLOCK -- failed to compile
  -- Configuring incomplete, errors occurred!
  See also "/home/wink/prgs/llvm/llvm-project-2/build-dist/tools/clang/stage2-bins/CMakeFiles/CMakeOutput.log".
  See also "/home/wink/prgs/llvm/llvm-project-2/build-dist/tools/clang/stage2-bins/CMakeFiles/CMakeError.log".
  FAILED: tools/clang/stage2-stamps/stage2-configure 
  cd /home/wink/prgs/llvm/llvm-project-2/build-dist/tools/clang/stage2-bins && /usr/bin/cmake -DCMAKE_INSTALL_PREFIX=/home/wink/local-dist -C /home/wink/prgs/llvm/llvm-project-2/clang/cmake/caches/DistributionExample-stage2.cmake -DLLVM_ENABLE_LTO=ON -DLLVM_EXTERNAL_CLANG_SOURCE_DIR=/home/wink/prgs/llvm/llvm-project-2/llvm/../clang -DPACKAGE_VERSION=9.0.0svn -DPACKAGE_VENDOR=LLVM.org -DLLVM_VERSION_MAJOR=9 -DLLVM_VERSION_MINOR=0 -DLLVM_VERSION_PATCH=0 -DCLANG_VERSION_MAJOR=9 -DCLANG_VERSION_MINOR=0 -DCLANG_VERSION_PATCHLEVEL=0 -DLLVM_VERSION_SUFFIX=svn -DLLVM_BINUTILS_INCDIR= -DCLANG_REPOSITORY_STRING= -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja -DLLVM_ENABLE_PROJECTS=clang -DCLANG_STAGE=stage2 -DCMAKE_CXX_COMPILER=/home/wink/prgs/llvm/llvm-project-2/build-dist/./bin/clang++ -DCMAKE_C_COMPILER=/home/wink/prgs/llvm/llvm-project-2/build-dist/./bin/clang -DCMAKE_ASM_COMPILER=/home/wink/prgs/llvm/llvm-project-2/build-dist/./bin/clang -DCMAKE_ASM_COMPILER_ID=Clang -DCMAKE_AR=/home/wink/prgs/llvm/llvm-project-2/build-dist/./bin/llvm-ar -DCMAKE_RANLIB=/home/wink/prgs/llvm/llvm-project-2/build-dist/./bin/llvm-ranlib -GNinja /home/wink/prgs/llvm/llvm-project-2/llvm && /usr/bin/cmake -E touch /home/wink/prgs/llvm/llvm-project-2/build-dist/tools/clang/stage2-stamps//stage2-configure
  ninja: build stopped: subcommand failed.G

So I'm guessing I need to "enable more projects" maybe addiong "compiler-rt;libclc;libcxxabi;libunwind", giving those a try now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62040/new/

https://reviews.llvm.org/D62040





More information about the llvm-commits mailing list