Skip to content
Merged
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']
# GCC can find its own headers and libraries but the .so's need to be in LD_LIBRARY_PATH
self.module_load_environment.CPATH = []
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?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not 100% sure, but I think the final installation wouldn't work without this either.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IMO leaving those paths in LIBRARY_PATH should not cause any harm beyond having two extra dirs in that environment variable. So I updated this easyblock to remove CPATH but leave LIBRARY_PATH with default paths: https://github.com/easybuilders/easybuild-easyblocks/pull/3584/files/04dc2b383f7116d218e7fe984ae47cd7ab063eed..9926576e2256d421d0a0cc768c2d6ca85d6b7119


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