Closed pmspire closed 5 years ago
Adding the following to the top of my build.sh
in my affected repos seems to avoid the problem:
mpifort=$(which mpifort)
cp $mpifort $mpifort.orig
sed -i 's/\(enable_wrapper_rpath=\)"yes"/\1"no"/' $mpifort
I haven't tested enough yet to be sure that there are no unwanted side effects of this change but, if it does not seem to be problematic to others, could something like this be added as a patch in this package?
I think the cp
command there might be wrong -- I think that conda
hardlinks files into the build tree, and I was at some point trying to avoid modifying the original copy of the mpifort
script, but appear to have failed. Something more like
mpifort=$(which mpifort)
mv $mpifort $mpifort.orig
sed 's/\(enable_wrapper_rpath=\)"yes"/\1"no"/' $mpifort.orig >$mpifort
chmod +x $mpifort
might be better. You get the idea.
There's a build-time flag to set enable_wrapper_rpath=no, and I've set it in #39. The equivalent flag is already set in openmpi, so I'm guessing it's okay.
I still don't really understand why this flag would cause such an issue. This flag should really be fine.
Thanks!
Issue:
Please see https://github.com/conda/conda-build/issues/3438 for a full description and minimal reproducer. The
conda-build
team feels that this is an issue with thempich
package. I think I see where the out-of-tree library path is being hardcoded into executables built with e.g. thempifort
wrapper script, but I don't understand what that script is doing well enough to know if there's a way I can disable this path or, if that's possible, whether it would render the executable unusable. I'd be happy to use any kind of workaround that might be suggested. Thanks in advance for any ideas.