是否可以通过Cabal / via 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的命令行参数的数量 - 我相信操作系统会施加最大长度...有没有办法规避这个限制?
答案 0 :(得分:2)
是 - 操作系统对命令行的长度设置了限制,该命令行在内部用于最终链接步骤。
我不知道在这里建议什么,除了报告针对Cabal的错误并且可能试图自己修复它。如果你走那条路,Cabal的代码很可读。 :)