编译Haskell-mpi

编译Haskell-mpi,haskell,mpi,cabal,Haskell,Mpi,Cabal,在最终弄清楚如何安装haskell mpi所需的所有软件包后,我运行: sudo cabal install --global haskell-mpi 并且,它给出了一个标头错误: 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: err

在最终弄清楚如何安装haskell mpi所需的所有软件包后,我运行:

sudo cabal install --global haskell-mpi
并且,它给出了一个标头错误:

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

如何链接标题?

您可能需要通过软件包管理器安装发行版的MPI开发软件包。查找名称中带有
-dev
的;这似乎是一个常见的惯例。

这起作用了

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

这在中提到,但在中没有提到。

我已经安装了libopenmpi dev,并且我还尝试设置包含路径,如下所述: