[英]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.