在我的项目上运行stack build --profile
会产生以下错误:
tf-random-0.5: configure
tf-random-0.5: build
Progress: 1/5
-- While building package tf-random-0.5 using:
/home/user/.stack/setup-exe-cache/x86_64-linux/setup-Simple-Cabal-1.24.0.0-ghc-8.0.1 --builddir=.stack-work/dist/x86_64-linux/Cabal-1.24.0.0 build --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
Logs have been written to: /home/user/myProject/.stack-work/logs/tf-random-0.5.log
Configuring tf-random-0.5...
Building tf-random-0.5...
Preprocessing library tf-random-0.5...
[1 of 4] Compiling System.Random.TF.Gen ( src/System/Random/TF/Gen.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/System/Random/TF/Gen.o )
[2 of 4] Compiling System.Random.TF.Init ( src/System/Random/TF/Init.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/System/Random/TF/Init.o )
/tmp/stack27695/tf-random-0.5/src/System/Random/TF/Init.hs:94:5: warning: [-Wdeprecations]
In the use of ‘bitSize’ (imported from Data.Bits):
Deprecated: "Use 'bitSizeMaybe' or 'finiteBitSize' instead"
[3 of 4] Compiling System.Random.TF.Instances ( src/System/Random/TF/Instances.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/System/Random/TF/Instances.o )
[4 of 4] Compiling System.Random.TF ( src/System/Random/TF.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/System/Random/TF.o )
[1 of 4] Compiling System.Random.TF.Gen ( src/System/Random/TF/Gen.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/System/Random/TF/Gen.p_o )
/tmp/stack27695/tf-random-0.5/src/System/Random/TF/Gen.hs:18:1: error:
Failed to load interface for ‘System.Random’
Perhaps you haven't installed the profiling libraries for package ‘random-1.1’?
Use -v to see a list of the files searched for.
请注意,我的系统上有其他堆栈项目,不会产生此错误。我能想到的那些项目和这个项目之间的唯一区别是,这个项目大量使用C / C ++ FFI。
最后,我尝试将tf-random
和random
的依赖项添加到我的cabal文件中,但无济于事。另请注意,我的项目中没有使用random
库,运行stack build
的工作正常(我在添加--profile
代码时只看到这些错误)。
编辑: ghc-pkg list
的输出。
/usr/lib/ghc-8.0.1/package.conf.d
Cabal-1.24.0.0
HUnit-1.5.0.0
QuickCheck-2.9.2
X11-1.6.1.2
X11-xft-0.3.1
array-0.5.1.1
base-4.9.0.0
binary-0.8.3.0
bytestring-0.10.8.1
call-stack-0.1.0
containers-0.5.7.1
data-default-0.7.1.1
data-default-class-0.1.2.0
data-default-instances-containers-0.0.1
data-default-instances-dlist-0.0.1
data-default-instances-old-locale-0.0.1
deepseq-1.4.2.0
directory-1.2.6.2
dlist-0.8.0.2
extensible-exceptions-0.1.1.4
filepath-1.4.1.0
ghc-8.0.1
ghc-boot-8.0.1
ghc-boot-th-8.0.1
ghc-prim-0.5.0.0
ghci-8.0.1
haskeline-0.7.2.3
hoopl-3.10.2.1
hpc-0.6.0.3
integer-gmp-1.0.0.1
mtl-2.2.1
old-locale-1.0.0.7
old-time-1.1.0.3
pretty-1.1.3.3
primitive-0.6.1.0
process-1.4.2.0
quickcheck-io-0.1.4
random-1.1
rts-1.0
setlocale-1.0.0.3
template-haskell-2.11.0.0
terminfo-0.4.0.2
tf-random-0.5
time-1.6.0.1
transformers-0.5.2.0
unix-2.7.2.0
utf8-string-1.0.1.1
xhtml-3000.2.1
xmonad-0.12
xmonad-contrib-0.12
/home/user/.ghc/x86_64-linux-8.0.1/package.conf.d
HUnit-1.5.0.0
ListLike-4.5
QuickCheck-2.9.2
Unixutils-1.54.1
bzlib-0.5.0.5
call-stack-0.1.0
cereal-0.5.4.0
crypto-api-0.13.2
entropy-0.3.7
exceptions-0.8.3
fmlist-0.9
generic-deriving-1.11.1
hscolour-1.24.1
network-uri-2.6.1.0
parsec-3.1.11
primitive-0.6.1.0
process-extras-0.4.1.4
pureMD5-2.1.3
regex-base-0.93.2
regex-compat-0.95.1
regex-posix-0.95.2
regex-tdfa-1.2.2
sr-extra-1.46.3.2
stm-2.4.4.1
syb-0.6
tagged-0.8.5
text-1.2.2.1
tf-random-0.5
transformers-compat-0.5.1.4
vector-0.11.0.0
zlib-0.6.1.2