Reputation: 537
I am trying to install ThreadScope using stack install threadscope
.
Stack has given me recommendations of packages to add to my global stack.yaml file. I have followed all of its advice. This is from ~/.stack/global-project/stack.yaml:
extra-deps:
- gtk2hs-buildtools-0.13.8.0
- cairo-0.13.8.1
- glib-0.13.8.1
- gtk-0.15.5
- pango-0.13.8.1
- gio-0.13.8.1
Then I run:
stack install threadscope
cairo > configure
cairo > [1 of 2] Compiling Main ( /tmp/stack-aa04726c2a449768/cairo-0.13.8.1/Setup.hs, /tmp/stack-aa04726c2a449768/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/Main.o )
cairo > [2 of 2] Compiling StackSetupShim ( /home/nick/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /tmp/stack-aa04726c2a449768/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/StackSetupShim.o )
cairo > Linking /tmp/stack-aa04726c2a449768/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/setup ...
cairo > Configuring cairo-0.13.8.1...
cairo > setup: The pkg-config package 'cairo' version ==1.2.0 || >1.2.0 is required
cairo > but it could not be found.
cairo >
-- While building package cairo-0.13.8.1 using:
/tmp/stack-aa04726c2a449768/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/setup --builddir=.s
tack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0 configure --user --package-db=clear --package-db=global --package-db=/home/ni
ck/.stack/snapshots/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64cd85312efb9806f5e1b516e14ea204c4e266b/8.8.3/pkgdb --libdir
=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64cd85312efb9806f5e1b516e14ea204c4e266b/8.8.3/lib -
-bindir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64cd85312efb9806f5e1b516e14ea204c4e266b/8.8.3
/bin --datadir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64cd85312efb9806f5e1b516e14ea204c4e26
6b/8.8.3/share --libexecdir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64cd85312efb9806f5e1b516e
14ea204c4e266b/8.8.3/libexec --sysconfdir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64cd85312e
fb9806f5e1b516e14ea204c4e266b/8.8.3/etc --docdir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64c
d85312efb9806f5e1b516e14ea204c4e266b/8.8.3/doc/cairo-0.13.8.1 --htmldir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/2544c
b5dce03ac8ef66db22fb64cd85312efb9806f5e1b516e14ea204c4e266b/8.8.3/doc/cairo-0.13.8.1 --haddockdir=/home/nick/.stack/snapshots
/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64cd85312efb9806f5e1b516e14ea204c4e266b/8.8.3/doc/cairo-0.13.8.1 --dependency=
Cabal=Cabal-3.0.1.0 --dependency=array=array-0.5.4.0 --dependency=base=base-4.13.0.0 --dependency=bytestring=bytestring-0.10.10
.0 --dependency=gtk2hs-buildtools=gtk2hs-buildtools-0.13.8.0-Bwvbdih7QpVGW3kWnJA1H3 --dependency=mtl=mtl-2.2.2 --dependency=te
xt=text-1.2.4.0 --dependency=utf8-string=utf8-string-1.0.1.1-IRxNMq5AVf036EceEkASq3 -fcairo_pdf -fcairo_ps -fcairo_svg --exact-configuration --ghc-option=-fhide-source-paths
Process exited with code: ExitFailure 1
Progress 1/4
Ok so cairo seems to be the problem.
stack install cairo
cairo> configure
cairo> [1 of 2] Compiling Main ( /tmp/stack-e9ffd2e58a879ecc/cairo-0.13.8.1/Setup.hs, /tmp/stack-e9ffd2e58a879ecc/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/Main.o )
cairo> [2 of 2] Compiling StackSetupShim ( /home/nick/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /tmp/stack-e9ffd2e58a879ecc/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/StackSetupShim.o )
cairo> Linking /tmp/stack-e9ffd2e58a879ecc/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/setup ...
cairo> Configuring cairo-0.13.8.1...
cairo> setup: The pkg-config package 'cairo' version ==1.2.0 || >1.2.0 is required
cairo> but it could not be found.
cairo>
-- While building package cairo-0.13.8.1 using:
/tmp/stack-e9ffd2e58a879ecc/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/setup
--builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0 configure --user --package-db=clear --package-db=global
--package-db=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/b9bd790e3091cf3e10cc5b6c0aa6789904463f24721de0b3576c4a5f79
a7d5d8/8.8.3/pkgdb --libdir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/b9bd790e3091cf3e10cc5b6c0aa6789904463f24
721de0b3576c4a5f79a7d5d8/8.8.3/lib --bindir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/b9bd790e3091cf3e10cc5b6c
0aa6789904463f24721de0b3576c4a5f79a7d5d8/8.8.3/bin --datadir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/b9bd790
e3091cf3e10cc5b6c0aa6789904463f24721de0b3576c4a5f79a7d5d8/8.8.3/share --libexecdir=/home/nick/.stack/snapshots/x86_64
-linux-tinfo6/b9bd790e3091cf3e10cc5b6c0aa6789904463f24721de0b3576c4a5f79a7d5d8/8.8.3/libexec --sysconfdir=/home/nick/
.stack/snapshots/x86_64-linux-tinfo6/b9bd790e3091cf3e10cc5b6c0aa6789904463f24721de0b3576c4a5f79a7d5d8/8.8.3/etc --doc
dir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/b9bd790e3091cf3e10cc5b6c0aa6789904463f24721de0b3576c4a5f79a7d5d8
/8.8.3/doc/cairo-0.13.8.1 --htmldir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/b9bd790e3091cf3e10cc5b6c0aa678990
4463f24721de0b3576c4a5f79a7d5d8/8.8.3/doc/cairo-0.13.8.1 --haddockdir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6
/b9bd790e3091cf3e10cc5b6c0aa6789904463f24721de0b3576c4a5f79a7d5d8/8.8.3/doc/cairo-0.13.8.1 --dependency=Cabal=Cabal-3
.0.1.0 --dependency=array=array-0.5.4.0 --dependency=base=base-4.13.0.0 --dependency=bytestring=bytestring-0.10.10.0 -
-dependency=gtk2hs-buildtools=gtk2hs-buildtools-0.13.8.0-Bwvbdih7QpVGW3kWnJA1H3 --dependency=mtl=mtl-2.2.2 --depende
ncy=text=text-1.2.4.0 --dependency=utf8-string=utf8-string-1.0.1.1-IRxNMq5AVf036EceEkASq3 -fcairo_pdf -fcairo_ps
-fcairo_svg --exact-configuration --ghc-option=-fhide-source-paths
Process exited with code: ExitFailure 1
What stands out to me in this error is the line: setup: The pkg-config package 'cairo' version ==1.2.0 || >1.2.0 is required
. Hmm does this mean I should first attempt to install an older version of Cairo? I tried that but did not have any luck.
I have tried to run the commands:
stack upgrade --git --source-only
stack build cairo
I got the same error as when I ran stack install cairo
.
If I run which stack
I get back /home/nick/.local/bin/stack
Finally, here is what happens if I try stack install gtk2hs-buildtools
:
Copying from /home/nick/.stack/snapshots/x86_64-linux-tinfo6/59804b23a4d63c47966b839bf0007deca79c979c9d5aa499d8828f7acbc09797/8.8.3/bin/gtk2hsC2hs to /home/nick/.local/bin/gtk2hsC2hs
Copying from /home/nick/.stack/snapshots/x86_64-linux-tinfo6/59804b23a4d63c47966b839bf0007deca79c979c9d5aa499d8828f7acbc09797/8.8.3/bin/gtk2hsHookGenerator to /home/nick/.local/bin/gtk2hsHookGenerator
Copying from /home/nick/.stack/snapshots/x86_64-linux-tinfo6/59804b23a4d63c47966b839bf0007deca79c979c9d5aa499d8828f7acbc09797/8.8.3/bin/gtk2hsTypeGen to /home/nick/.local/bin/gtk2hsTypeGen
Copied executables to /home/nick/.local/bin:
- gtk2hsC2hs
- gtk2hsHookGenerator
- gtk2hsTypeGen
Warning: The gtk2hsC2hs executable found on the PATH environment variable is /home/nick/.cabal/bin/gtk2hsC2hs and not the version that was just installed. This means that gtk2hsC2hs
calls on the command line will not use this version.
Warning: The gtk2hsHookGenerator executable found on the PATH environment variable is /home/nick/.cabal/bin/gtk2hsHookGenerator and not the version that was just installed. This means that
gtk2hsHookGenerator calls on the command line will not use this version.
Warning: The gtk2hsTypeGen executable found on the PATH environment variable is /home/nick/.cabal/bin/gtk2hsTypeGen and not the version that was just installed. This means that gtk2hsTypeGen
calls on the command line will not use this version.
Upvotes: 0
Views: 317
Reputation: 4637
pkg-config
is looking for a package named cairo
, which can be confusing as it has the same name as the Haskell cairo
package. This is the useful part of the build log:
cairo> setup: The pkg-config package 'cairo' version ==1.2.0 || >1.2.0 is required
cairo> but it could not be found.
pkg-config
is searching the PKG_CONFIG_PATH
for a file named cairo.pc
. On Debian this is provided by the libcairo2-dev
package.
Upvotes: 1