Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM_INCLUDE_BENCHMARKS with llvm 14.0.1 failing to build. #54941

Open
heitbaum opened this issue Apr 16, 2022 · 7 comments
Open

LLVM_INCLUDE_BENCHMARKS with llvm 14.0.1 failing to build. #54941

heitbaum opened this issue Apr 16, 2022 · 7 comments
Labels
build-problem cmake Build system in general and CMake in particular

Comments

@heitbaum
Copy link

heitbaum commented Apr 16, 2022

without the benchmark patch the following build error occurs with llvm.

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)
@HaskellZhangSong
Copy link

HaskellZhangSong commented Aug 16, 2022

image
It seems that I encountered the same problem.

@sanmuga07
Copy link

sanmuga07 commented Aug 19, 2022

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
Copy link

Can someone help me with the above issue?

@FelixBer
Copy link

this issue persists all the way through to latest 16.0.3

@meerfrau
Copy link

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?

@FelixBer
Copy link

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

@amigalemming
Copy link

amigalemming commented Sep 25, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-problem cmake Build system in general and CMake in particular
Projects
None yet
Development

No branches or pull requests

7 participants