编译 Haskell-mpi

发布于 2025-01-07 13:54:59 字数 569 浏览 1 评论 0原文

最终弄清楚如何安装 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

How do I link the header?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

余生再见 2025-01-14 13:54:59

您可能需要通过包管理器安装 MPI 发行版的开发包。寻找名称中带有 -dev 的产品;这似乎是一个共同的惯例。

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.

忆依然 2025-01-14 13:54:59

这有效!

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

自述文件中提到了这一点,但 软件包页面

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文