llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

LLVM_INCLUDE_BENCHMARKS with llvm 14.0.1 failing to build.

Open heitbaum opened this issue 2 years ago • 1 comments

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:hosta 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)

heitbaum avatar Apr 16 '22 06:04 heitbaum

image It seems that I encountered the same problem.

HaskellZhangSong avatar Aug 16 '22 08:08 HaskellZhangSong

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?

sanmuga07 avatar Aug 19 '22 13:08 sanmuga07

Can someone help me with the above issue?

sanmuga07 avatar Aug 29 '22 06:08 sanmuga07

this issue persists all the way through to latest 16.0.3

FelixBer avatar May 11 '23 07:05 FelixBer

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?

meerfrau avatar May 12 '23 09:05 meerfrau

for latest 16.0.4 LLVM_INCLUDE_TESTS also needs to be set to off, in addition to LLVM_INCLUDE_BENCHMARKS.

FelixBer avatar May 25 '23 09:05 FelixBer

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.

amigalemming avatar Sep 25 '23 08:09 amigalemming