Skip to content

Conversation

@hppritcha
Copy link
Member

The --enable-new-dtags option for the compiler wrappers is
often great, but for some particular install/usage scenarios
causes issues.

This commit provides a new configury option to use of rpath
in the compiler wrappers, but disables the
use of --enable-new-dtags in the link line.

The new configury option is

--enable-wrappers-runpath

To disable use of --enable-new-dtags in the wrappers, add

--disable-wrappers-runpath

to the Open MPI configury line.

Fixes #1089

Signed-off-by: Howard Pritchard [email protected]
(cherry picked from commit ebb30c1)

The --enable-new-dtags option for the compiler wrappers is
often great, but for some particular install/usage scenarios
causes issues.

This commit provides a new configury option to use of rpath
in the compiler wrappers, but disables the
use of --enable-new-dtags in the link line.

The new configury option is

--enable-wrappers-runpath

To disable use of --enable-new-dtags in the wrappers, add

--disable-wrappers-runpath

to the Open MPI configury line.

Fixes open-mpi#1089

Signed-off-by: Howard Pritchard <[email protected]>
(cherry picked from commit ebb30c1)
@hppritcha hppritcha added this to the v3.0.4 milestone Mar 28, 2019
@hppritcha hppritcha requested a review from bwbarrett March 28, 2019 00:41
AC_MSG_CHECKING([if linker supports RUNPATH])
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 7;])],
[WRAPPER_RPATH_SUPPORT=runpath
runpath_args="-Wl,--enable-new-dtags"
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't seem right. Can you please double check this in the context of the rest of the configure script?

Specifically: $runpath_args is used later down in the code, but you've now only assigned it if --disable-wrapper-runpath was not specified.

Are the wrappers the only place that runpath is used?

Copy link
Member Author

Choose a reason for hiding this comment

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

hmmm looks like we may need some other commits from master, I'm surprised the cherry-pick worked without a problem.

Copy link
Member Author

Choose a reason for hiding this comment

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

actually runpath_args is initialized empty at line 234. the variable is used at line 315. The admin wanting the patch on 3.0.x noticed an issue with the fortran wrappers not obeying the --enable/disable-runpath, but I'll fix that in a separate PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

I was wrong. the patch looks correct. see comments on the file.

Copy link
Member

Choose a reason for hiding this comment

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

Right, I see it's initialized in 234. But it's used down below. My question is: are there any other places we use runpath besides the wrappers? Because if so, this patch is disabling runpath everywhere, not just for the wrappers.

If we're only using runpath for the wrappers, then this patch is likely fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

It doesn't look like it. buildrpm.sh does add --enable-new-dtags to LDFLAGS passed into configure for the spec file. Looks like this change has been in master for almost 2 years now.

@hppritcha
Copy link
Member Author

looks like mellanox is having internet problems.
bot:mellanox:retest

@jsquyres
Copy link
Member

jsquyres commented Apr 9, 2019

@hppritcha Should this be a PR for master, and then cherry-picked over to the relevant release branches?

Copy link
Member

@jsquyres jsquyres left a comment

Choose a reason for hiding this comment

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

I missed that this is a cherry pick; sorry.

@bwbarrett bwbarrett modified the milestones: v3.0.4, v3.0.5 Apr 16, 2019
@jsquyres
Copy link
Member

@hppritcha Please also PR this to v3.1.x.

@jsquyres jsquyres merged commit fb33e10 into open-mpi:v3.0.x Apr 22, 2019
@hppritcha
Copy link
Member Author

its already in v3.1.x it got in before v3.1.x was branched from master

@jsquyres
Copy link
Member

@hppritcha Ah, perfect!

@hppritcha hppritcha deleted the topic/fix_issue_1089_on_v30x branch October 29, 2021 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants