5

是否有最大数量的可以通过 Cabal / 通过 GHC 编译的模块?

我确实有一个相当大的项目(许多自动生成的模块),它不使用 cabal 编译,但没有显示错误消息。Cabal 只是默默地退出exit code 127(Mac OS X,发生在 10.6 和 10.8,仅测试这两个平台;GHC 7.4.2)。

编辑输出cabal build -v3

>>> cabal build -v3
Using internal setup method with build-type Simple and args:
["build","--verbose=3"]
creating dist/build
creating dist/build/autogen
Building java-bindings-1.0...
Preprocessing library java-bindings-1.0...
Building library...
creating dist/build
("/usr/bin/ghc",["--make","-package-name","java-bindings-1.0","-v","-hide-all-packages","-fbuilding-cabal-package","-i","-idist/build","-i.","-idist/build/autogen","-Idist/build/autogen","-Idist/build","-optP-include","-optPdist/build/autogen/cabal_macros.h","-odir","dist/build","-hidir","dist/build","-stubdir","dist/build","-package-id","base-4.5.1.0-81d626fb996bc7e140a3fd4481b338cd","-package-id","java-bridge-0.20130602-5cb59a7e71733b25cf4b8a8ae649598b","-O","-XHaskell98","Java.Applet", (references to the other modules)
/usr/bin/ghc returned ExitFailure 127

既然我看到了输出,我相信它可能是传递给 ghc 的命令行参数的数量 - 我相信操作系统施加了最大长度......有没有办法绕过这个限制?

4

1 回答 1

2

是的 - 操作系统对命令行的长度进行了限制,该长度在内部用于最后的链接步骤。

除了报告针对 Cabal 的错误并可能尝试自己修复之外,我不确定在这里建议什么。如果你走那条路,Cabal 的代码非常易读。:)

于 2013-06-20T03:38:59.963 回答