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

fortran: do not link Fortran libs with unnecessary libraries #12458

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ggouaillardet
Copy link
Contributor

Fortran libraries do not need to be linked with PMIx, hwloc nor libevent. That can cause some issues with incompatible flags are pulled from the .la files.
For example, when the NAG Fortran compiler is used, libmpi_mpifh_sizeof.la pulls the -pthread flag, that is translated into -Wl,-pthread.
Then when libmpi_mpifh.la is linked with gcc but pulls -Wl,-pthread that causes the build to fail since -pthread is not a valid ld option. Not depending on these libraries is enough to avoid the above issue.

Refs #12413

Thanks to Matthew Thompson for reporting this issue and helping with the diagnostic.

Fortran libraries do not need to be linked with PMIx, hwloc nor
libevent. That can cause some issues with incompatible flags are pulled
from the .la files.
For example, when the NAG Fortran compiler is used,
libmpi_mpifh_sizeof.la pulls the -pthread flag, that is translated
into -Wl,-pthread.
Then when libmpi_mpifh.la is linked with gcc but pulls -Wl,-pthread that
causes the build to fail since -pthread is not a valid ld option.
Not depending on these libraries is enough to avoid the above issue.

Refs open-mpi#12413

Thanks to Matthew Thompson for reporting this issue and helping with
the diagnostic.

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
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.

None yet

2 participants