Issue |
134258
|
Summary |
CMake Config files don't provide deprecated Module variables
|
Labels |
new issue
|
Assignees |
|
Reporter |
bebuch
|
I try to build LLVM with zlib-ng (in compatability mode), zstd and libxml2. I have build these projects an installed there config files. I use a custom include install path. Therefor the outdated CMake Modules can't work for my build.
The modern project Config files do not provide `ZLIB_INCLUDE_DIR`, `ZLIB_LIBRARY`, `zstd_INCLUDE_DIR`, `zstd_LIBRARY`, `LIBXML2_LIBRARY` and `LIBXML2_INCLUDE_DIR`.
LLVM CMake code depends on these variables. It also uses the targets which are produced by the Modules and the Config files.
ZLIB is broken right at the start:
https://github.com/llvm/llvm-project/blob/61ef28650626dd4f651a250005c77255d8086f69/llvm/cmake/config-ix.cmake#L165-L186
Only the check depends on the old variables, so it works if you remove it.
The next problematic section seams to be:
https://github.com/llvm/llvm-project/blob/2334fd2ea3a0a391ca88da36764d895d9c34e1bc/llvm/cmake/modules/LLVMExternalProjectUtils.cmake#L172-L196
I think the variables are here passed to a subsequent call. This might be the reason for these errors in my build run:
```none
loading initial cache file C:/TechnoTeam/develop/usr/build/llvm/projects/runtimes/tmp/runtimes-cache-Release.cmake
-- Performing bootstrapping runtimes build.
-- Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR)
-- Could NOT find zstd (missing: zstd_INCLUDE_DIR)
-- Could NOT find LibXml2 (missing: LIBXML2_INCLUDE_DIR)
-- Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR)
-- Could NOT find zstd (missing: zstd_INCLUDE_DIR)
-- Could NOT find LibXml2 (missing: LIBXML2_INCLUDE_DIR)
CMake Error at C:/temp/tt/env/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
Could NOT find Python3 (missing: Python3_EXECUTABLE Interpreter)
Call Stack (most recent call first):
C:/temp/tt/env/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
C:/temp/tt/env/share/cmake-3.31/Modules/FindPython/Support.cmake:4002 (find_package_handle_standard_args)
C:/temp/tt/env/share/cmake-3.31/Modules/FindPython3.cmake:602 (include)
CMakeLists.txt:180 (find_package)
```
I'm not sure whats the best way to fix this. On simple way might be to create the variables from the targets if they don't exist after the `find_package`.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs