2012-02-21 102 views
0

終於搞清楚瞭如何安裝所有需要的包Haskell的-MPI後,我跑:編譯哈斯克爾-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 

怎麼辦我鏈接標題?

回答

0

這工作!

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

這在readme被提及,但不是在package page

1

您可能需要通過包管理器爲MPI安裝發行版的開發包。在名稱中找一個與-dev相匹配的名稱;這似乎是一個共同的慣例。

+0

我已經安裝了libopenmpi-dev,並且我還嘗試設置包含路徑,如下所述:http://stackoverflow.com/questions/5759838/cannot-get-cabal-to-find-the-mpi-library - 用於-哈斯克爾-MPI-的窗口 – NoBugs 2012-02-21 19:25:51