[llvm-bugs] [Bug 26621] New: libcxxabi cannot find /share/llvm/cmake (llvm install creates no share/llvm dir)

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Feb 15 05:49:38 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26621

            Bug ID: 26621
           Summary: libcxxabi cannot find /share/llvm/cmake (llvm install
                    creates no share/llvm dir)
           Product: Build scripts
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: cmake
          Assignee: unassignedbugs at nondot.org
          Reporter: gonzalobg88 at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

After compiling and installing llvm trunk from source my share/ folder
contains:

/share/clang
/share/man
/share/scan-build
/share/scan-view

However when compiling libcxxabi from source I get the following cmake error:

-- Found LLVM_CONFIG as bin/llvm-config
CMake Error at CMakeLists.txt:63 (message):
  Not found: share/llvm/cmake

There is no llvm folder in share/ after installing LLVM but libcxxabi tries to
find one.

In Appendix A I show how I installed llvm in MacOS X 10.11.2 from source.
In Appendix B I show how I am trying to install libcxx, libcxxabi, and a
msan-libcxx. The error happens in the first step (when trying to bootstrap
libcxxabi with the header files of a new libcxx_.

APPENDIX A: I am on MacOS X and installed llvm as follows:

#!/bin/bash

echo "[INSTALL]: LLVM"

export POOL_DIR=${POOL:?"Need to set POOL to a non-empty path"}
export POOL_JOBS_=${POOL_JOBS:?"Need to set POOL to number > 0"}

export SRC_BASE=${POOL_DIR}/src
export BUILD_BASE=${POOL_DIR}/build
export PREFIX=${POOL_DIR}
export LLVM_SRC=${SRC_BASE}/llvm
export POLLY_SRC=${LLVM_SRC}/tools/polly
export CLANG_SRC=${LLVM_SRC}/tools/clang
export CLANG_TOOLS_SRC=${LLVM_SRC}/tools/clang/tools
export CLANG_TOOLS_EXTRA_SRC=${CLANG_TOOLS_SRC}/extra
export COMPILER_RT_SRC=${LLVM_SRC}/projects/compiler-rt
export LLDB_SRC=${LLVM_SRC}/tools/lldb
export CLOOG_SRC=${SRC_BASE}/cloog
export CLOOG_INSTALL=${BUILD_BASE}/cloog
export LLVM_BUILD=${BUILD_BASE}/llvm

cd ${POOL_DIR}
mkdir ${SRC_BASE}
mkdir ${BUILD_BASE}

rm -rf ${LLVM_SRC}

#svn co http://llvm.org/svn/llvm-project/llvm/trunk ${LLVM_SRC} -q
#svn co http://llvm.org/svn/llvm-project/cfe/trunk ${CLANG_SRC} -q
#svn co http://llvm.org/svn/llvm-project/clang-tools-extra/trunk
${CLANG_TOOLS_EXTRA_SRC} -q
#svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk ${COMPILER_RT_SRC}
-q
# TODO: polly

git clone --depth 1 https://github.com/llvm-mirror/llvm.git ${LLVM_SRC}
git clone --depth 1 https://github.com/llvm-mirror/clang.git ${CLANG_SRC}
git clone --depth 1 https://github.com/llvm-mirror/clang-tools-extra.git
${CLANG_TOOLS_EXTRA_SRC}
git clone --depth 1 https://github.com/llvm-mirror/compiler-rt.git
${COMPILER_RT_SRC}
git clone --depth 1 https://github.com/llvm-mirror/polly.git ${POLLY_SRC}

rm -rf ${LLVM_BUILD}
mkdir ${LLVM_BUILD}
cd ${LLVM_BUILD}

# The first time using the script requires a C and C++ compiler
# CC=clang
# CXX=clang++
cmake ${LLVM_SRC} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${PREFIX}
-DLLVM_TARGETS_TO_BUILD="X86" -DLINK_POLLY_INTO_TOOLS:Bool=ON
make -j $POOL_JOBS
make install

cd ${PREFIX}

echo "[DONE]: LLVM installed!"


APPENDIX B: This is how I am trying to bootstrap a new libcxx:

#!/bin/bash

echo "[INSTALL]: LIBCXX"

export POOL_DIR=${POOL:?"Need to set POOL to a non-empty path"}
export POOL_JOBS_=${POOL_JOBS:?"Need to set POOL to number > 0"}

export SRC_BASE=${POOL_DIR}/src
export BUILD_BASE=${POOL_DIR}/build
export PREFIX=${POOL_DIR}
export MSAN_PREFIX=${POOL_DIR}/msan

export LLVM_LIT=${SRC_BASE}/llvm/utils/lit/lit.py

export LLVM_PATH=${SRC_BASE}/llvm
export LIBCXX_SRC=${SRC_BASE}/llvm/projects/libcxx
export LIBCXX_BUILD=${BUILD_BASE}/libcxx
export LIBCXX_MSAN_BUILD=${BUILD_BASE}/libcxx_msan
export LIBCXXABI_SRC=${SRC_BASE}/llvm/projects/libcxxabi
export LIBCXXABI_BUILD=${BUILD_BASE}/libcxxabi
export LIBCXXABI_MSAN_BUILD=${BUILD_BASE}/libcxxabi_msan

export CXX=${POOL_DIR}/bin/clang++
export CC=${POOL_DIR}/bin/clang

mkdir ${SRC_BASE}
mkdir ${BUILD_BASE}

rm -rf ${LIBCXX_SRC}
rm -rf ${LIBCXXABI_SRC}

#svn co http://llvm.org/svn/llvm-project/libcxx/trunk ${LIBCXX_SRC} -q
#svn co http://llvm.org/svn/llvm-project/libcxxabi/trunk ${LIBCXXABI_SRC} -q

git clone --depth 1 https://github.com/llvm-mirror/libcxx.git ${LIBCXX_SRC}
git clone --depth 1 https://github.com/llvm-mirror/libcxxabi.git
${LIBCXXABI_SRC}

rm -rf ${LIBCXX_BUILD}
mkdir ${LIBCXX_BUILD}

rm -rf ${LIBCXXABI_BUILD}
mkdir ${LIBCXXABI_BUILD}

# Step 1: build libcxxabi with new libcxx headers
cd ${LIBCXXABI_BUILD}
cmake ${LIBCXXABI_SRC} -DLIBCXXABI_LIBCXX_INCLUDES=$LIBCXX_SRC/include
-DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_INSTALL_PREFIX=${PREFIX} -DLLVM_CONFIG=${PREFIX}/bin/llvm-config
make -j $POOL_JOBS
make install

export LIBCXXABI_PATH=$POOL_DIR/lib
export LD_LIBRARY_PATH=$LIBCXXABI_PATH:$LD_LIBRARY_PATH

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160215/a4a4c0f4/attachment.html>


More information about the llvm-bugs mailing list