From 60b8522a70c3438137f76a9a46be61940de9f5b6 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 22 Nov 2020 20:19:12 +0100 Subject: [PATCH 01/28] patch CMake's UnixPaths.cmake script if --sysroot is set --- easybuild/easyblocks/c/cmake.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/easybuild/easyblocks/c/cmake.py b/easybuild/easyblocks/c/cmake.py index 8dd488953b..41cf685060 100644 --- a/easybuild/easyblocks/c/cmake.py +++ b/easybuild/easyblocks/c/cmake.py @@ -29,7 +29,9 @@ from easybuild.easyblocks.generic.configuremake import ConfigureMake from easybuild.framework.easyconfig import CUSTOM +from easybuild.tools.build_log import EasyBuildError from easybuild.tools.config import build_option +from easybuild.tools.filetools import apply_regex_substitutions from easybuild.tools.modules import get_software_root, get_software_libdir import easybuild.tools.environment as env @@ -47,6 +49,29 @@ def extra_options(): }) return extra_vars + def patch_step(self): + """ + Apply patch files, and do runtime patching (if needed). + + Tweak UnixPaths.cmake if EasyBuild is configured with --sysroot. + """ + super(EB_CMake, self).patch_step() + + sysroot = build_option('sysroot') + if sysroot: + # prepend custom sysroot to all hardcoded paths like /lib and /usr + # see also patch applied by Gentoo: + # https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-util/cmake/files/cmake-3.14.0_rc3-prefix-dirs.patch + srcdir = os.path.join(self.builddir, 'cmake-%s' % self.version) + unixpaths_cmake = os.path.join(srcdir, 'Modules', 'Platform', 'UnixPaths.cmake') + if os.path.exists(unixpaths_cmake): + regex_subs = [ + (r' /([a-z])', r' %s/\1' % sysroot), + ] + apply_regex_substitutions(unixpaths_cmake, regex_subs) + else: + raise EasyBuildError("File to patch %s not found", unixpaths_cmake) + def configure_step(self): """ Run qmake on the GUI, if necessary @@ -95,6 +120,7 @@ def configure_step(self): self.log.info("Found sysroot '%s', adding it to $CMAKE_PREFIX_PATH and $CMAKE_LIBRARY_PATH", sysroot) cmake_prefix_path.append(sysroot) cmake_library_path.append(os.path.join(sysroot, 'usr', 'lib')) + cmake_library_path.append(os.path.join(sysroot, 'usr', 'lib64')) cmake_include_path.append(os.path.join(sysroot, 'usr', 'include')) cmake_path_env_vars = { From 908baec18ea84bc8cbf001f9c8681d4161ab7fc3 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 22 Nov 2020 20:35:35 +0100 Subject: [PATCH 02/28] also replace hardcoded / with sysroot in CMake's UnixPaths.cmake --- easybuild/easyblocks/c/cmake.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/easybuild/easyblocks/c/cmake.py b/easybuild/easyblocks/c/cmake.py index 41cf685060..6bcccc3f67 100644 --- a/easybuild/easyblocks/c/cmake.py +++ b/easybuild/easyblocks/c/cmake.py @@ -67,6 +67,10 @@ def patch_step(self): if os.path.exists(unixpaths_cmake): regex_subs = [ (r' /([a-z])', r' %s/\1' % sysroot), + # also replace hardcoded '/' (root path) + (r' / ', r' %s ' % sysroot), + # also replace just '/' appearing at the end of a line + (r' /$', r' %s' % sysroot), ] apply_regex_substitutions(unixpaths_cmake, regex_subs) else: From 6bf4d1f8e8230bbb62d5a3ae986f8948b1400185 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 22 Nov 2020 21:05:40 +0100 Subject: [PATCH 03/28] also add /usr/lib* and /lib* paths to CMAKE_SYSTEM_LIBRARY_PATH in CMake's UnixPaths.cmake script --- easybuild/easyblocks/c/cmake.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/easybuild/easyblocks/c/cmake.py b/easybuild/easyblocks/c/cmake.py index 6bcccc3f67..c5b0e85c9b 100644 --- a/easybuild/easyblocks/c/cmake.py +++ b/easybuild/easyblocks/c/cmake.py @@ -64,8 +64,14 @@ def patch_step(self): # https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-util/cmake/files/cmake-3.14.0_rc3-prefix-dirs.patch srcdir = os.path.join(self.builddir, 'cmake-%s' % self.version) unixpaths_cmake = os.path.join(srcdir, 'Modules', 'Platform', 'UnixPaths.cmake') + self.log.info("Patching %s to take into account --sysroot=%s", unixpaths_cmake, sysroot) + + sysroot_lib_dirs = [os.path.join(sysroot, x) for x in ['/usr/lib64', '/usr/lib', '/lib64', '/lib']] if os.path.exists(unixpaths_cmake): regex_subs = [ + # add /usr/lib* and /lib* paths to CMAKE_SYSTEM_LIBRARY_PATH + (r'(APPEND CMAKE_SYSTEM_LIBRARY_PATH)', r'\1 %s' % ' '.join(sysroot_lib_dirs)), + # replace all hardcoded paths like /usr with /usr (r' /([a-z])', r' %s/\1' % sysroot), # also replace hardcoded '/' (root path) (r' / ', r' %s ' % sysroot), From 98d696e39ff2adb676ce38b78c873dbcc5d2c674 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Mon, 29 May 2023 16:06:27 +0200 Subject: [PATCH 04/28] fix incorrect sanity_check_step for torchvision. --- easybuild/easyblocks/t/torchvision.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/easybuild/easyblocks/t/torchvision.py b/easybuild/easyblocks/t/torchvision.py index 7ef971a8b9..cfc5d840c2 100644 --- a/easybuild/easyblocks/t/torchvision.py +++ b/easybuild/easyblocks/t/torchvision.py @@ -28,7 +28,10 @@ @author: Alexander Grund (TU Dresden) @author: Kenneth Hoste (HPC-UGent) """ -from easybuild.easyblocks.generic.pythonpackage import PythonPackage + +import os + +from easybuild.easyblocks.generic.pythonpackage import PythonPackage, det_pylibdir from easybuild.tools.build_log import EasyBuildError from easybuild.tools.config import build_option from easybuild.tools.modules import get_software_version @@ -82,12 +85,14 @@ def configure_step(self): def sanity_check_step(self): """Custom sanity check for torchvision.""" - custom_commands = [] + custom_commands = None + custom_paths = None # check whether torchvision was indeed built with CUDA support, # cfr. https://discuss.pytorch.org/t/notimplementederror-could-not-run-torchvision-nms-with-arguments-from-\ # the-cuda-backend-this-could-be-because-the-operator-doesnt-exist-for-this-backend/132352/4 if self.with_cuda: + custom_commands = [] python_code = '; '.join([ "import torch, torchvision", "boxes = torch.tensor([[0., 1., 2., 3.]]).to('cuda')", @@ -95,5 +100,9 @@ def sanity_check_step(self): "print(torchvision.ops.nms(boxes, scores, 0.5))", ]) custom_commands.append('python -c "%s"' % python_code) + custom_paths = { + 'files': [], + 'dirs': [det_pylibdir()], + } - super(EB_torchvision, self).sanity_check_step(custom_commands=custom_commands) + return super(EB_torchvision, self).sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) From a897e4524f72f78cb32c38131845a3dca82eca46 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Mon, 29 May 2023 16:09:44 +0200 Subject: [PATCH 05/28] drop import os which is not used --- easybuild/easyblocks/t/torchvision.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/easybuild/easyblocks/t/torchvision.py b/easybuild/easyblocks/t/torchvision.py index cfc5d840c2..5536b89139 100644 --- a/easybuild/easyblocks/t/torchvision.py +++ b/easybuild/easyblocks/t/torchvision.py @@ -28,9 +28,6 @@ @author: Alexander Grund (TU Dresden) @author: Kenneth Hoste (HPC-UGent) """ - -import os - from easybuild.easyblocks.generic.pythonpackage import PythonPackage, det_pylibdir from easybuild.tools.build_log import EasyBuildError from easybuild.tools.config import build_option From e6f0c5dfafb97e1748ba74111f70f342fef46a67 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 30 May 2023 16:54:34 +0200 Subject: [PATCH 06/28] bump version to 4.7.3dev --- easybuild/easyblocks/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/__init__.py b/easybuild/easyblocks/__init__.py index f740a2523e..445fac1632 100644 --- a/easybuild/easyblocks/__init__.py +++ b/easybuild/easyblocks/__init__.py @@ -43,7 +43,7 @@ # recent setuptools versions will *TRANSFORM* something like 'X.Y.Zdev' into 'X.Y.Z.dev0', with a warning like # UserWarning: Normalizing '2.4.0dev' to '2.4.0.dev0' # This causes problems further up the dependency chain... -VERSION = LooseVersion('4.7.2') +VERSION = LooseVersion('4.7.3.dev0') UNKNOWN = 'UNKNOWN' From 995954c43be99f56c0351478a217a058b5e06097 Mon Sep 17 00:00:00 2001 From: Xin Wu Date: Tue, 30 May 2023 20:02:53 +0200 Subject: [PATCH 07/28] add support for NVIDIA Hopper CC 9.0 in LAMMPS --- easybuild/easyblocks/l/lammps.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easybuild/easyblocks/l/lammps.py b/easybuild/easyblocks/l/lammps.py index d026696a4d..8b4b4dbe2e 100644 --- a/easybuild/easyblocks/l/lammps.py +++ b/easybuild/easyblocks/l/lammps.py @@ -86,6 +86,7 @@ 'TURING75', # NVIDIA Turing generation CC 7.5 GPU 'AMPERE80', # NVIDIA Ampere generation CC 8.0 GPU 'AMPERE86', # NVIDIA Ampere generation CC 8.6 GPU + 'HOPPER90', # NVIDIA Hopper generation CC 9.0 GPU 'VEGA900', # AMD GPU MI25 GFX900 'VEGA906', # AMD GPU MI50/MI60 GFX906 'VEGA908', # AMD GPU MI100 GFX908 @@ -135,6 +136,7 @@ '7.5': 'TURING75', # NVIDIA Turing generation CC 7.5 '8.0': 'AMPERE80', # NVIDIA Ampere generation CC 8.0 '8.6': 'AMPERE86', # NVIDIA Ampere generation CC 8.6 + '9.0': 'HOPPER90', # NVIDIA Hopper generation CC 9.0 } # lammps version, which caused the most changes. This may not be precise, but it does work with existing easyconfigs From e120a39060d7df2360ca8da7a3f2563ca3f0137b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 1 Jun 2023 19:28:47 +0200 Subject: [PATCH 08/28] stop running tests with Python 2.7 since it is no longer supported in GitHub Actions --- .github/workflows/unit_tests.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index b5164b143b..b1cf6dc64a 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -13,12 +13,12 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, '3.10', '3.11'] + python: [3.5, 3.6, 3.7, 3.8, 3.9, '3.10', '3.11'] modules_tool: [Lmod-6.6.3, Lmod-7.8.22, Lmod-8.1.14, modules-tcl-1.147, modules-3.2.10, modules-4.1.4] module_syntax: [Lua, Tcl] # exclude some configuration for non-Lmod modules tool: # - don't test with Lua module syntax (only supported in Lmod) - # - don't test with Python 3.5 and 3.7+ (only with 2.7 and 3.6), to limit test configurations + # - don't test with Python 3.5 and 3.7+ (only with 3.6), to limit test configurations exclude: - modules_tool: modules-tcl-1.147 module_syntax: Lua @@ -36,6 +36,8 @@ jobs: python: 3.9 - modules_tool: modules-tcl-1.147 python: '3.10' + - modules_tool: modules-tcl-1.147 + python: '3.11' - modules_tool: modules-3.2.10 python: 3.5 - modules_tool: modules-3.2.10 @@ -46,6 +48,8 @@ jobs: python: 3.9 - modules_tool: modules-3.2.10 python: '3.10' + - modules_tool: modules-3.2.10 + python: '3.11' - modules_tool: modules-4.1.4 python: 3.5 - modules_tool: modules-4.1.4 @@ -56,6 +60,8 @@ jobs: python: 3.9 - modules_tool: modules-4.1.4 python: '3.10' + - modules_tool: modules-4.1.4 + python: '3.11' fail-fast: false steps: - uses: actions/checkout@v2 From 2707ab7cf6f558699bda3edfea35284ec42b9050 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Fri, 2 Jun 2023 12:45:43 +0000 Subject: [PATCH 09/28] `make shared` is necessary and sufficient with 0.3.23 + xianyi/OpenBLAS#3983 --- easybuild/easyblocks/o/openblas.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/easybuild/easyblocks/o/openblas.py b/easybuild/easyblocks/o/openblas.py index 9ce5034ba0..996dd280e1 100644 --- a/easybuild/easyblocks/o/openblas.py +++ b/easybuild/easyblocks/o/openblas.py @@ -70,10 +70,13 @@ def build_step(self): """ Custom build step excluding the tests """ # Equivalent to `make all` without the tests - build_parts = ['libs', 'netlib'] - for buildopt in self.cfg['buildopts'].split(): - if 'BUILD_RELAPACK' in buildopt and '1' in buildopt: - build_parts += ['re_lapack'] + build_parts = [] + if LooseVersion(self.version) < LooseVersion('0.3.23'): + build_parts += ['libs', 'netlib'] + for buildopt in self.cfg['buildopts'].split(): + if 'BUILD_RELAPACK' in buildopt and '1' in buildopt: + build_parts += ['re_lapack'] + # just shared is necessary and sufficient with 0.3.23 + xianyi/OpenBLAS#3983 build_parts += ['shared'] # Pass CFLAGS through command line to avoid redefinitions (issue xianyi/OpenBLAS#818) From a3057c6a0a177b604caf4098086b7cd5d09c1715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96hman?= Date: Mon, 5 Jun 2023 11:37:57 +0200 Subject: [PATCH 10/28] adding easyblocks: perlbundle.py --- easybuild/easyblocks/generic/perlbundle.py | 109 +++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 easybuild/easyblocks/generic/perlbundle.py diff --git a/easybuild/easyblocks/generic/perlbundle.py b/easybuild/easyblocks/generic/perlbundle.py new file mode 100644 index 0000000000..cbce05e239 --- /dev/null +++ b/easybuild/easyblocks/generic/perlbundle.py @@ -0,0 +1,109 @@ +## +# Copyright 2018-2021 Ghent University +# +# This file is part of EasyBuild, +# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), +# with support of Ghent University (http://ugent.be/hpc), +# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), +# Flemish Research Foundation (FWO) (http://www.fwo.be/en) +# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en). +# +# https://github.com/easybuilders/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +""" +EasyBuild support for installing a bundle of Perl modules, implemented as a generic easyblock + +@author: Mikael Öhman (Chalmers University of Technology) +""" +import os +import sys + +from easybuild.easyblocks.generic.bundle import Bundle +from easybuild.easyblocks.generic.perlmodule import PerlModule +from easybuild.easyblocks.perl import EXTS_FILTER_PERL_MODULES, get_major_perl_version, get_site_suffix +from easybuild.tools.build_log import EasyBuildError +from easybuild.tools.config import build_option +from easybuild.tools.modules import get_software_root, get_software_version +from easybuild.tools.environment import setvar + + +class PerlBundle(Bundle): + """ + Bundle of perl modules + """ + + @staticmethod + def extra_options(): + """Easyconfig parameters specific to bundles of Perl modules.""" + # combine custom easyconfig parameters of Bundle & PerlModule + extra_vars = PerlModule.extra_options() + return Bundle.extra_options(extra_vars) + + def __init__(self, *args, **kwargs): + """Initialize PerlBundle easyblock.""" + super(PerlBundle, self).__init__(*args, **kwargs) + + self.cfg['exts_defaultclass'] = 'PerlModule' + self.cfg['exts_filter'] = EXTS_FILTER_PERL_MODULES + + def prepare_step(self, *args, **kwargs): + """Prepare for installing bundle of Perl packages.""" + super(Bundle, self).prepare_step(*args, **kwargs) + + perl_root = get_software_root('Perl') + if perl_root is None: + raise EasyBuildError("Perl not included as dependency!") + + def extensions_step(self, *args, **kwargs): + """Install extensions""" + + # define $OPENSSL_PREFIX to ensure that e.g. Net-SSLeay extension picks up OpenSSL + # from specified sysroot rather than from host OS + sysroot = build_option('sysroot') + if sysroot: + setvar('OPENSSL_PREFIX', sysroot) + + super(PerlBundle, self).extensions_step(*args, **kwargs) + + def test_step(self): + """No global test step for bundle of Perl modules.""" + # required since runtest is set to True by default + pass + + def sanity_check_step(self, *args, **kwargs): + """Custom sanity check for bundle of Perl modules.""" + + if not self.cfg['sanity_check_paths']: + majver = get_major_perl_version() + self.cfg['sanity_check_paths'] = { + 'files': [], + 'dirs': [os.path.join('lib', 'perl%s' % self.majver)], + } + + super(Bundle, self).sanity_check_step(*args, **kwargs) + + def make_module_req_guess(self): + """Customized dictionary of paths to look for with PERL*LIB.""" + majver = get_major_perl_version() + sitearchsuffix = get_site_suffix('sitearch') + sitelibsuffix = get_site_suffix('sitelib') + + print(sitelibsuffix) + print(sitearchsuffix) + guesses = super(Bundle, self).make_module_req_guess() + guesses.update({ + "PERL%sLIB" % majver: ['', sitearchsuffix, sitelibsuffix], + }) + return guesses From 9e3124dd0053c0fef229939db2a449c1deae91ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96hman?= Date: Mon, 5 Jun 2023 11:39:38 +0200 Subject: [PATCH 11/28] Fix hound --- easybuild/easyblocks/generic/perlbundle.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/easybuild/easyblocks/generic/perlbundle.py b/easybuild/easyblocks/generic/perlbundle.py index cbce05e239..3c96a3f6d5 100644 --- a/easybuild/easyblocks/generic/perlbundle.py +++ b/easybuild/easyblocks/generic/perlbundle.py @@ -28,14 +28,13 @@ @author: Mikael Öhman (Chalmers University of Technology) """ import os -import sys from easybuild.easyblocks.generic.bundle import Bundle from easybuild.easyblocks.generic.perlmodule import PerlModule from easybuild.easyblocks.perl import EXTS_FILTER_PERL_MODULES, get_major_perl_version, get_site_suffix from easybuild.tools.build_log import EasyBuildError from easybuild.tools.config import build_option -from easybuild.tools.modules import get_software_root, get_software_version +from easybuild.tools.modules import get_software_root from easybuild.tools.environment import setvar @@ -89,7 +88,7 @@ def sanity_check_step(self, *args, **kwargs): majver = get_major_perl_version() self.cfg['sanity_check_paths'] = { 'files': [], - 'dirs': [os.path.join('lib', 'perl%s' % self.majver)], + 'dirs': [os.path.join('lib', 'perl%s' % majver)], } super(Bundle, self).sanity_check_step(*args, **kwargs) From 4a8464f0a3a749b55190967c48b8db9b07d26e03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96hman?= Date: Mon, 5 Jun 2023 19:12:21 +0200 Subject: [PATCH 12/28] Improve cargo optarch flags --- easybuild/easyblocks/generic/cargo.py | 35 ++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/easybuild/easyblocks/generic/cargo.py b/easybuild/easyblocks/generic/cargo.py index b511b851bc..9275aeed91 100644 --- a/easybuild/easyblocks/generic/cargo.py +++ b/easybuild/easyblocks/generic/cargo.py @@ -58,6 +58,36 @@ def extra_options(extra_vars=None): return extra_vars + def rustc_optarch(self): + """Determines what architecture to target. + Translates GENERIC optarch, and respects rustc specific optarch. + General optarchs are ignored as there is no direct translation. + """ + if systemtools.X86_64 == systemtools.get_cpu_architecture(): + generic = '-C target-cpu=x86-64' + else: + generic = '-C target-cpu=generic' + + optimal = '-C target-cpu=native' + + optarch = build_option('optarch') + if optarch: + if type(optarch) == dict: + if 'rustc' in optarch: + rust_optarch = optarch['rustc'] + if rust_optarch == OPTARCH_GENERIC: + return generic + else: + return '-' + rust_optarch + else: + if optarch == OPTARCH_GENERIC: + return generic + else: + self.log.warning("optarch is ignored as there is no translation for rustc") + return optimal + else: + return optimal + def __init__(self, *args, **kwargs): """Constructor for Cargo easyblock.""" super(Cargo, self).__init__(*args, **kwargs) @@ -66,10 +96,7 @@ def __init__(self, *args, **kwargs): env.setvar('RUSTC', 'rustc') env.setvar('RUSTDOC', 'rustdoc') env.setvar('RUSTFMT', 'rustfmt') - optarch = build_option('optarch') - if not optarch: - optarch = 'native' - env.setvar('RUSTFLAGS', '-C target-cpu=%s' % optarch) + env.setvar('RUSTFLAGS', self.rustc_optarch()) env.setvar('RUST_LOG', 'DEBUG') env.setvar('RUST_BACKTRACE', '1') From 3ce91feb0e5b5542b1d160fe3781e7946ecbf025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96hman?= Date: Mon, 5 Jun 2023 19:28:32 +0200 Subject: [PATCH 13/28] Fix imports --- easybuild/easyblocks/generic/cargo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/easybuild/easyblocks/generic/cargo.py b/easybuild/easyblocks/generic/cargo.py index 9275aeed91..4ca50be02b 100644 --- a/easybuild/easyblocks/generic/cargo.py +++ b/easybuild/easyblocks/generic/cargo.py @@ -31,6 +31,7 @@ import os import easybuild.tools.environment as env +import easybuild.tools.systemtools as systemtools from easybuild.tools.build_log import EasyBuildError from easybuild.framework.easyconfig import CUSTOM from easybuild.framework.extensioneasyblock import ExtensionEasyBlock @@ -38,6 +39,7 @@ from easybuild.tools.run import run_cmd from easybuild.tools.config import build_option from easybuild.tools.filetools import write_file, compute_checksum +from easybuild.tools.toolchain.compiler import OPTARCH_GENERIC CRATESIO_SOURCE = "https://crates.io/api/v1/crates" @@ -67,7 +69,7 @@ def rustc_optarch(self): generic = '-C target-cpu=x86-64' else: generic = '-C target-cpu=generic' - + optimal = '-C target-cpu=native' optarch = build_option('optarch') From 1c89273ba0d50fdc35a3aa97fe59111244886be2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96hman?= Date: Mon, 5 Jun 2023 19:30:05 +0200 Subject: [PATCH 14/28] Drop strict perl requirement --- easybuild/easyblocks/generic/perlbundle.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/easybuild/easyblocks/generic/perlbundle.py b/easybuild/easyblocks/generic/perlbundle.py index 3c96a3f6d5..ed8c63eae6 100644 --- a/easybuild/easyblocks/generic/perlbundle.py +++ b/easybuild/easyblocks/generic/perlbundle.py @@ -57,14 +57,6 @@ def __init__(self, *args, **kwargs): self.cfg['exts_defaultclass'] = 'PerlModule' self.cfg['exts_filter'] = EXTS_FILTER_PERL_MODULES - def prepare_step(self, *args, **kwargs): - """Prepare for installing bundle of Perl packages.""" - super(Bundle, self).prepare_step(*args, **kwargs) - - perl_root = get_software_root('Perl') - if perl_root is None: - raise EasyBuildError("Perl not included as dependency!") - def extensions_step(self, *args, **kwargs): """Install extensions""" From 34c10c703f5a37812a689e331e71f4e312e16edb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96hman?= Date: Mon, 5 Jun 2023 19:36:38 +0200 Subject: [PATCH 15/28] Remove unused imports --- easybuild/easyblocks/generic/perlbundle.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/easybuild/easyblocks/generic/perlbundle.py b/easybuild/easyblocks/generic/perlbundle.py index ed8c63eae6..fcc753214e 100644 --- a/easybuild/easyblocks/generic/perlbundle.py +++ b/easybuild/easyblocks/generic/perlbundle.py @@ -32,9 +32,7 @@ from easybuild.easyblocks.generic.bundle import Bundle from easybuild.easyblocks.generic.perlmodule import PerlModule from easybuild.easyblocks.perl import EXTS_FILTER_PERL_MODULES, get_major_perl_version, get_site_suffix -from easybuild.tools.build_log import EasyBuildError from easybuild.tools.config import build_option -from easybuild.tools.modules import get_software_root from easybuild.tools.environment import setvar From c9d847a3a0456c4a5b9cdb4371c652c1fc6da69b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96hman?= Date: Tue, 6 Jun 2023 00:31:49 +0200 Subject: [PATCH 16/28] Fix rust optarch logic when optarch isn't specified for compiler --- easybuild/easyblocks/generic/cargo.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/easybuild/easyblocks/generic/cargo.py b/easybuild/easyblocks/generic/cargo.py index 4ca50be02b..996e54c137 100644 --- a/easybuild/easyblocks/generic/cargo.py +++ b/easybuild/easyblocks/generic/cargo.py @@ -86,9 +86,7 @@ def rustc_optarch(self): return generic else: self.log.warning("optarch is ignored as there is no translation for rustc") - return optimal - else: - return optimal + return optimal def __init__(self, *args, **kwargs): """Constructor for Cargo easyblock.""" From 7f168eb0c4e31bed23903ec99208d3cf3c9662a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96hman?= Date: Thu, 8 Jun 2023 14:21:47 +0200 Subject: [PATCH 17/28] Update easybuild/easyblocks/generic/cargo.py Co-authored-by: Simon Branford <4967+branfosj@users.noreply.github.com> --- easybuild/easyblocks/generic/cargo.py | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyblocks/generic/cargo.py b/easybuild/easyblocks/generic/cargo.py index 996e54c137..a16ce70797 100644 --- a/easybuild/easyblocks/generic/cargo.py +++ b/easybuild/easyblocks/generic/cargo.py @@ -81,6 +81,7 @@ def rustc_optarch(self): return generic else: return '-' + rust_optarch + self.log.info("no rustc information in the optarch dict, so using %s" % optimal) else: if optarch == OPTARCH_GENERIC: return generic From f0f903c2c22d4214f4bc25b316dc3211faf538cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96hman?= Date: Thu, 8 Jun 2023 14:21:54 +0200 Subject: [PATCH 18/28] Update easybuild/easyblocks/generic/cargo.py Co-authored-by: Simon Branford <4967+branfosj@users.noreply.github.com> --- easybuild/easyblocks/generic/cargo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/generic/cargo.py b/easybuild/easyblocks/generic/cargo.py index a16ce70797..56cda395fb 100644 --- a/easybuild/easyblocks/generic/cargo.py +++ b/easybuild/easyblocks/generic/cargo.py @@ -86,7 +86,7 @@ def rustc_optarch(self): if optarch == OPTARCH_GENERIC: return generic else: - self.log.warning("optarch is ignored as there is no translation for rustc") + self.log.warning("optarch is ignored as there is no translation for rustc, so using %s" % optimal) return optimal def __init__(self, *args, **kwargs): From 0edd5ae16685ecb733879d911a8d74248a8a6999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96hman?= Date: Fri, 9 Jun 2023 11:41:25 +0200 Subject: [PATCH 19/28] Use fixed modextrapaths --- easybuild/easyblocks/generic/perlbundle.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/easybuild/easyblocks/generic/perlbundle.py b/easybuild/easyblocks/generic/perlbundle.py index fcc753214e..be525f71ad 100644 --- a/easybuild/easyblocks/generic/perlbundle.py +++ b/easybuild/easyblocks/generic/perlbundle.py @@ -83,16 +83,11 @@ def sanity_check_step(self, *args, **kwargs): super(Bundle, self).sanity_check_step(*args, **kwargs) - def make_module_req_guess(self): - """Customized dictionary of paths to look for with PERL*LIB.""" + def make_module_extra(self): + """Extra module entries for Perl bundles.""" majver = get_major_perl_version() - sitearchsuffix = get_site_suffix('sitearch') - sitelibsuffix = get_site_suffix('sitelib') - - print(sitelibsuffix) - print(sitearchsuffix) - guesses = super(Bundle, self).make_module_req_guess() - guesses.update({ - "PERL%sLIB" % majver: ['', sitearchsuffix, sitelibsuffix], - }) - return guesses + sitelibsuffix = get_site_suffix('sitelib') # use this! + + txt = super(Bundle, self).make_module_extra() + txt += self.module_generator.prepend_paths("PERL%sLIB" % majver, [sitelibsuffix]) + return txt From 326b14612551255dc125365a8c3fd498e74ada99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96hman?= Date: Sun, 11 Jun 2023 15:53:40 +0200 Subject: [PATCH 20/28] Add arch path as well --- easybuild/easyblocks/generic/perlbundle.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/generic/perlbundle.py b/easybuild/easyblocks/generic/perlbundle.py index be525f71ad..78d57cd629 100644 --- a/easybuild/easyblocks/generic/perlbundle.py +++ b/easybuild/easyblocks/generic/perlbundle.py @@ -86,8 +86,9 @@ def sanity_check_step(self, *args, **kwargs): def make_module_extra(self): """Extra module entries for Perl bundles.""" majver = get_major_perl_version() - sitelibsuffix = get_site_suffix('sitelib') # use this! + sitearchsuffix = get_site_suffix('sitearch') # Some parl modules use this path instead. + sitelibsuffix = get_site_suffix('sitelib') txt = super(Bundle, self).make_module_extra() - txt += self.module_generator.prepend_paths("PERL%sLIB" % majver, [sitelibsuffix]) + txt += self.module_generator.prepend_paths("PERL%sLIB" % majver, [sitelibsuffix, sitearchsuffix]) return txt From ab1c8927d38fefa0803f04a48e587b0d61b61da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96hman?= Date: Sun, 11 Jun 2023 17:13:09 +0200 Subject: [PATCH 21/28] Use only correct perl_lib path --- easybuild/easyblocks/generic/perlbundle.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/easybuild/easyblocks/generic/perlbundle.py b/easybuild/easyblocks/generic/perlbundle.py index 78d57cd629..747d518439 100644 --- a/easybuild/easyblocks/generic/perlbundle.py +++ b/easybuild/easyblocks/generic/perlbundle.py @@ -31,7 +31,7 @@ from easybuild.easyblocks.generic.bundle import Bundle from easybuild.easyblocks.generic.perlmodule import PerlModule -from easybuild.easyblocks.perl import EXTS_FILTER_PERL_MODULES, get_major_perl_version, get_site_suffix +from easybuild.easyblocks.perl import get_major_perl_version, get_site_suffix from easybuild.tools.config import build_option from easybuild.tools.environment import setvar @@ -53,11 +53,12 @@ def __init__(self, *args, **kwargs): super(PerlBundle, self).__init__(*args, **kwargs) self.cfg['exts_defaultclass'] = 'PerlModule' - self.cfg['exts_filter'] = EXTS_FILTER_PERL_MODULES + self.cfg['exts_filter'] = ("perl -e 'require %(ext_name)s'", '') def extensions_step(self, *args, **kwargs): """Install extensions""" + setvar('INSTALLDIRS', 'site') # define $OPENSSL_PREFIX to ensure that e.g. Net-SSLeay extension picks up OpenSSL # from specified sysroot rather than from host OS sysroot = build_option('sysroot') @@ -86,9 +87,8 @@ def sanity_check_step(self, *args, **kwargs): def make_module_extra(self): """Extra module entries for Perl bundles.""" majver = get_major_perl_version() - sitearchsuffix = get_site_suffix('sitearch') # Some parl modules use this path instead. sitelibsuffix = get_site_suffix('sitelib') txt = super(Bundle, self).make_module_extra() - txt += self.module_generator.prepend_paths("PERL%sLIB" % majver, [sitelibsuffix, sitearchsuffix]) + txt += self.module_generator.prepend_paths("PERL%sLIB" % majver, [sitelibsuffix]) return txt From 476da8f0ebe08ec2219116c27078b42c03dc026a Mon Sep 17 00:00:00 2001 From: Maxime Boissonneault Date: Mon, 19 Jun 2023 21:18:41 +0000 Subject: [PATCH 22/28] reset modules loaded by PythonPackage to let ExtensionEasyBlock handle multideps correctly --- easybuild/easyblocks/generic/pythonpackage.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/easybuild/easyblocks/generic/pythonpackage.py b/easybuild/easyblocks/generic/pythonpackage.py index 3e5e5e3a02..412d005270 100644 --- a/easybuild/easyblocks/generic/pythonpackage.py +++ b/easybuild/easyblocks/generic/pythonpackage.py @@ -923,6 +923,12 @@ def sanity_check_step(self, *args, **kwargs): else: raise EasyBuildError("Failed to determine pip version!") + # ExtensionEasyBlock handles loading modules correctly for multi_deps, so we clean up fake_mod_data + # and let ExtensionEasyBlock do its job + if 'Python' in self.cfg["multi_deps"] and self.fake_mod_data: + self.clean_up_fake_module(self.fake_mod_data) + self.sanity_check_module_loaded = False + parent_success, parent_fail_msg = super(PythonPackage, self).sanity_check_step(*args, **kwargs) if parent_fail_msg: From 2a6becb8a8748952a69324670ca4eb19c693cb85 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 21 Jun 2023 09:36:56 +0200 Subject: [PATCH 23/28] fix year in copyright line in license header of PerlBundle easyblock --- easybuild/easyblocks/generic/perlbundle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/generic/perlbundle.py b/easybuild/easyblocks/generic/perlbundle.py index 747d518439..fcb5ce48f8 100644 --- a/easybuild/easyblocks/generic/perlbundle.py +++ b/easybuild/easyblocks/generic/perlbundle.py @@ -1,5 +1,5 @@ ## -# Copyright 2018-2021 Ghent University +# Copyright 2018-2023 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), From 00965cc0fd5cfcec279be213529e7a89ab238c9f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 21 Jun 2023 16:44:36 +0200 Subject: [PATCH 24/28] add custom easyblock for Rust --- easybuild/easyblocks/r/rust.py | 82 ++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 easybuild/easyblocks/r/rust.py diff --git a/easybuild/easyblocks/r/rust.py b/easybuild/easyblocks/r/rust.py new file mode 100644 index 0000000000..15700eafd5 --- /dev/null +++ b/easybuild/easyblocks/r/rust.py @@ -0,0 +1,82 @@ +## +# Copyright 2023-2023 Ghent University +# +# This file is part of EasyBuild, +# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), +# with support of Ghent University (http://ugent.be/hpc), +# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), +# Flemish Research Foundation (FWO) (http://www.fwo.be/en) +# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en). +# +# https://github.com/easybuilders/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +""" +EasyBuild support for building and installing Rust, implemented as an easyblock + +@author: Kenneth Hoste (Ghent University) +""" +import os + +from easybuild.easyblocks.generic.configuremake import ConfigureMake + + +class EB_Rust(ConfigureMake): + """Support for building/installing Rust.""" + + def __init__(self, *args, **kwargs): + """Custom easyblock constructor for Rust.""" + super(EB_Rust, self).__init__(*args, **kwargs) + + # see https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html#what-is-xpy + # note: ConfigureMake.build_step automatically adds '-j ' + self.cfg['build_cmd'] = "./x.py build" + self.cfg['install_cmd'] = "./x.py install -j %(parallel)s" + + def configure_step(self): + """Custom configure step for Rust""" + + # perform extended build, which includes cargo, rustfmt, Rust Language Server (RLS), etc. + self.cfg.update('configopts', "--enable-extended") + + self.cfg.update('configopts', "--sysconfdir=%s" % os.path.join(self.installdir, 'etc')) + + # don't use Ninja if it is not listed as a build dependency; + # may be because Ninja requires Python, and Rust is a build dependency for cryptography + # which may be included as an extension with Python + build_dep_names = set(dep['name'] for dep in self.cfg.dependencies(build_only=True)) + if 'Ninja' not in build_dep_names: + self.cfg.update('configopts', "--set=llvm.ninja=false") + + super(EB_Rust, self).configure_step() + + # avoid failure when home directory is an NFS mount, + # see https://github.com/rust-lang/cargo/issues/6652 + cargo_home = "export CARGO_HOME=%s && " % os.path.join(self.builddir, 'cargo') + self.cfg.update('prebuildopts', cargo_home) + self.cfg.update('preinstallopts', cargo_home) + + def sanity_check_step(self): + """Custom sanity check for Rust""" + + custom_paths = { + 'files': ['bin/cargo', 'bin/rustc', 'bin/rustdoc'], + 'dirs': ['lib/rustlib', 'share/doc', 'share/man'], + } + + custom_commands = [ + "cargo --version", + "rustc --version", + ] + return super(EB_Rust, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) From 6c34f0579f8195aa31f88da36cb16aaf4ced0ff0 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 22 Jun 2023 14:47:46 +0200 Subject: [PATCH 25/28] update Rust easyblock to enforce RPATH for shared libraries when --rpath is used --- easybuild/easyblocks/r/rust.py | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/easybuild/easyblocks/r/rust.py b/easybuild/easyblocks/r/rust.py index 15700eafd5..ee66f6854e 100644 --- a/easybuild/easyblocks/r/rust.py +++ b/easybuild/easyblocks/r/rust.py @@ -27,10 +27,17 @@ @author: Kenneth Hoste (Ghent University) """ +import glob import os +import re from easybuild.easyblocks.generic.configuremake import ConfigureMake +from easybuild.tools.build_log import EasyBuildError +from easybuild.tools.config import build_option +from easybuild.tools.run import run_cmd +from easybuild.tools.systemtools import get_shared_lib_ext + class EB_Rust(ConfigureMake): """Support for building/installing Rust.""" @@ -67,6 +74,41 @@ def configure_step(self): self.cfg.update('prebuildopts', cargo_home) self.cfg.update('preinstallopts', cargo_home) + def install_step(self): + """Custom install step for Rust""" + + super(EB_Rust, self).install_step() + + if build_option('rpath'): + # make sure that all shared libraries use RPATH, not RUNPATH; + # cfr. https://github.com/easybuilders/easybuild-easyconfigs/issues/18079 + shlib_ext = get_shared_lib_ext() + shared_libs = glob.glob(os.path.join(self.installdir, 'lib', 'lib*.%s' % shlib_ext)) + + runpath_regex = re.compile(r"\(RUNPATH\)\s+Library runpath") + + for shared_lib in shared_libs: + out, ec = run_cmd("readelf -d %s" % shared_lib, simple=False, trace=False) + if ec: + raise EasyBuildError("Failed to check RPATH section in %s: %s", shared_lib, out) + elif runpath_regex.search(out): + self.log.info("RUNPATH section found in %s - need to change to RPATH", shared_lib) + + # first determine current RUNPATH value + out, ec = run_cmd("patchelf --print-rpath %s" % shared_lib) + if ec: + raise EasyBuildError("Failed to determine current RUNPATH value for %s: %s", shared_lib, out) + else: + runpath = out.strip() + # use RUNPATH value to RPATH value + out, ec = run_cmd("patchelf --set-rpath '%s' --force-rpath %s" % (runpath, shared_lib)) + if ec: + raise EasyBuildError("Failed to set RPATH for %s: %s", shared_lib, out) + else: + self.log.info("RPATH set for %s", shared_lib) + else: + self.log.info("No RUNPATH section found in %s", shared_lib) + def sanity_check_step(self): """Custom sanity check for Rust""" From 94d28c556947bd96d0978df775b15a50a4600c6f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 22 Jun 2023 18:44:59 +0200 Subject: [PATCH 26/28] add support for `install_cmds` in `Binary` easyblock --- easybuild/easyblocks/generic/binary.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/easybuild/easyblocks/generic/binary.py b/easybuild/easyblocks/generic/binary.py index 66ec571dea..d9ff3a5bb7 100644 --- a/easybuild/easyblocks/generic/binary.py +++ b/easybuild/easyblocks/generic/binary.py @@ -59,6 +59,7 @@ def extra_options(extra_vars=None): extra_vars.update({ 'extract_sources': [False, "Whether or not to extract sources", CUSTOM], 'install_cmd': [None, "Install command to be used.", CUSTOM], + 'install_cmds': [None, "List of install commands to be used.", CUSTOM], # staged installation can help with the hard (potentially faulty) check on available disk space 'staged_install': [False, "Perform staged installation via subdirectory of build directory", CUSTOM], 'prepend_to_path': [PREPEND_TO_PATH_DEFAULT, "Prepend the given directories (relative to install-dir) to " @@ -104,7 +105,9 @@ def build_step(self): def install_step(self): """Copy all files in build directory to the install directory""" install_cmd = self.cfg.get('install_cmd', None) - if install_cmd is None: + install_cmds = self.cfg.get('install_cmds', []) + + if install_cmd is None and install_cmds is None: try: # shutil.copytree doesn't allow the target directory to exist already remove_dir(self.installdir) @@ -112,9 +115,21 @@ def install_step(self): except OSError as err: raise EasyBuildError("Failed to copy %s to %s: %s", self.cfg['start_dir'], self.installdir, err) else: - cmd = ' '.join([self.cfg['preinstallopts'], install_cmd, self.cfg['installopts']]) - self.log.info("Installing %s using command '%s'..." % (self.name, cmd)) - run_cmd(cmd, log_all=True, simple=True) + if install_cmd: + if not install_cmds: + install_cmds = [install_cmd] + install_cmd = None + else: + raise EasyBuildError("Don't use both install_cmds and install_cmd, pick one!") + + if isinstance(install_cmds, (list, tuple)): + for install_cmd in install_cmds: + cmd = ' '.join([self.cfg['preinstallopts'], install_cmd, self.cfg['installopts']]) + self.log.info("Running install command for %s: '%s'..." % (self.name, cmd)) + run_cmd(cmd, log_all=True, simple=True) + else: + raise EasyBuildError("Incorrect value type for install_cmds, should be list or tuple: ", + install_cmds) def post_install_step(self): """Copy installation to actual installation directory in case of a staged installation.""" From 5edf1727bbffc84770cbf38778d84c2fa263f1bc Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 6 Jul 2023 09:40:37 +0200 Subject: [PATCH 27/28] strip out adding a sysroot lib/include paths to $CMAKE_PREFIX_PATH and $CMAKE_LIBRARY_PATH in configure step of CMake easyblock - no longer needed due to sysroot-aware patching of Modules/Platform/UnixPaths.cmake --- easybuild/easyblocks/c/cmake.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/easybuild/easyblocks/c/cmake.py b/easybuild/easyblocks/c/cmake.py index 4f1981047c..42dadd996c 100644 --- a/easybuild/easyblocks/c/cmake.py +++ b/easybuild/easyblocks/c/cmake.py @@ -126,14 +126,6 @@ def configure_step(self): if dep_name_upper in available_system_options and '-system-' + dep_name.lower() not in configure_opts: add_cmake_opts['CMAKE_USE_SYSTEM_' + dep_name_upper] = 'ON' - sysroot = build_option('sysroot') - if sysroot: - self.log.info("Found sysroot '%s', adding it to $CMAKE_PREFIX_PATH and $CMAKE_LIBRARY_PATH", sysroot) - cmake_prefix_path.append(sysroot) - cmake_library_path.append(os.path.join(sysroot, 'usr', 'lib')) - cmake_library_path.append(os.path.join(sysroot, 'usr', 'lib64')) - cmake_include_path.append(os.path.join(sysroot, 'usr', 'include')) - cmake_path_env_vars = { 'CMAKE_PREFIX_PATH': cmake_prefix_path, 'CMAKE_LIBRARY_PATH': cmake_library_path, From ddfba347f2594cfe6184bb930212cb2113ff8fb4 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 6 Jul 2023 22:14:35 +0200 Subject: [PATCH 28/28] prepare release notes for EasyBuild v4.8.0 + bump version to 4.8.0 --- RELEASE_NOTES | 23 ++++++++++++++++++++++- easybuild/easyblocks/__init__.py | 2 +- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index f117aa07a1..96cd448b68 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -3,7 +3,27 @@ For more detailed information, please see the git log. These release notes can also be consulted at http://easybuild.readthedocs.org/en/latest/Release_notes.html. -The latest version of easybuild-easyblocks provides 248 software-specific easyblocks and 41 generic easyblocks. +The latest version of easybuild-easyblocks provides 249 software-specific easyblocks and 42 generic easyblocks. + + +v4.8.0 (7 July 2023) +-------------------- + +feature release + +- add `PerlBundle` generic easyblock for installing a bundle of Perl modules (#2945) +- add custom easyblock for Rust, which makes sure that all shared libraries use RPATH rather than RUNPATH if --rpath is used (#2952) +- minor enhancements and updates, including: + - add support for NVIDIA Hopper CC 9.0 in LAMMPS (#2941) + - add support for `install_cmds` in `Binary` easyblock (#2953) +- various bug fixes, including: + - patch CMake's UnixPaths.cmake script if --sysroot is set (#2248) + - fix incorrect sanity_check_step for torchvision (#2938) + - update OpenBLAS easyblock since make shared is necessary and sufficient with OpenBLAS 0.3.23 + recent parallel build fixes (#2944) + - improve handling of `optarch` in `Cargo` easyblock (#2947) + - reset modules loaded by PythonPackage to let ExtensionEasyBlock handle `multi_deps` correctly (#2951) +- other changes: + - stop running tests with Python 2.7 since it is no longer supported in GitHub Actions (#2943) v4.7.2 (27 May 2023) @@ -23,6 +43,7 @@ v4.7.2 (27 May 2023) - force building torchvision with CUDA support if CUDA is included as dependency by setting `$FORCE_CUDA` (#2931) - fix exec permission on files in arch bindir for COMSOL (#2932) + v4.7.1 (March 20th 2023) ------------------------ diff --git a/easybuild/easyblocks/__init__.py b/easybuild/easyblocks/__init__.py index 445fac1632..887ecbc220 100644 --- a/easybuild/easyblocks/__init__.py +++ b/easybuild/easyblocks/__init__.py @@ -43,7 +43,7 @@ # recent setuptools versions will *TRANSFORM* something like 'X.Y.Zdev' into 'X.Y.Z.dev0', with a warning like # UserWarning: Normalizing '2.4.0dev' to '2.4.0.dev0' # This causes problems further up the dependency chain... -VERSION = LooseVersion('4.7.3.dev0') +VERSION = LooseVersion('4.8.0') UNKNOWN = 'UNKNOWN'