【发布时间】:2016-08-06 07:09:58
【问题描述】:
我找到了一个很好的音频库来处理服务器端的音频,但是在将其作为 yesod 的一部分时我遇到了麻烦(可能是因为我还不太了解 cabal/stack)。
我正在尝试包含这个模块Sound.File.Sndfile,并且我已经从这里http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.27.tar.gz 下载了它的源文件。完成它的步骤是什么?
编辑
我试着做这个步骤
runhaskell Setup.hs configure --ghc
runhaskell Setup.hs build
runhaskell Setup.hs install
但它没有Setup.hs 文件。
编辑 2
我已按照 Alexis King 的建议添加了依赖项 hsndfile,但在构建时出现以下错误:
[ 1 of 59] Compiling Enums ( Enums.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.7.0/build/Enums.o )
<command line>: can't load .so/.DLL for: libsndfile.so (libsndfile.so: cannot open shared object file: No such file or directory)
-- While building package Fastwork-0.0.0 using:
/home/geppetto/.stack/setup-exe-cache/x86_64-linux/setup-Simple-Cabal-1.22.7.0-ghc-7.10.3 --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.7.0 build lib:Fastwork exe:Fastwork --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
我已经下载了libsndfile-1.0.25.tar.gz 并将其解压缩,然后运行 ./configure、make、make install。当我尝试在我的 Yesod 项目中再次执行 stack build 时,错误是一样的。我错过了什么?
【问题讨论】:
标签: haskell cabal yesod haskell-stack