Skip to content

Commit 2b98346

Browse files
authored
Merge pull request #180 from ocaisa/site_toolchain_error
Explain how to add locally supported toolchains in EasyBuild hooks error message
2 parents 5b9657a + c17ac36 commit 2b98346

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

eb_hooks.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,17 @@ def verify_toolchains_supported_by_eessi_version(easyconfigs):
311311
# It uses <= as there may be other dict entries in the values returned from get_toolchain_hierarchy()
312312
# but we only care that the toolchain dict (which has 'name' and 'version') appear.
313313
elif not any(toolchain.items() <= supported.items() for supported in supported_eessi_toolchains):
314+
expected_site_top_level_toolchains = [toolchain] + site_top_level_toolchains
314315
raise EasyBuildError(
315-
f"Toolchain {toolchain} (required by {ec['full_mod_name']}) is not supported in EESSI/{eessi_version}\n"
316-
f"Supported toolchains are:\n" + "\n".join(sorted(" " + str(tc) for tc in supported_eessi_toolchains))
316+
f"Toolchain {toolchain} (required by {ec['full_mod_name']}) is not supported in "
317+
f"EESSI/{eessi_version}\n"
318+
f"Supported toolchains are:\n"
319+
+ "\n".join(sorted(" " + str(tc) for tc in supported_eessi_toolchains))
320+
+ "\nIf you are using EESSI as a base for a local software stack, you can add locally supported "
321+
" toolchains by setting the environment variable:\n"
322+
f"\texport {site_top_level_toolchains_envvar}='{json.dumps(expected_site_top_level_toolchains)}'\n"
323+
"(you only need to add the highest level toolchains you use, the toolchain hierarchy is automatically "
324+
"supported)"
317325
)
318326

319327

0 commit comments

Comments
 (0)