Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions easybuild/easyblocks/r/root.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from easybuild.framework.easyconfig import CUSTOM
from easybuild.easyblocks.generic.cmakemake import CMakeMake
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.environment import setvar
from easybuild.tools.filetools import find_glob_pattern
from easybuild.tools.modules import get_software_root, get_software_version
from easybuild.tools.run import run_cmd
Expand All @@ -56,6 +57,18 @@ def extra_options():
def configure_step(self):
"""Custom configuration for ROOT, add configure options."""

# ROOT includes an (old) copy of LLVM;
# if LLVM is loaded as an indirect dep, we need to make sure
# the location to its header files is not included in $CPATH
llvm_root = get_software_root('LLVM')
if llvm_root:
llvm_inc = os.path.join(llvm_root, 'include')
cpath = os.getenv('CPATH')
if cpath:
new_cpath = [p for p in cpath.split(os.pathsep) if p != llvm_inc]
self.log.info("Filtered %s from $CPATH to avoid using LLVM loaded as indirect dependency", llvm_inc)
setvar('CPATH', os.pathsep.join(new_cpath))

# using ./configure is deprecated/broken in recent versions, need to use CMake instead
if LooseVersion(self.version.lstrip('v')) >= LooseVersion('6.10'):
if self.cfg['arch']:
Expand Down