Skip to content

WIP: reproduce issue #117 - cmake can't discover MPI, MPI_CXX_FOUND when using gold linker.

Janek Kozicki requested to merge reproduce117 into master

Following the problems of cmake with mpicxx and gold linker:

See:

I discovered that our pipeline was working "by accident" all this time. It is not a matter of what is installed or what is not installed. It is a matter of invoking cmake preprations with gold disabled, then compiling with gold enabled. And that's exactly what was going on in the pipeline.

Let's see if I'm correct. The pipeline should fail here, only because I swapped this single line with cmake invocation.

@bchareyre try invoking cmake preprations without gold, then compiling with gold. You should save several seconds on linker time.

If that works, you can try to make this switching automatic, a part of your bash command to build.

To make it possible to switch linker configurations in the middle of the build process (after preparations, before compilation) you could for example use visudo to allow launching update-alternatives without typing password all the time. You could add a line in last section, usually called # Allow members of group sudo to execute any command (the order of sections matters, if that line is in wrong place it can be overwritten by some next line), add a line like this: %bchareyre ALL=(ALL) NOPASSWD:/usr/bin/update-alternatives.

If that works for you, I guess we could close issue #117 (closed) as solved. Might be useful to report a bug somewhere else. Probably cmake ;)

Edited by Janek Kozicki

Merge request reports