Installing conf-mpi on Mac Ports

I had to do this, looks a little round about. conf-mpi script probably wasn’t tested with mac ports.

$ cat installmpi.sh 
export PREFIX=/opt/local
export MPI_INC_DIR=$PREFIX/include
export MPI_LIB_DIR=$PREFIX/lib
export MPI_BIN_PATH=$PREFIX/bin
opam install conf-mpi

One can rig things up so that configuration systems walk the path and try the locations on it, so that they’ll find things whether they’re in /usr/local or /opt/local or whatever. A good guess is always that if you have a path element named /FOO/bin, then you should check /FOO/lib, /FOO/include, etc.

It’s just too complicated ATM, I still couldn’t install the mpi package. Trying to reinstall openmpi-devel-default maybe it was port that messed up. Takes too many tries.

Ok this was the reason, if you get weird errors about conf-* packages not installing then you probably have to reinstall the macports packages… I removed all variants of openmpi and then reinstalled, that did work…

MacPorts variants are not automatically tested by the MacPorts CI system, so they can get messy, yes.

I suppose these conf-* packages ought to be using pkg-config yes? conf-mpfr was not, I reported a bug.

That’s probably a good way to fix it.