easybuilders / easybuild-framework

EasyBuild is a software installation framework in Python that allows you to install software in a structured and robust way.
https://easybuild.io
GNU General Public License v2.0
149 stars 202 forks source link

Installing Java-11 fails when using Lmod 7.3: unable to parse .modulerc #3445

Open alirezamecheng opened 4 years ago

alirezamecheng commented 4 years ago

Hello I had this issue with installing Java-11. Java-11 installation isn't anything but to create a .modulerc file in which an alias for Java-11 is set. My installation faild with this error:

== 2020-09-14 12:01:42,036 easyblock.py:3031 INFO Running method sanity_check_step part of step sanitycheck
== 2020-09-14 12:01:42,037 modulerc.py:75 INFO Adding module version alias for Java/11.0.2 to /tmp/eb-_umoyigc/tmpo3swvf73/all/Java/.modulerc
== 2020-09-14 12:01:42,038 modules.py:606 INFO Checking whether Java/11.0.2 exists...
== 2020-09-14 12:01:42,038 modules.py:614 INFO Module Java/11.0.2 not found in list of available modules, checking via 'module show'...
== 2020-09-14 12:01:42,158 modules.py:634 INFO Result for existence check of Java/11.0.2 module: True
== 2020-09-14 12:01:42,159 filetools.py:1495 INFO Creating directory /tmp/eb-_umoyigc/tmpo3swvf73/all/Java (parents: True, set_gid: False, sticky: False)
== 2020-09-14 12:01:42,160 filetools.py:285 INFO Symlinked /opt/modules/all/Java/11.0.2.lua to /tmp/eb-_umoyigc/tmpo3swvf73/all/Java/11.0.2.lua
== 2020-09-14 12:01:42,160 module_generator.py:1294 INFO Lmod v7.3 < v7.7.38, need to stick to Tcl syntax for .modulerc
== 2020-09-14 12:01:42,160 module_generator.py:282 INFO Generating .modulerc contents in Tcl syntax (args: module_version: {'modname': 'Java/11.0.2', 'sym_version': '11', 'version': '11.0.2'}
== 2020-09-14 12:01:42,161 module_generator.py:319 INFO Writing /tmp/eb-_umoyigc/tmpo3swvf73/all/Java/.modulerc with contents:
#%Module
module-version Java/11.0.2 11
== 2020-09-14 12:01:42,248 build_log.py:169 ERROR EasyBuild crashed with an error (at easybuild/base/exceptions.py:124 in __init__): Module command '/opt/software/Lmod/7.3/lmod/lmod/libexec/lmod python use --priority 10000 /tmp/eb-_umoyigc/tmpo3swvf73/all/' failed with exit code 1; stderr: sh: /usr/bin/tclsh: No such file or directory
Lmod has detected the following error: Unable to parse: "/tmp/eb-_umoyigc/tmpo3swvf73/all/Java/.modulerc". Aborting!

; stdout:
false
 (at easybuild/tools/modules.py:815 in run_module)

It is clear from the log file that my Lmod version was not sufficient despite that in the installation documents the recommended sufficient version is 6.5.1.

solution:

Update the Lmod to the latest version. I Updated That to 8.2.7 that worked for me.

proposal to address the issue:

Updating the Documentation will do the work.

boegel commented 4 years ago

I've moved this issue to the easybuild-framework repository, since the code generating the .modulerc is in easybuild/tools/module_generator.py.

Apparently Lmod 7.3 is not recent enough to parse the .modulerc file we generate.

The easiest way forward is hardening the version check, since in this particular case a sufficiently recent Lmod version is required. The version requirement mentioned in the documentation is for EasyBuild in general, but there are exceptions to that (this is one of those exceptions).