Skip to content

Cmake get_directory_property fails on external LLVM #8141

@rarensu

Description

@rarensu
  • [check ] Checked for duplicates

Describe the bug

With regard to the file
interpreter/CMakeLists.txt
commit 408de13
moved the line
get_directory_property(LLVM_DEFS DIRECTORY llvm/src COMPILE_DEFINITIONS)
from inside
if (builtin_llvm)
to inside
if (builtin_cling)

Error looks like:

CMake Error at interpreter/CMakeLists.txt:452 (get_directory_property):
get_directory_property DIRECTORY argument provided but requested directory
not found. This could be because the directory argument was invalid or, it
is valid but has not been processed yet.

Expected behavior

The previous method of handling this was to simply skip this procedure. The compile flags from the external LLVM would not be appended to CLING compile flags. The new logic always checks for this dir even if llvm is external. As a result, it no longer works with my external LLVM, which doesn't have a copy of the /src directory in its installation dir. My build system removes the source trees and build dirs to save space on disk. LLVM install dir does contain cmakefiles under lib/cmake/ and those were used to identify it correctly.

To Reproduce

Setup

obtained root from https://root.cern.ch/download/root_v6.24.00.source.tar.gz

Additional context

I am building with cmake and I have builtin_llvm OFF but builtin_cling ON because the internet told me I am not allowed to use my own cling, I have to use the one with root-patches. I am trying very hard to not use the builtin_llvm because it clashes with the other builds on my system so root either fails to build or just crashes, depending on the version. I am an easybuilder and if I can get this to work, lots of other easybuilders will be able to replicate my procedure and build ROOT.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions