| Issue |
60647
|
| Summary |
cmake --install with custom prefix does not work
|
| Labels |
|
| Assignees |
|
| Reporter |
Febbe
|
When compiling llvm17 via
```
cmake ../llvm -DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra -DLLVM_TARGETS_TO_BUILD=X86 --install-prefix=/home/<username>/git/llvm-project/build-install
cmake --build .
cmake --install .
```
Will fail with many errors like this:
```
CMake Error at bindings/ocaml/llvm/cmake_install.cmake:54 (file):
file cannot create directory: /usr/lib/ocaml/llvm. Maybe need
administrative privileges.
Call Stack (most recent call first):
bindings/ocaml/cmake_install.cmake:47 (include)
cmake_install.cmake:79 (include)
```
The reason is, that `/usr` is used as hard coded prefix path, instead of `${CMAKE_INSTALL_PREFIX}`.
Replacing all `/usr` occurrences fixed the problem, but then the target ocaml_doc, required by the "install" target, was not build.
Building it extra, fixed it.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs