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

check system compilers to set minimal buildenv #51

Merged

Conversation

lexming
Copy link

@lexming lexming commented Aug 7, 2020

I added a check for the presence of the compilers in the system. Is it ok to import distutils?

find_executable() is nice because it automatically return the first hit from $PATH, which means that it will pick executables from EB before those in the system. This is useful for easyconfigs like foss, which use the SYSTEM toolchain but load GCC as dependencies.

env_vars = {}
for compiler, flags in known_sys_compilers.items():
# distutils.spawn.find_executable() only returns first hit from $PATH
if find_executable(compiler):
Copy link
Owner

Choose a reason for hiding this comment

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

Why not use the which function we have (in the filetools) module?

It think it also makes sense to add some logging here, to print the path to the command that was found for example.

If we don't set the variable for gfortran (I don't think it makes sense), then we can also print a warning when gcc or g++ is not found?

I'll make this changes myself in my PR easybuilders#3399

Copy link
Author

Choose a reason for hiding this comment

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

I had no idea that EB already had a which function 😆

@boegel boegel merged commit 58f9485 into boegel:system_toolchain_buildenv Aug 8, 2020
@lexming lexming deleted the system_toolchain_buildenv branch August 9, 2020 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants