【问题标题】:Profiling an application on Windows with cabal/ghc使用 cabal/ghc 在 Windows 上分析应用程序
【发布时间】:2015-01-19 08:56:06
【问题描述】:

我在 Windows 上进行分析时遇到了一个令人讨厌的问题。但首先,设置的上下文:

  • 我在 ~/dev/foo_shared 中创建了一个共享沙箱:cabal sandbox init --sandbox=.
  • 我使用上面的共享沙箱在 ~/dev/foo 中创建了一个沙箱:cabal sandbox init --sandbox=~/dev/foo_shared
  • 我安装了启用分析的所有依赖项:cabal install --only-dependencies --enable-library-profiling --enable-executable-profiling
  • 我配置了 foo 包,使其包含分析 RTS: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

我在谷歌上搜索过,IIRC,这是因为我缺少 GHC 的 RTS 的分析库。我从来没有为 Windows 找到它 :( 最后的信息,我在 Windows 10 上,但不确定它是否有帮助。

【问题讨论】:

    标签: windows haskell profiling cabal


    【解决方案1】:

    问题解决了。问题是因为我在 GHC 的命令行界面上使用了-debug。我被告知 -debug-p 不兼容,因此出现错误。

    【讨论】:

      猜你喜欢
      • 2015-03-04
      • 2012-11-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多