我在Windows上进行性能分析时遇到了一个令人讨厌的问题。但首先是设置的背景:
cabal sandbox init --sandbox=.
cabal sandbox init --sandbox=~/dev/foo_shared
cabal install --only-dependencies --enable-library-profiling --enable-executable-profiling
cabal configure --enable-profiling --enable-executable-profiling
cabal build
一切都正确建立,但没有链接。然后我用cabal build -v3
重建,这是链接器部分(最有趣的部分):
c:/program files/haskell platform/2014.2.0.0/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lHSrts_debug_p
我用Google搜索,而IIRC,这是因为我缺少GHC RTS的分析库。我从未在Windows上找到它:(最后的信息,我在Windows 10上,不确定它有帮助。
答案 0 :(得分:0)
问题解决了。问题是由于我在GHC的命令行界面上使用-debug
这一事实。我被告知-debug
和-p
不兼容,因此错误。