Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adopt module_load_environment: GCC #3556

Open
wants to merge 2 commits into
base: 5.0.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 7 additions & 14 deletions easybuild/easyblocks/g/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,13 @@ def __init__(self, *args, **kwargs):
self.log.warning('Setting withnvptx to False, since we are building on a RISC-V system')
self.cfg['withnvptx'] = False

# define list of subdirectories in search paths of module load environment
self.module_load_environment.PATH = ['bin']
self.module_load_environment.LD_LIBRARY_PATH = ['lib', 'lib64']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two lines don't need to be here since framework takes care of this exactly like this

# GCC can find its own headers and libraries but the .so's need to be in LD_LIBRARY_PATH
self.module_load_environment.CPATH = []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than setting CPATH explicitly, this should be changed to using the utility functions being added in:

self.module_load_environment.LIBRARY_PATH = ['lib', 'lib64'] if get_cpu_family() == RISCV else []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The RISC-V exception was added here in #3256, we should check the impact of not including lib/lib64 on a RISC-V system.

@bedroge Was this really necessary, or is it really only required during the build of GCC itself?


def create_dir(self, dirname):
"""
Create a dir to build in.
Expand Down Expand Up @@ -1194,17 +1201,3 @@ def sanity_check_step(self):

super(EB_GCC, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands,
extra_modules=extra_modules)

def make_module_req_guess(self):
"""
GCC can find its own headers and libraries but the .so's need to be in LD_LIBRARY_PATH
"""
guesses = super(EB_GCC, self).make_module_req_guess()
guesses.update({
'PATH': ['bin'],
'CPATH': [],
'LIBRARY_PATH': ['lib', 'lib64'] if get_cpu_family() == RISCV else [],
'LD_LIBRARY_PATH': ['lib', 'lib64'],
'MANPATH': ['man', 'share/man']
})
return guesses