[llvm-dev] Rel400 LLVM_ENABLE_PROJECTS clang directory not found

Adam Jensen via llvm-dev llvm-dev at lists.llvm.org
Sun Jun 4 12:05:42 PDT 2017


I wandered into something curious. Source is checked out from svn following this guide: <http://clang.llvm.org/get_started.html> which is linked from this page: <http://releases.llvm.org/4.0.0/docs/index.html> - like this:

----
mkdir build
export BASE=$HOME/build
svn co http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_400/final/ $BASE/llvm_Rel400
cd $BASE/llvm_Rel400/tools
svn co http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_400/final/ clang
svn co http://llvm.org/svn/llvm-project/lld/tags/RELEASE_400/final/ lld
svn co http://llvm.org/svn/llvm-project/polly/tags/RELEASE_400/final/ polly
cd $BASE/llvm_Rel400/tools/clang/tools
svn co http://llvm.org/svn/llvm-project/clang-tools-extra/tags/RELEASE_400/final/ extra
cd $BASE/llvm_Rel400/projects
svn co http://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_400/final/ compiler-rt
svn co http://llvm.org/svn/llvm-project/openmp/tags/RELEASE_400/final/ openmp
svn co http://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_400/final/ libcxx
svn co http://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_400/final/ libcxxabi
svn co http://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_400/final/ test-suite
----

Then following this guide: <http://releases.llvm.org/4.0.0/docs/CMake.html>

----
mkdir $BASE/build_llvm
cd $BASE/build_llvm
cmake3 -G "Unix Makefiles" \
  -DLLVM_TARGETS_TO_BUILD=all \
  -DLLVM_BUILD_TOOLS=on \
  -DLLVM_BUILD_EXAMPLES=on \
  -DLLVM_BUILD_TESTS=on \
  -DLLVM_ENABLE_PROJECTS=all \
  -DCMAKE_INSTALL_PREFIX=$HOME/.local/llvm \
  -DCMAKE_BUILD_TYPE=Release $BASE/llvm_Rel400 \
  $BASE/llvm_Rel400
----

Results in:

----
CMake Error at CMakeLists.txt:122 (message):
  LLVM_ENABLE_PROJECTS requests clang but directory not found:
  /home/hanzer/build/llvm_Rel400/../clang
----

view $BASE/llvm_Rel400/CMakeLists.txt

----
    116 if( LLVM_ENABLE_PROJECTS STREQUAL "all" )
    117   set( LLVM_ENABLE_PROJECTS ${LLVM_ALL_PROJECTS})
    118 endif()
    119 foreach(proj ${LLVM_ENABLE_PROJECTS})
    120   set(PROJ_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../${proj}")
    121   if(NOT EXISTS "${PROJ_DIR}" OR NOT IS_DIRECTORY "${PROJ_DIR}")
    122     message(FATAL_ERROR "LLVM_ENABLE_PROJECTS requests ${proj} but directory not found: ${PROJ_DIR}")
    123   endif()
----

If CMakeLists.txt expects clang to be somewhere other than "$BASE/llvm_Rel400/tools/clang", is there some incongruity with the documentation?



More information about the llvm-dev mailing list