llvm-project
llvm-project copied to clipboard
LLVM_INCLUDE_BENCHMARKS with llvm 14.0.1 failing to build.
without the benchmark patch the following build error occurs with llvm.
- https://github.com/LibreELEC/LibreELEC.tv/pull/6375
It appears to be that the if (LLVM_INCLUDE_BENCHMARKS)
is expanded before the make option is overridden. Unsure if this is a cmake BUG / FEATURE or an error in the llvm/CMakeLists.txt
file. If you run scripts/build llvm:host
a 2nd time straight away - it successfully compiles. The CMakeCache.txt file has the correct option in it LLVM_INCLUDE_BENCHMARKS:BOOL=OFF
so the option -DLLVM_INCLUDE_BENCHMARKS=OFF
is correctly being past from the command line.
-- Registering Bye as a pass plugin (static build: OFF)
CMake Error at CMakeLists.txt:1256 (add_subdirectory):
add_subdirectory given source
"/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/llvm-14.0.1/../third-party/benchmark"
which is not an existing directory.
-- Configuring incomplete, errors occurred!
--- a/CMakeLists.txt 2022-04-02 06:26:04.688530539 +0000
+++ b/CMakeLists.txt 2022-04-02 06:44:00.015717360 +0000
@@ -616,7 +616,7 @@
option(LLVM_BUILD_BENCHMARKS "Add LLVM benchmark targets to the list of default
targets. If OFF, benchmarks still could be built using Benchmarks target." OFF)
-option(LLVM_INCLUDE_BENCHMARKS "Generate benchmark targets. If OFF, benchmarks can't be built." ON)
+option(LLVM_INCLUDE_BENCHMARKS "Generate benchmark targets. If OFF, benchmarks can't be built." OFF)
option (LLVM_BUILD_DOCS "Build the llvm documentation." OFF)
option (LLVM_INCLUDE_DOCS "Generate build targets for llvm documentation." ON)
It seems that I encountered the same problem.
I try to build llvm 14.0.4 and it fails with the following error
-- Looking for include file sys/inotify.h -- Looking for include file sys/inotify.h - found -- Not building amdgpu-arch: hsa-runtime64 not found -- LLD version: 14.0.4 -- Registering Bye as a pass plugin (static build: OFF) -- Configuring incomplete, errors occurred!
Can someone help me here?
Can someone help me with the above issue?
this issue persists all the way through to latest 16.0.3
Indeed:
-- Targeting XCore
CMake Error at CMakeLists.txt:1171 (add_subdirectory):
add_subdirectory given source
"./llvm-16.0.3.src/../third-party/unittest"
which is not an existing directory.
-- Registering ExampleIRTransforms as a pass plugin (static build: OFF)
-- Registering Bye as a pass plugin (static build: OFF)
CMake Error at CMakeLists.txt:1340 (add_subdirectory):
add_subdirectory given source
"./llvm-16.0.3.src/../third-party/benchmark"
which is not an existing directory.
@Felix May I build after symlinking?
for latest 16.0.4 LLVM_INCLUDE_TESTS also needs to be set to off, in addition to LLVM_INCLUDE_BENCHMARKS.
Why is LLVM_INCLUDE_BENCHMARKS
enabled by default if the benchmarks are not part of the core llvm
source tarball? Sounds like a bug for me.