<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - libcxxabi cannot find /share/llvm/cmake (llvm install creates no share/llvm dir)"
   href="https://llvm.org/bugs/show_bug.cgi?id=26621">26621</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>libcxxabi cannot find /share/llvm/cmake (llvm install creates no share/llvm dir)
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Build scripts
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>cmake
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>gonzalobg88@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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 <a href="http://llvm.org/svn/llvm-project/llvm/trunk">http://llvm.org/svn/llvm-project/llvm/trunk</a> ${LLVM_SRC} -q
#svn co <a href="http://llvm.org/svn/llvm-project/cfe/trunk">http://llvm.org/svn/llvm-project/cfe/trunk</a> ${CLANG_SRC} -q
#svn co <a href="http://llvm.org/svn/llvm-project/clang-tools-extra/trunk">http://llvm.org/svn/llvm-project/clang-tools-extra/trunk</a>
${CLANG_TOOLS_EXTRA_SRC} -q
#svn co <a href="http://llvm.org/svn/llvm-project/compiler-rt/trunk">http://llvm.org/svn/llvm-project/compiler-rt/trunk</a> ${COMPILER_RT_SRC}
-q
# TODO: polly

git clone --depth 1 <a href="https://github.com/llvm-mirror/llvm.git">https://github.com/llvm-mirror/llvm.git</a> ${LLVM_SRC}
git clone --depth 1 <a href="https://github.com/llvm-mirror/clang.git">https://github.com/llvm-mirror/clang.git</a> ${CLANG_SRC}
git clone --depth 1 <a href="https://github.com/llvm-mirror/clang-tools-extra.git">https://github.com/llvm-mirror/clang-tools-extra.git</a>
${CLANG_TOOLS_EXTRA_SRC}
git clone --depth 1 <a href="https://github.com/llvm-mirror/compiler-rt.git">https://github.com/llvm-mirror/compiler-rt.git</a>
${COMPILER_RT_SRC}
git clone --depth 1 <a href="https://github.com/llvm-mirror/polly.git">https://github.com/llvm-mirror/polly.git</a> ${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 <a href="http://llvm.org/svn/llvm-project/libcxx/trunk">http://llvm.org/svn/llvm-project/libcxx/trunk</a> ${LIBCXX_SRC} -q
#svn co <a href="http://llvm.org/svn/llvm-project/libcxxabi/trunk">http://llvm.org/svn/llvm-project/libcxxabi/trunk</a> ${LIBCXXABI_SRC} -q

git clone --depth 1 <a href="https://github.com/llvm-mirror/libcxx.git">https://github.com/llvm-mirror/libcxx.git</a> ${LIBCXX_SRC}
git clone --depth 1 <a href="https://github.com/llvm-mirror/libcxxabi.git">https://github.com/llvm-mirror/libcxxabi.git</a>
${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</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>