Skip to content

Extend framework to enable modules to ship RPATH wrappers #3918

@stderr-enst

Description

@stderr-enst

In the EESSI hackathon we started to work on an issue when building Software with RPATH-enabled compiler modules.
As a user, I don't really want to untangle the RPATHs for the modules library, when I am building my own code. So we thought the already existing RPATH wrappers could be automatically loaded when loading an RPATH enabled compiler module. (configurable as an easyconfig-option!)

In this issue I want to track a couple of changes that are required on the framework side, to allow modules to ship RPATH wrapper scripts when they are loaded.

There are a couple of open points to address:

  1. modify module_generator.py (@boegel):
    • Add conditional statement for environment variables. Then we can ignore rpath wrappers while loading a module if something like DISABLE_RPATH_WRAPPERS is set
    • Ensure that wrappers are not put into $PATH if module is used within EasyBuild
  2. modify prepare_rpath_wrappers() in toolchain.py (@stderr-enst):
    • Add function parameter to prepare_rpath_wrappers to install wrappers in a caller-given directory
    • Return directory path where wrappers were installed
    • Add option to put all wrapper scripts in a single directory (with no subdirs like gcc_wrapper/gcc)
    • Don't write rpath_wrapper_log to tempfile.gettempdir() if debug is set. This location does not necessarily exist if a module is loaded with the wrapper scripts in place
  3. modify rpath_wrapper_template.sh.in:
    • Add option to read env variables RPATH_INCLUDE_DIRS and RPATH_FILTER_DIRS variables, to include/exclude directories in wrapper script (as comma-separated list) at runtime
    • Figure out a useful way to treat logging in rpath_wrapper_template.sh.in. Otherwise this will try to log to possibly non-existing /tmp/-dirs or similar
  4. Add create_rpath_wrappers(), probably in toolchain.py(?):
    • Refactor create_rpath_wrappers from easybuild-easyblocks/pull/2638 into a more generic location within framework. This is probably used for other compilers in the future as well

Related PRs:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions