簡體   English   中英

如何編譯用於在陰謀沙箱中進行概要分析的依賴項

[英]How to compile dependencies for profiling in a cabal sandbox

我正在嘗試使用分析選項來編譯我的可執行文件之一。 我在cabal文件中添加了-prof選項。 當我這樣做時,我收到一條消息說

Could not find module ‘Package-X’
Perhaps you haven't installed the profiling libraries for package ‘package-x’?
Use -v to see a list of the files searched for.

我怎么做? 我嘗試了cabal install --only-dependency --reinstall並得到以下響應:

All the requested packages are already installed:
Use --reinstall if you want to reinstall anyway.

我已經用過--reinstall我該怎么辦? 我還嘗試了cabal configure --enable-profiling-libraries等...

bheklilr建議的鏈接有所幫助,但並沒有立即解決。

我最終在.cabal/config文件中添加了library-profiling: True .cabal/config文件library-profiling: True ,然后重新安裝所有內容。 cabal install --reinstall wolrd無法正常工作,可能是因為我在沙盒中。 但是,關於沙箱的好處是您可以將它們拋棄,所以我使用

cabal sandbox delete
cabal sandbox init
cabal install

即使此解決方案有效,但由於以下原因仍不能令人滿意:

  • 我必須修改.cabal/config這是一個全局文件,而在理想情況下,我應該只需要修改我的沙箱。 但是,我沒有嘗試創建本地陰謀配置文件

  • 我必須重新安裝EVERYTHING,即每個庫的配置文件版本以及已經安裝的普通版本。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM