-
Notifications
You must be signed in to change notification settings - Fork 203
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
fix trying to generate RPATH wrappers for Clang #4088
fix trying to generate RPATH wrappers for Clang #4088
Conversation
…he 'which' call in 'prepare_rpath_wrappers' fails when looping over those None objects. Thus, skip those and continue with the next loop iteration
@casparvl It would be nice if we could enhance the Without this change, what happens? A hard crash, or RPATH linking just doesn't happen? |
Yes, without this, a |
…or which the fortran compilers are 'None', such as Clang
… those. I Can however instatiate a Clang toolchain similar to how it's done here https://github.com/easybuilders/easybuild-easyblocks/blob/b436f55669e5e09fe49555c7ce6a3c456dbacc4a/easybuild/easyblocks/c/clang.py#L420 . That 'prepare_rpath_wrappers()' call would cause an error without the fix in this current PR
@boegel is this more or less what you had in mind in terms of test? Can you review this PR, in conjuction with this EasyBlock PR easybuilders/easybuild-easyblocks#2799 ? From my perspective, they are ready for review. |
@casparvl That test is perfect: if I run it after temporarily undoing the fix in
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This loop is supposed to loop over all compilers for which wrappers need to be created. However, this line returns (['clang', 'clang++'],[None, None, None]) for the
Clang
toolchain. The subsequent call towhich
happening here then fails.This PR fixes that by explicitely checking if
cmd
isNone
. If so, it proceeds to the next loop iteration and doens't try to create an RPATH wrapper for this 'None' command.