remove default separate_build_dir = True from openkim-models#23317
Conversation
|
This fails for me - with or without the change in this PR Repeated for the |
|
Maybe due to rpath being enabled now? (and it wasn't when we we merged this the first time) |
|
I dug a bit. The problems are not with this change, it's due to this build using the old wrapper paths from the kim-api installations (that of course no longer exist) When building openkim-* i added some tracing, and found the culprit. I tried to find a way to be able to enforce this from the command line, making it impossible for scripts to fuck it up like this, and the only way i think it can be done is via a toolchain file combined with https://stackoverflow.com/questions/61499646/cmake-set-variable-readonly-protect-from-override this technique to rewrite the variables back to the correct value whenever they are modified. # eb-shell> cat enforce-compilers.cmake
macro(set_readonly VAR)
# Set the variable itself
set("${VAR}" "${ARGN}")
# Store the variable's value for restore it upon modifications.
set("_${VAR}_readonly_val" "${ARGN}")
# Register a watcher for a variable
variable_watch("${VAR}" readonly_guard)
endmacro()
# Watcher for a variable which emulates readonly property.
macro(readonly_guard VAR access value current_list_file stack)
if ("${access}" STREQUAL "MODIFIED_ACCESS")
message(WARNING "Attempt to change readonly variable '${VAR}'!")
# Restore a value of the variable to the initial one.
set(${VAR} "${_${VAR}_readonly_val}")
endif()
endmacro()
set_readonly(CMAKE_C_COMPILER "/dev/shm/eb-qjo2wf97/tmpuovb52j4/rpath_wrappers/gcc_wrapper/gcc")
set_readonly(CMAKE_CXX_COMPILER "/dev/shm/eb-qjo2wf97/tmpuovb52j4/rpath_wrappers/gxx_wrapper/g++")
set_readonly(CMAKE_Fortran_COMPILER "/dev/shm/eb-qjo2wf97/tmpuovb52j4/rpath_wrappers/gfortran_wrapper/gfortran")combined with does the trick. We could consider always doing this. Generating |
Micket
left a comment
There was a problem hiding this comment.
lgtm (I've tested locally with a newer version to confirm that this change is unrelated to the compiler problem, which stems from kim-api and is a pretty deep issue with how cmakemake easyblock works, so I can't even fix it in this PR)
(created using
eb --new-pr)