0

After finally figuring out how to install all the required packages for haskell-mpi, I run:

sudo cabal install --global haskell-mpi

and, it gives a header error:

Resolving dependencies...
Configuring haskell-mpi-1.2.1...
Preprocessing library haskell-mpi-1.2.1...
dist/build/Control/Parallel/MPI/Internal.chs.h:1:17: error: mpi.h: No such file or directory
c2hs: Error during preprocessing custom header file
cabal: Error: some packages failed to install:
haskell-mpi-1.2.1 failed during the building phase. The exception was:
ExitFailure 1

How do I link the header?

NoBugs
  • 9,310
  • 13
  • 80
  • 146

2 Answers2

1

You likely need to install your distribution's development package for MPI through your package manager. Look for one with -dev in the name; that seems to be a common convention.

Daniel Wagner
  • 145,880
  • 9
  • 220
  • 380
  • I have already installed libopenmpi-dev, and I also tried setting the include path as described here: http://stackoverflow.com/questions/5759838/cannot-get-cabal-to-find-the-mpi-library-for-haskell-mpi-on-windows – NoBugs Feb 21 '12 at 19:25
0

This worked!

sudo cabal install --global --extra-include-dirs=/usr/lib/openmpi/include/ haskell-mpi

This is mentioned in the readme, but not in the package page.

NoBugs
  • 9,310
  • 13
  • 80
  • 146