From 5be4b970426e7575c59600c140b3fb5478e83cd8 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Fri, 14 Nov 2025 18:15:16 +0100 Subject: [PATCH 1/2] Fix error due to access to toolchain build dependencies In #5042 `tcdeps` is actually used to get the software roots. Those are only available for *runtime* dependencies of the toolchain module. So it will fail for build dependencies which are however included by EasyConfig.toolchain. --- easybuild/framework/easyconfig/easyconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/framework/easyconfig/easyconfig.py b/easybuild/framework/easyconfig/easyconfig.py index ac4345cc85..7c8e3b8b23 100644 --- a/easybuild/framework/easyconfig/easyconfig.py +++ b/easybuild/framework/easyconfig/easyconfig.py @@ -1279,7 +1279,7 @@ def toolchain(self): else: self.log.debug("Found easyconfig for toolchain %s version %s: %s", tcname, tcversion, tc_ecfile) tc_ec = process_easyconfig(tc_ecfile)[0] - tcdeps = tc_ec['ec'].dependencies() + tcdeps = tc_ec['ec'].dependencies(runtime_only=True) self.log.debug("Toolchain dependencies based on easyconfig: %s", tcdeps) self._toolchain = get_toolchain(self['toolchain'], self['toolchainopts'], From 8285fc28b4ecaad9efc36f0c110d264426822a44 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 14 Nov 2025 20:49:34 +0100 Subject: [PATCH 2/2] enhance test_exts_deps_build_env to verify fix made in #5048 --- test/framework/easyblock.py | 20 +++++++++++++++++++ .../test_ecs/g/GCCcore/GCCcore-12.3.0.eb | 6 +++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/test/framework/easyblock.py b/test/framework/easyblock.py index 5413c2c5b6..d2347029b0 100644 --- a/test/framework/easyblock.py +++ b/test/framework/easyblock.py @@ -3809,6 +3809,26 @@ def test_exts_deps_build_env(self): self.fail(f"Unknown type of environment variable: ${env_var}") self.assertTrue(regex.search(log_txt), f"Pattern '{regex.pattern}' not found in log output") + # verify fix made in https://github.com/easybuilders/easybuild-framework/pull/5048 + test_ec_txt = read_file(toy_ec) + test_ec_txt += textwrap.dedent(""" + toolchain = {'name': 'GCCcore', 'version': '12.3.0'} + """) + write_file(test_ec, test_ec_txt) + args = [ + test_ec, + '--rebuild', + '--debug', + ] + with self.mocked_stdout_stderr(): + with self.log_to_testlogfile(): + self.eb_main(args, raise_error=True, do_build=True, verbose=True) + + log_txt = read_file(self.logfile) + + regex = re.compile(r"\[SUCCESS\] toy/0.0-GCCcore-12.3.0", re.M) + self.assertTrue(regex.search(log_txt), f"Pattern '{regex.pattern}' not found in log output") + def suite(loader=None): """ return all the tests in this file """ diff --git a/test/framework/easyconfigs/test_ecs/g/GCCcore/GCCcore-12.3.0.eb b/test/framework/easyconfigs/test_ecs/g/GCCcore/GCCcore-12.3.0.eb index 65c1b9682f..469bd72ab9 100644 --- a/test/framework/easyconfigs/test_ecs/g/GCCcore/GCCcore-12.3.0.eb +++ b/test/framework/easyconfigs/test_ecs/g/GCCcore/GCCcore-12.3.0.eb @@ -14,7 +14,11 @@ source_urls = [ 'http://ftpmirror.gnu.org/%(namelower)s/%(namelower)s-%(version)s', # GCC auto-resolving HTTP mirror ] -#gcc_name = 'GCC' +# only here to verify the fix made in https://github.com/easybuilders/easybuild-framework/pull/5048, +# see also test_exts_deps_build_env +builddependencies = [ + ('gzip', '1.4'), +] sources = [ SOURCELOWER_TAR_BZ2,