Use CPATH/LD_LIBRARY_PATH for CMake's find_path/find_library functions.#1165
Conversation
Using only self.toolchain.get_variable("CPPFLAGS", list) when setting
CMAKE_INCLUDE_PATH results in cmake incapable of finding things coming
from (build)dependencies modules.
One example is GROMACS which uses find_path/library to find hwloc and
either fails completely or finds any hwloc installed from the OS. When
using foss it should pick up the path to hwloc from the corresponding
module.
|
lgtm I'll try and test this thoroughly to see if this raises any problems, but it's indeed the right thing to do. I hope to include this in the upcoming EasyBuild v3.2.0... |
|
Testing showed that this change somehow breaks the installation of I'm not quite sure how though, since the output of the The build fails with errors like this (with EasyBuild configured to use This problem does not occur without this patch to the |
|
Why is something running around copying stuff beneath .git?? And that change can't cause permission changes in itself... |
|
@boegel please upload the cmake logs. |
|
@boegel Is this still a problem? |
|
ANTs should be scrapped. |
|
@boegel How about this one? is the ant stuff still giving you problems? |
| cpaths = os.getenv('CPATH', '').split(os.pathsep) | ||
| lpaths = os.getenv('LD_LIBRARY_PATH', '').split(os.pathsep) | ||
| include_paths = os.pathsep.join(tc_ipaths + cpaths) | ||
| library_paths = os.pathsep.join(tc_lpaths + lpaths) |
There was a problem hiding this comment.
Should we avoid duplicates here? You can use nub (which you can import from vsc.utils.missing):
include_paths = os.pathsep.join(nub(tc_ipaths + cpaths))
library_paths = os.pathsep.join(nub(tc_lpaths + lpaths))|
Any more comments on this? Without it it fails to find NVML at least. |
|
@migueldiascosta Adding you too since you seem to be very active today :-) |
|
@akesandgren no good deed goes unpunished? :) this looks sensible to me, will test it on some |
|
As you might guess I'd like to get this into 3.6.2 too. We've been using it for quite some time now without and problems. |
|
Sorry for letting this sit for so long @akesandgren... I think this is good to go, it shouldn't cause any problems, and if it does, it likely was a problem already that we just weren't aware of yet. We'll see if anything serious pops up during the upcoming regression test for EasyBuild v3.6.2... |
Using only self.toolchain.get_variable("CPPFLAGS", list) when setting
CMAKE_INCLUDE_PATH results in cmake incapable of finding things coming
from (build)dependencies modules.
One example is GROMACS which uses find_path/library to find hwloc and
either fails completely or finds any hwloc installed from the OS. When
using foss it should pick up the path to hwloc from the corresponding
module.
See issue #1164