Skip to content

Commit 31cf7f3

Browse files
Merge pull request #2061 from easybuilders/4.2.x
release EasyBuild 4.2.1
2 parents 9a83802 + a75666c commit 31cf7f3

34 files changed

+1078
-438
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ build/
99
dist/
1010
*egg-info/
1111
*.swp
12+
.mypy_cache/

RELEASE_NOTES

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,42 @@ For more detailed information, please see the git log.
33

44
These release notes can also be consulted at http://easybuild.readthedocs.org/en/latest/Release_notes.html.
55

6-
The latest version of easybuild-easyblocks provides 219 software-specific easyblocks and 36 generic easyblocks.
6+
The latest version of easybuild-easyblocks provides 219 software-specific easyblocks and 37 generic easyblocks.
7+
8+
v4.2.1 (May 20th 2020)
9+
----------------------
10+
11+
update/bugfix release
12+
13+
- add generic easyblock for installing Go packages: GoPackage (#2042)
14+
- minor enhancements, including:
15+
- update config.guess for all R packages, required installing R + extensions on Linux/POWER systems (#1949)
16+
- add support for preinstallopts and install in subdirectory to Tarball generic easyblock (#1989, #2049)
17+
- rewrite GROMACS easyblock to install all four variations (single/double precision, with/without MPI) in the same directory (#1991)
18+
- add custom 'subdir_version' easyconfig parameter for FLUENT (#2021)
19+
- use updated config.guess in GCC easyblock (#2033, #2059)
20+
- add extra question pattern to support installing CPLEX 12.10 (#2038)
21+
- add support for building NWChem on top of external GlobalArrays + also define $LAPACK_LIB (required for NWChem 7.x) (#2043)
22+
- execute minimal test in sanity check commands in impi easyblock (#2045)
23+
- update for MotionCor2 easyblock for v1.3.1 (#2046)
24+
- fixes + enhancements for PETSc easyblock (#2048)
25+
- various bug fixes, including:
26+
- use correct version in ELPA preprocessor flag used for QuantumESPRESSO v6.x (#2027)
27+
- generically find the arch folder and add top-level bin/lib symlinks in PDT & TAU easyblocks (#2029)
28+
- fix typo in LAMMPS easyblock preventing disabling the USER-INTEL package via configopts (#2031)
29+
- let CMakeMake remove 'easybuild_obj' build directory if it already exists (#2032)
30+
- include own lib dir in RPATH before system lib dirs in binutils easyblock (#2044)
31+
- clean $CPATH before building ROOT to avoid clash between external LLVM loaded as a dependency and internal LLVM used by ROOT (#2047)
32+
- don't let extract_file change directory in various easyblocks (#2051)
33+
- make postinstallcmds available to Mathematica easyconfigs + add bin/Executables to $PATH (#2052)
34+
- fix the extra dirs added to PATH in FreeSurfer easyblock (#2053)
35+
- correct download url for test data in WPS easyblock (#2055)
36+
- fix typo in warning in TensorFlow easyblock (#2057)
37+
- fix failing sanity check under --module-only in GCC easyblock (#2059)
38+
- other changes:
39+
- add configure options for CubeLib/CubeWriter dependencies in Score-P easyblock (#2030)
40+
- remove local find_glob_pattern in Blender & ROOT easyblocks, use function provided by filetools instead (#2037)
41+
742

843
v4.2.0 (April 14th 2020)
944
------------------------

easybuild/easyblocks/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
# recent setuptools versions will *TRANSFORM* something like 'X.Y.Zdev' into 'X.Y.Z.dev0', with a warning like
4444
# UserWarning: Normalizing '2.4.0dev' to '2.4.0.dev0'
4545
# This causes problems further up the dependency chain...
46-
VERSION = LooseVersion('4.2.0')
46+
VERSION = LooseVersion('4.2.1')
4747
UNKNOWN = 'UNKNOWN'
4848

4949

easybuild/easyblocks/b/binutils.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def extra_options(extra_vars=None):
5050
extra_vars = ConfigureMake.extra_options(extra_vars=extra_vars)
5151
extra_vars.update({
5252
'install_libiberty': [True, "Also install libiberty (implies building with -fPIC)", CUSTOM],
53+
'use_debuginfod': [False, "Build with debuginfod (used from system)", CUSTOM],
5354
})
5455
return extra_vars
5556

@@ -62,7 +63,11 @@ def configure_step(self):
6263
# determine list of 'lib' directories to use rpath for;
6364
# this should 'harden' the resulting binutils to bootstrap GCC
6465
# (no trouble when other libstdc++ is build etc)
65-
libdirs = []
66+
67+
# The installed lib dir must come first though to avoid taking system libs over installed ones, see:
68+
# https://github.com/easybuilders/easybuild-easyconfigs/issues/10056
69+
# Escaping: Double $$ for Make, \$ for shell to get literal $ORIGIN in the file
70+
libdirs = [r'\$\$ORIGIN/../lib']
6671
for libdir in ['/usr/lib', '/usr/lib64', '/usr/lib/x86_64-linux-gnu/']:
6772
# also consider /lib, /lib64
6873
alt_libdir = libdir.replace('usr/', '')
@@ -75,7 +80,8 @@ def configure_step(self):
7580
elif os.path.exists(alt_libdir):
7681
libdirs.append(alt_libdir)
7782

78-
libs += ' '.join('-Wl,-rpath=%s' % libdir for libdir in libdirs)
83+
# Mind the single quotes
84+
libs += ' '.join("-Wl,-rpath='%s'" % libdir for libdir in libdirs)
7985

8086
# configure using `--with-system-zlib` if zlib is a (build) dependency
8187
zlibroot = get_software_root('zlib')
@@ -101,8 +107,9 @@ def configure_step(self):
101107
else:
102108
libs += ' ' + libz_path
103109

104-
self.cfg.update('preconfigopts', "env LIBS='%s'" % libs)
105-
self.cfg.update('prebuildopts', "env LIBS='%s'" % libs)
110+
# Using double quotes for LIBS to allow single quotes in libs
111+
self.cfg.update('preconfigopts', 'LIBS="%s"' % libs)
112+
self.cfg.update('prebuildopts', 'LIBS="%s"' % libs)
106113

107114
# use correct sysroot, to make sure 'ld' also considers system libraries
108115
self.cfg.update('configopts', '--with-sysroot=/')
@@ -115,6 +122,12 @@ def configure_step(self):
115122
if LooseVersion(self.version) > LooseVersion('2.24'):
116123
self.cfg.update('configopts', "--enable-gold --enable-plugins --enable-ld=default")
117124

125+
if LooseVersion(self.version) >= LooseVersion('2.34'):
126+
if self.cfg['use_debuginfod']:
127+
self.cfg.update('configopts', '--with-debuginfod')
128+
else:
129+
self.cfg.update('configopts', '--without-debuginfod')
130+
118131
# complete configuration with configure_method of parent
119132
super(EB_binutils, self).configure_step()
120133

easybuild/easyblocks/b/blender.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@
2727
2828
@author: Samuel Moors (Vrije Universiteit Brussel)
2929
"""
30-
import glob
3130
import os
3231

3332
from easybuild.easyblocks.generic.cmakemake import CMakeMake
3433
from easybuild.tools.build_log import EasyBuildError
34+
from easybuild.tools.filetools import find_glob_pattern
3535
from easybuild.tools.modules import get_software_root, get_software_version
3636
from easybuild.tools.systemtools import get_shared_lib_ext
3737

@@ -45,15 +45,6 @@ def extra_options():
4545
extra_vars['separate_build_dir'][0] = True
4646
return extra_vars
4747

48-
def find_glob_pattern(self, glob_pattern):
49-
"""Find unique file/dir matching glob_pattern (raises error if more than one match is found)"""
50-
if self.dry_run:
51-
return glob_pattern
52-
res = glob.glob(glob_pattern)
53-
if len(res) != 1:
54-
raise EasyBuildError("Was expecting exactly one match for '%s', found %d: %s", glob_pattern, len(res), res)
55-
return res[0]
56-
5748
def configure_step(self):
5849
"""Set CMake options for Blender"""
5950

@@ -81,12 +72,12 @@ def configure_step(self):
8172
site_packages = os.path.join(python_root, 'lib', 'python%s' % pyshortver, 'site-packages')
8273

8374
# We assume that numpy/requests are included with the Python installation (no longer true for 2019a)
84-
numpy_root = self.find_glob_pattern(
75+
numpy_root = find_glob_pattern(
8576
os.path.join(site_packages, 'numpy-*-py%s-linux-x86_64.egg' % pyshortver))
86-
requests_root = self.find_glob_pattern(os.path.join(site_packages, 'requests-*-py%s.egg' % pyshortver))
87-
python_lib = self.find_glob_pattern(
77+
requests_root = find_glob_pattern(os.path.join(site_packages, 'requests-*-py%s.egg' % pyshortver))
78+
python_lib = find_glob_pattern(
8879
os.path.join(python_root, 'lib', 'libpython%s*.%s' % (pyshortver, shlib_ext)))
89-
python_include_dir = self.find_glob_pattern(os.path.join(python_root, 'include', 'python%s*' % pyshortver))
80+
python_include_dir = find_glob_pattern(os.path.join(python_root, 'include', 'python%s*' % pyshortver))
9081

9182
self.cfg.update('configopts', '-DPYTHON_VERSION=%s' % pyshortver)
9283
self.cfg.update('configopts', '-DPYTHON_LIBRARY=%s' % python_lib)

easybuild/easyblocks/c/cplex.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ def install_step(self):
9292
"PRESS <ENTER> TO EXIT THE INSTALLER:": '',
9393
"CHOOSE LOCALE BY NUMBER:": '',
9494
"Choose Instance Management Option:": '',
95+
"No model content or proprietary data will be sent.\n1- Yes\n2- No\n"
96+
"ENTER THE NUMBER OF THE DESIRED CHOICE:": '2',
9597
}
9698
noqanda = [r'Installing\.\.\..*\n.*------.*\n\n.*============.*\n.*$']
9799

easybuild/easyblocks/f/fluent.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,29 @@
3232
from distutils.version import LooseVersion
3333

3434
from easybuild.easyblocks.generic.packedbinary import PackedBinary
35+
from easybuild.framework.easyconfig import CUSTOM
3536
from easybuild.tools.filetools import adjust_permissions
3637
from easybuild.tools.run import run_cmd
3738

3839

3940
class EB_FLUENT(PackedBinary):
4041
"""Support for installing FLUENT."""
4142

43+
@staticmethod
44+
def extra_options():
45+
extra_vars = PackedBinary.extra_options()
46+
extra_vars['subdir_version'] = [None, "Version to use to determine installation subdirectory", CUSTOM]
47+
return extra_vars
48+
4249
def __init__(self, *args, **kwargs):
4350
"""Custom constructor for FLUENT easyblock, initialize/define class parameters."""
4451
super(EB_FLUENT, self).__init__(*args, **kwargs)
45-
self.fluent_verdir = 'v%s' % ''.join(self.version.split('.')[:2])
52+
53+
subdir_version = self.cfg['subdir_version']
54+
if subdir_version is None:
55+
subdir_version = ''.join(self.version.split('.')[:2])
56+
57+
self.fluent_verdir = 'v%s' % subdir_version
4658

4759
def install_step(self):
4860
"""Custom install procedure for FLUENT."""

easybuild/easyblocks/f/freesurfer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,18 @@ def extra_options():
4444
extra_vars = {
4545
'license_text': ['', "Text for required license file.", MANDATORY],
4646
}
47-
return EasyBlock.extra_options(extra_vars)
47+
return Tarball.extra_options(extra_vars)
4848

4949
def install_step(self):
5050
"""Custom installation procedure for FreeSurfer, which includes installed the license file '.license'."""
5151
super(EB_FreeSurfer, self).install_step()
5252
write_file(os.path.join(self.installdir, '.license'), self.cfg['license_text'])
5353

54-
def make_module_guesses(self):
54+
def make_module_req_guess(self):
5555
"""Include correct subdirectories to $PATH for FreeSurfer."""
56-
guesses = super(EB_FreeSurfer, self).make_module_guesses()
56+
guesses = super(EB_FreeSurfer, self).make_module_req_guess()
5757

58-
guesses['PATH'] = ['bin', 'fsfast/bin', 'mni/bin', 'tktools']
58+
guesses['PATH'].extend([os.path.join('fsfast', 'bin'), os.path.join('mni', 'bin'), 'tktools'])
5959

6060
return guesses
6161

easybuild/easyblocks/g/gcc.py

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@
4848
from easybuild.tools.filetools import apply_regex_substitutions, symlink, write_file
4949
from easybuild.tools.modules import get_software_root
5050
from easybuild.tools.run import run_cmd
51-
from easybuild.tools.systemtools import check_os_dependency, get_os_name, get_os_type, get_platform_name
51+
from easybuild.tools.systemtools import check_os_dependency, get_os_name, get_os_type
5252
from easybuild.tools.systemtools import get_gcc_version, get_shared_lib_ext
5353
from easybuild.tools.toolchain.compiler import OPTARCH_GENERIC
54+
from easybuild.tools.utilities import nub
5455

5556

5657
COMP_CMD_SYMLINKS = {
@@ -113,8 +114,6 @@ def __init__(self, *args, **kwargs):
113114
if get_os_name() not in ['ubuntu', 'debian']:
114115
self.cfg.update('unwanted_env_vars', ['LIBRARY_PATH'])
115116

116-
self.platform_lib = get_platform_name(withversion=True)
117-
118117
def create_dir(self, dirname):
119118
"""
120119
Create a dir to build in.
@@ -383,15 +382,17 @@ def configure_step(self):
383382
else:
384383
objdir = self.create_dir("obj")
385384

385+
# note: this also triggers the use of an updated config.guess script
386+
# (unless both the 'build_type' and 'host_type' easyconfig parameters are specified)
387+
build_type, host_type = self.determine_build_and_host_type()
388+
if build_type:
389+
configopts += ' --build=' + build_type
390+
if host_type:
391+
configopts += ' --host=' + host_type
392+
386393
# IV) actual configure, but not on default path
387394
cmd = "../configure %s %s" % (self.configopts, configopts)
388395

389-
# instead of relying on uname, we run the same command GCC uses to
390-
# determine the platform
391-
out, ec = run_cmd("../config.guess", simple=False)
392-
if ec == 0:
393-
self.platform_lib = out.rstrip()
394-
395396
self.run_configure_cmd(cmd)
396397

397398
self.disable_lto_mpfr_old_gcc(objdir)
@@ -624,7 +625,26 @@ def sanity_check_step(self):
624625

625626
os_type = get_os_type()
626627
sharedlib_ext = get_shared_lib_ext()
627-
common_infix = os.path.join('gcc', self.platform_lib, self.version)
628+
629+
# determine "configuration name" directory, see https://sourceware.org/autobook/autobook/autobook_17.html
630+
# this differs across GCC versions;
631+
# x86_64-unknown-linux-gnu was common for old GCC versions,
632+
# x86_64-pc-linux-gnu is more likely with an updated config.guess script;
633+
# since this is internal to GCC, we don't really care how it is named exactly,
634+
# we only care that it's actually there
635+
636+
# we may get multiple hits (libexec/, lib/), which is fine,
637+
# but we expect the same configuration name subdirectory in each of them
638+
glob_pattern = os.path.join(self.installdir, 'lib*', 'gcc', '*-linux-gnu', self.version)
639+
matches = glob.glob(glob_pattern)
640+
if matches:
641+
cands = nub([os.path.basename(os.path.dirname(x)) for x in matches])
642+
if len(cands) == 1:
643+
config_name_subdir = cands[0]
644+
else:
645+
raise EasyBuildError("Found multiple candidates for configuration name: %s", ', '.join(cands))
646+
else:
647+
raise EasyBuildError("Failed to determine configuration name: no matches for '%s'", glob_pattern)
628648

629649
bin_files = ["gcov"]
630650
lib_files = []
@@ -639,7 +659,7 @@ def sanity_check_step(self):
639659
else:
640660
lib_files.extend(["libasan.%s" % sharedlib_ext, "libasan.a"])
641661
libexec_files = []
642-
dirs = ['lib/%s' % common_infix]
662+
dirs = [os.path.join('lib', 'gcc', config_name_subdir, self.version)]
643663

644664
if not self.cfg['languages']:
645665
# default languages are c, c++, fortran
@@ -678,7 +698,8 @@ def sanity_check_step(self):
678698
lib_files = [tuple([os.path.join(libdir, x) for libdir in libdirs]) for x in lib_files]
679699
# lib on SuSE, libexec otherwise
680700
libdirs = ['libexec', 'lib']
681-
libexec_files = [tuple([os.path.join(libdir, common_infix, x) for libdir in libdirs]) for x in libexec_files]
701+
common_infix = os.path.join('gcc', config_name_subdir, self.version)
702+
libexec_files = [tuple([os.path.join(d, common_infix, x) for d in libdirs]) for x in libexec_files]
682703

683704
old_cmds = [os.path.join('bin', x) for x in COMP_CMD_SYMLINKS.keys()]
684705

0 commit comments

Comments
 (0)