iree
iree copied to clipboard
Executing cmake --install does not install compiler headers
What happened?
The headers are not being installed as part of the installation process. The e.g. libIREECompiler.so lib is installed just fine.
Looking at the cmake generated install files, I can see it compares the component names with expected strings. For both of the compiler/src/iree/compiler/API/cmake_install.cmake
(where the library is handled) and compiler/bindings/c/cmake_install.cmake
(where the headers are handled) the CMAKE_INSTALL_COMPONENT
variable is always empty. However, the former file contains instructions to check for an empty string and installs the library even if the component name is empty. The header related file does not have checks for empty names. So the headers are simply skipped during the installation process.
Steps to reproduce your issue
- Configure (my setup):
cmake -G Ninja -B ../iree-build -S . \
-DIREE_TARGET_BACKEND_ROCM=OFF \
-DIREE_TARGET_BACKEND_METAL_SPIRV=OFF \
-DIREE_CUDA_LIBDEVICE_PATH=/usr/lib/nvidia-cuda-toolkit/libdevice/libdevice.10.bc \
-DIREE_BUILD_DOCS=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DIREE_ENABLE_ASSERTIONS=ON \
-DIREE_ENABLE_SPLIT_DWARF=ON \
-DIREE_ENABLE_LLD=ON \
-DIREE_BUILD_PYTHON_BINDINGS=ON \
-DPython3_EXECUTABLE="$(which python3)" \
-DCMAKE_INSTALL_PREFIX="${HOME}/.local" \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_CUDA_COMPILER=nvcc \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
.
- Build:
cmake --build ../iree-build
- Install (no headers are installed, no
${HOME}/.local/include
is created):
cmake --install ../iree-build
What component(s) does this issue relate to?
Compiler
Version information
14895845b Adding iree-benchmark-executable help text for CUDA.
Additional context
Meanwhile, the headers can be installed with ninja
with no issues:
ninja -C ../iree-build iree-install-dist