commercialhaskell / stack

The Haskell Tool Stack
http://haskellstack.org
BSD 3-Clause "New" or "Revised" License
4k stars 843 forks source link

explicit-setup-deps causes strange build failure linking Setup with -ltinfo #2093

Open joeyh opened 8 years ago

joeyh commented 8 years ago

git-annex's Setup.hs needs some of its dependencies to be installed, so I added this to its stack.yaml on a user's request:

explicit-setup-deps:
  git-annex: true

But this made stack build fail, in a strange way:

Linking /home/builder/git-annex/.stack-work/dist/i386-linux/Cabal-1.22.5.0/setup/setup
/usr/bin/ld: cannot find -ltinfo

This build failure occurred using stack 1.0.4.3 on Debian 8.3 stable. ghc and some haskell libraries are installed system-wide using apt. (So, the build succeeds when explicit-setup-deps is not enabled; Setup is built using the system-wide installed libs.) System is otherwise stock.

The libtinfo5 package is installed (it's a standard part of Debian), but the -dev package is not, so linking with -ltinfo won't work. I was able to work around the build failure by installing libtinfo-dev.

Full build output with --verbosity debug --cabal verbose attached below.

builder@orca:~/git-annex$ stack build --verbosity=debug --cabal-verbose
Version 1.0.4.3 i386
2016-05-03 18:36:07.028177: [debug] Checking for project config at: /home/builder/git-annex/stack.yaml @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Config src/Stack/Config.hs:761:9)
2016-05-03 18:36:07.028820: [debug] Loading project config file stack.yaml @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Config src/Stack/Config.hs:779:13)
2016-05-03 18:36:07.030789: [debug] Run process: ldd /home/builder/.local/bin/stack @(stack_JlzIf2rBNeuFEjNaHJwIZR:System.Process.Read src/System/Process/Read.hs:269:3)
2016-05-03 18:36:07.054099: [debug] Trying to decode /home/builder/.stack/build-plan-cache/i386-linux/lts-5.5.cache @(stack_JlzIf2rBNeuFEjNaHJwIZR:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-05-03 18:36:07.075654: [debug] Success decoding /home/builder/.stack/build-plan-cache/i386-linux/lts-5.5.cache @(stack_JlzIf2rBNeuFEjNaHJwIZR:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-05-03 18:36:07.075912: [debug] Trying to decode /home/builder/.stack/indices/Hackage/00-index.cache @(stack_JlzIf2rBNeuFEjNaHJwIZR:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-05-03 18:36:07.527941: [debug] Success decoding /home/builder/.stack/indices/Hackage/00-index.cache @(stack_JlzIf2rBNeuFEjNaHJwIZR:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-05-03 18:36:07.551795: [debug] Run process: ghc --info @(stack_JlzIf2rBNeuFEjNaHJwIZR:System.Process.Read src/System/Process/Read.hs:269:3)
2016-05-03 18:36:07.598849: [debug] Run process: ghc --numeric-version @(stack_JlzIf2rBNeuFEjNaHJwIZR:System.Process.Read src/System/Process/Read.hs:269:3)
2016-05-03 18:36:07.675907: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal version @(stack_JlzIf2rBNeuFEjNaHJwIZR:System.Process.Read src/System/Process/Read.hs:269:3)
2016-05-03 18:36:07.714156: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_JlzIf2rBNeuFEjNaHJwIZR:System.Process.Read src/System/Process/Read.hs:269:3)
2016-05-03 18:36:07.757221: [debug] Checking resolver: lts-5.5 @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Source src/Stack/Build/Source.hs:164:17)
2016-05-03 18:36:07.757591: [debug] Trying to decode /home/builder/.stack/build-plan-cache/i386-linux/lts-5.5.cache @(stack_JlzIf2rBNeuFEjNaHJwIZR:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-05-03 18:36:07.775196: [debug] Success decoding /home/builder/.stack/build-plan-cache/i386-linux/lts-5.5.cache @(stack_JlzIf2rBNeuFEjNaHJwIZR:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-05-03 18:36:09.003080: [debug] Run process: ghc-pkg --global --no-user-package-db dump --expand-pkgroot @(stack_JlzIf2rBNeuFEjNaHJwIZR:System.Process.Read src/System/Process/Read.hs:269:3)
2016-05-03 18:36:09.065050: [debug] Ignoring package haskeline due to wanting version 0.7.2.2 instead of 0.7.2.1 @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.065315: [debug] Ignoring package terminfo due to wanting version 0.4.0.2 instead of 0.4.0.1 @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.065475: [debug] Ignoring package Cabal due to wrong location: (Nothing,Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.065630: [debug] Ignoring package process due to wrong location: (Nothing,Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.066505: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb dump --expand-pkgroot @(stack_JlzIf2rBNeuFEjNaHJwIZR:System.Process.Read src/System/Process/Read.hs:269:3)
2016-05-03 18:36:09.271946: [debug] Ignoring package language-c, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.272369: [debug] Ignoring package yesod, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.272529: [debug] Ignoring package yesod-auth, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.272694: [debug] Ignoring package yesod-form, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.273025: [debug] Ignoring package aws, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.273245: [debug] Ignoring package DAV, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.273639: [debug] Ignoring package yesod-static, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.273810: [debug] Ignoring package yesod-persistent, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.274013: [debug] Ignoring package xml-hamlet, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.274189: [debug] Ignoring package persistent-sqlite, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.274352: [debug] Ignoring package yesod-default, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.274519: [debug] Ignoring package authenticate, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.274709: [debug] Ignoring package tagstream-conduit, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.274877: [debug] Ignoring package persistent-template, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.275056: [debug] Ignoring package yesod-core, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.275221: [debug] Ignoring package esqueleto, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.275411: [debug] Ignoring package persistent, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.275695: [debug] Ignoring package xml-conduit, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.275866: [debug] Ignoring package warp-tls, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.276064: [debug] Ignoring package wai-app-static, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.276258: [debug] Ignoring package warp, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.276432: [debug] Ignoring package wai-extra, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.276603: [debug] Ignoring package http-conduit, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.276766: [debug] Ignoring package tasty-rerun, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.276946: [debug] Ignoring package http-client-tls, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.277114: [debug] Ignoring package dns, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.277284: [debug] Ignoring package monad-logger, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.277454: [debug] Ignoring package http-client, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.277746: [debug] Ignoring package cryptohash-conduit, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.277931: [debug] Ignoring package conduit-extra, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.278172: [debug] Ignoring package streaming-commons, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.278341: [debug] Ignoring package connection, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.278604: [debug] Ignoring package x509-system, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.278822: [debug] Ignoring package http2, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.279057: [debug] Ignoring package aeson-pretty, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.279236: [debug] Ignoring package shakespeare, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.279467: [debug] Ignoring package hjsmin, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.279987: [debug] Ignoring package tasty-quickcheck, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.280179: [debug] Ignoring package tasty-hunit, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.280360: [debug] Ignoring package tasty, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.280652: [debug] Ignoring package optparse-applicative, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.280817: [debug] Ignoring package concurrent-output, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.281195: [debug] Ignoring package MissingH, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.281395: [debug] Ignoring package mime-mail, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.281574: [debug] Ignoring package cmdargs, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.282460: [debug] Ignoring package hslogger, from (InstalledTo Snap,"/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-05-03 18:36:09.283107: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/builder/git-annex/.stack-work/install/i386-linux/lts-5.5/7.10.3/pkgdb dump --expand-pkgroot @(stack_JlzIf2rBNeuFEjNaHJwIZR:System.Process.Read src/System/Process/Read.hs:269:3)
2016-05-03 18:36:09.361898: [debug] Trying to decode /home/builder/.stack/indices/Hackage/00-index.cache @(stack_JlzIf2rBNeuFEjNaHJwIZR:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-05-03 18:36:09.752970: [debug] Success decoding /home/builder/.stack/indices/Hackage/00-index.cache @(stack_JlzIf2rBNeuFEjNaHJwIZR:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-05-03 18:36:10.076010: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_JlzIf2rBNeuFEjNaHJwIZR:System.Process.Read src/System/Process/Read.hs:269:3)
2016-05-03 18:36:10.108214: [info] git-annex-6.20160419: configure @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Execute src/Stack/Build/Execute.hs:703:23)
2016-05-03 18:36:10.109172: [debug] Run process: /home/builder/.stack/programs/i386-linux/ghc-7.10.3/bin/ghc --make -odir /home/builder/git-annex/.stack-work/dist/i386-linux/Cabal-1.22.5.0/setup -hidir /home/builder/git-annex/.stack-work/dist/i386-linux/Cabal-1.22.5.0/setup -i -i. -clear-package-db -global-package-db -package-db=/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb -package-db=/home/builder/git-annex/.stack-work/install/i386-linux/lts-5.5/7.10.3/pkgdb -hide-all-packages -package=Cabal-1.22.5.0 -package-id=DAV-1.2-e12e8d3db003009f6d1feb1f36bbfe0b -package-id=IfElse-0.85-3f461bc396c1fbb2fcdc31047bb7bc96 -package-id=MissingH-1.3.0.1-76f032fdac32be88feb89617737d2977 -package-id=QuickCheck-2.8.1-17e290014fbbe7f48053b070a6c014b1 -package-id=SafeSemaphore-0.10.1-7dde3e1d382a039339ad0c2acbb3e0ea -package-id=aeson-0.9.0.1-d0e79c1a9a7dbaca6353dad4ccc1ab7d -package-id=array-0.5.1.0-98220802c10d9d803be36e35c603d572 -package-id=async-2.1.0-b6f4570165c312174f1c42fdc82517b2 -package-id=aws-0.13.0-55a341c64cf6ed75fe9c1278dec86e5c -package-id=base-4.8.2.0-a3ce8575fb7e5b352e3a0df9b7b44e44 -package-id=bin-package-db-0.0.0.0-1d99a2349f9c82a6557bce029a3ad40e -package-id=binary-0.7.5.0-35c4b11f317037b03e6dcb11af8d8243 -package-id=blaze-builder-0.4.0.1-7d65b24e049c6895949b08fe1cf7a741 -package-id=bloomfilter-2.0.1.0-bc6de065d12944d1ca22c35d28faf177 -package-id=byteable-0.1.1-ffe60d77855da5db6b3e54f7e6efbee8 -package-id=bytestring-0.10.6.0-89a6fa47eb216379d389091d263e752c -package-id=case-insensitive-1.2.0.5-6669cd7a393ccedc4f66c0a01b6f0e2f -package-id=clientsession-0.9.1.1-fa943217aeadbae76f88981c0d7f3675 -package-id=concurrent-output-1.7.3-a3d27843302a2d2aa1e4e2929f2de1ee -package-id=conduit-1.2.6.2-eb5c8d398458ea720173726448d4783a -package-id=conduit-extra-1.1.10.1-e98f2ccab7522559ea21439851dd91d1 -package-id=containers-0.5.6.2-5879d666a9e12594253a40caef70c7d4 -package-id=crypto-api-0.13.2-5e5ed747d76f72ffd3e491e5e7d7d22c -package-id=cryptonite-0.10-05af7e6bb952d62159009db34feb825d -package-id=data-default-0.5.3-a34fab0e414a3e31b9dccb1774520fca -package-id=deepseq-1.4.1.1-d8d3cda9ca91dc984439215591b154d0 -package-id=directory-1.2.2.0-97fb5c811b47ae4c6359895cdbc5fc3a -package-id=disk-free-space-0.1.0.1-848e612766a388a436ef158b8e080d91 -package-id=dlist-0.7.1.2-c4ab12ed0d59ced85d141ed8ae731411 -package-id=dns-2.0.1-a4a9fb809d57869d789cab1c52822269 -package-id=edit-distance-0.2.2.1-9d3891bf039e76d5754b7861295dabda -package-id=esqueleto-2.4.3-d911e02681e12e824e8c3ba93d884dfd -package-id=exceptions-0.8.2.1-db10e976cd037dfd316f5eed5f9febfd -package-id=feed-0.3.11.1-3d9d7b05701f970d4eaca968ce9f4456 -package-id=filepath-1.4.0.0-59267d26bde9029c896503f5d82794cc -package-id=ghc-prim-0.4.0.0-bf246eb9fdda7435f0c147a313ce59fb -package-id=haskeline-0.7.2.1-7776d7bbb3d9882172f76eb6ca8d4b39 -package-id=hinotify-0.3.8.1-5acdb035193afc53f559fedf65dbfef2 -package-id=hoopl-3.10.0.2-4a6fb10ddb64ba158323bbb4495d47d6 -package-id=hpc-0.6.0.2-1661a94582f91043f10870c8c5127980 -package-id=hslogger-1.2.9-dd252cf814b41d9c7ca48db3926b6d9b -package-id=http-client-0.4.27-f8cfa1bb3afdcc3f71c47da9f79bf528 -package-id=http-conduit-2.1.8-95f5a49afe92ef5e2e38119023bff69a -package-id=http-types-0.9-820fa02c0036531a8923d39a6759b146 -package-id=integer-gmp-1.0.0.0-4ff98693d6e5d6065e60052264067c09 -package-id=json-0.9.1-cbb74883676b554cfe8e473508818384 -package-id=monad-control-1.0.0.5-553ef41eef9ee9db7562ba1fcdae5175 -package-id=monad-logger-0.3.18-cfa19466f808cd2301a3d9ca4183bf2d -package-id=mountpoints-1.0.1-d61b85de7ff398f803cc1adf6a5dcc9e -package-id=mtl-2.2.1-05005bb32df8fbad260aa2bc8c4b64aa -package-id=network-2.6.2.1-bb6bd54f10de58b0cd4c34626de36631 -package-id=network-info-0.2.0.8-e3fa5b522cbae916931d8fcf15569b79 -package-id=network-multicast-0.1.0-a584295a85c191f1d593e226c9c0d80f -package-id=network-uri-2.6.0.3-8a2133b7e7afa41ae4b0a86d7ee121b3 -package-id=old-locale-1.0.0.7-5aedb410aa2e5fddd3c57e9b4de1f46a -package-id=optparse-applicative-0.12.1.0-43df39f5b1f3f9fdbbaf3d3062ae1149 -package-id=path-pieces-0.2.1-246a7433c1509b3320d79e4c70752889 -package-id=persistent-2.2.4-64cae1089197c4e57e7fdbb16a4083d7 -package-id=persistent-sqlite-2.2-ae94427e94facaef0762e4403d25f8f1 -package-id=persistent-template-2.1.5-bd873d36704c3d2f78835bf579746493 -package-id=pretty-1.1.2.0-05f1bf2d77845aeee85db3b0e77a833b -package-id=process-1.3.0.0-549d9135ddd4843d90385e2b78241e7f -package-id=random-1.1-bf26de03a53bc91c9d53a458b43425f6 -package-id=regex-tdfa-1.2.1-528fe34045196aa9b0a215ffdd13e7a9 -package-id=resourcet-1.1.7.2-779c84438f533247b7dc02bf31c96278 -package-id=sandi-0.3.6-a3602bfefdef7094a2e0d08aaf02a9b7 -package-id=securemem-0.1.9-d5cab5cfe2930c14897cb896bf078cb9 -package-id=shakespeare-2.0.7-675e0028d50bdd99eacd4742b59af1ef -package-id=stm-2.4.4.1-b43e402fc74ce6b0320fe4217e7e432d -package-id=tasty-0.11.0.2-a93fce90c89082b2cce2ec4991535f17 -package-id=tasty-hunit-0.9.2-5074a7814a9cce3e384cb8561cfd13ee -package-id=tasty-quickcheck-0.8.4-054957dd003ecedfef813fd20b40cdca -package-id=tasty-rerun-1.1.5-d5cd405ac6c703cc4931f7a00813bd22 -package-id=template-haskell-2.10.0.0-519a3df6ca75400791d9a21bab268b67 -package-id=terminfo-0.4.0.1-ac8390bd8b2f827b0bd512cb2aadf6c3 -package-id=text-1.2.2.0-5a148cba9ba9d4d8e0c527d918b16c90 -package-id=time-1.5.0.1-f24490e32a9d627ebaed9aa51bc1b5eb -package-id=torrent-10000.0.0-6d1ad89d629a9900d6ccc154dcf455c1 -package-id=transformers-0.4.2.0-a5bbd954d1c2451a9da96a3615054cc0 -package-id=unix-2.7.1.0-7648cc70adf6627d253e291634b58aed -package-id=unix-compat-0.4.1.4-cdf42b3898250c01e079e54638785bd7 -package-id=utf8-string-1.0.1.1-5395efcd42433a5b996c60f9c6f57100 -package-id=uuid-1.3.11-b268793d557aad2f9f3fea8799062947 -package-id=wai-3.2.0-7e39626a34c9ab88db637e32da1ba59a -package-id=wai-extra-3.0.14-c3f2b1cd60aee7cbd8756fced69a4f54 -package-id=warp-3.2.2-718344c22273281f698a0d2a32e7f0fd -package-id=warp-tls-3.2.1-bad243985a313a31830e2d50614d77bf -package-id=xhtml-3000.2.1-7f8e2763621190e01e6fe1c350bff358 -package-id=yesod-1.4.2-cedfef845251005e30bdbd8881719527 -package-id=yesod-core-1.4.19-8185290d888c04461ebd5f3c76e05144 -package-id=yesod-default-1.2.0-5d724e6255914e391bee90b30a4cef13 -package-id=yesod-form-1.4.6-3e6e1831e9f056644469f9198d1dc7fb -package-id=yesod-static-1.5.0.3-ac37cb547978014a3ab32e91ad8aab2b /home/builder/git-annex/Setup.hs -o /home/builder/git-annex/.stack-work/dist/i386-linux/Cabal-1.22.5.0/setup/setup @(stack_JlzIf2rBNeuFEjNaHJwIZR:System.Process.Read src/System/Process/Read.hs:269:3)
2016-05-03 18:36:11.138194: [info] Linking /home/builder/git-annex/.stack-work/dist/i386-linux/Cabal-1.22.5.0/setup/setup ... @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Execute src/Stack/Build/Execute.hs:880:67)
2016-05-03 18:36:13.853426: [warn] /usr/bin/ld: cannot find -ltinfo @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Execute src/Stack/Build/Execute.hs:880:67)
2016-05-03 18:36:13.854342: [warn] collect2: error: ld returned 1 exit status @(stack_JlzIf2rBNeuFEjNaHJwIZR:Stack.Build.Execute src/Stack/Build/Execute.hs:880:67)

--  While building package git-annex-6.20160419 using:
      /home/builder/.stack/programs/i386-linux/ghc-7.10.3/bin/ghc --make -odir /home/builder/git-annex/.stack-work/dist/i386-linux/Cabal-1.22.5.0/setup -hidir /home/builder/git-annex/.stack-work/dist/i386-linux/Cabal-1.22.5.0/setup -i -i. -clear-package-db -global-package-db -package-db=/home/builder/.stack/snapshots/i386-linux/lts-5.5/7.10.3/pkgdb -package-db=/home/builder/git-annex/.stack-work/install/i386-linux/lts-5.5/7.10.3/pkgdb -hide-all-packages -package=Cabal-1.22.5.0 -package-id=DAV-1.2-e12e8d3db003009f6d1feb1f36bbfe0b -package-id=IfElse-0.85-3f461bc396c1fbb2fcdc31047bb7bc96 -package-id=MissingH-1.3.0.1-76f032fdac32be88feb89617737d2977 -package-id=QuickCheck-2.8.1-17e290014fbbe7f48053b070a6c014b1 -package-id=SafeSemaphore-0.10.1-7dde3e1d382a039339ad0c2acbb3e0ea -package-id=aeson-0.9.0.1-d0e79c1a9a7dbaca6353dad4ccc1ab7d -package-id=array-0.5.1.0-98220802c10d9d803be36e35c603d572 -package-id=async-2.1.0-b6f4570165c312174f1c42fdc82517b2 -package-id=aws-0.13.0-55a341c64cf6ed75fe9c1278dec86e5c -package-id=base-4.8.2.0-a3ce8575fb7e5b352e3a0df9b7b44e44 -package-id=bin-package-db-0.0.0.0-1d99a2349f9c82a6557bce029a3ad40e -package-id=binary-0.7.5.0-35c4b11f317037b03e6dcb11af8d8243 -package-id=blaze-builder-0.4.0.1-7d65b24e049c6895949b08fe1cf7a741 -package-id=bloomfilter-2.0.1.0-bc6de065d12944d1ca22c35d28faf177 -package-id=byteable-0.1.1-ffe60d77855da5db6b3e54f7e6efbee8 -package-id=bytestring-0.10.6.0-89a6fa47eb216379d389091d263e752c -package-id=case-insensitive-1.2.0.5-6669cd7a393ccedc4f66c0a01b6f0e2f -package-id=clientsession-0.9.1.1-fa943217aeadbae76f88981c0d7f3675 -package-id=concurrent-output-1.7.3-a3d27843302a2d2aa1e4e2929f2de1ee -package-id=conduit-1.2.6.2-eb5c8d398458ea720173726448d4783a -package-id=conduit-extra-1.1.10.1-e98f2ccab7522559ea21439851dd91d1 -package-id=containers-0.5.6.2-5879d666a9e12594253a40caef70c7d4 -package-id=crypto-api-0.13.2-5e5ed747d76f72ffd3e491e5e7d7d22c -package-id=cryptonite-0.10-05af7e6bb952d62159009db34feb825d -package-id=data-default-0.5.3-a34fab0e414a3e31b9dccb1774520fca -package-id=deepseq-1.4.1.1-d8d3cda9ca91dc984439215591b154d0 -package-id=directory-1.2.2.0-97fb5c811b47ae4c6359895cdbc5fc3a -package-id=disk-free-space-0.1.0.1-848e612766a388a436ef158b8e080d91 -package-id=dlist-0.7.1.2-c4ab12ed0d59ced85d141ed8ae731411 -package-id=dns-2.0.1-a4a9fb809d57869d789cab1c52822269 -package-id=edit-distance-0.2.2.1-9d3891bf039e76d5754b7861295dabda -package-id=esqueleto-2.4.3-d911e02681e12e824e8c3ba93d884dfd -package-id=exceptions-0.8.2.1-db10e976cd037dfd316f5eed5f9febfd -package-id=feed-0.3.11.1-3d9d7b05701f970d4eaca968ce9f4456 -package-id=filepath-1.4.0.0-59267d26bde9029c896503f5d82794cc -package-id=ghc-prim-0.4.0.0-bf246eb9fdda7435f0c147a313ce59fb -package-id=haskeline-0.7.2.1-7776d7bbb3d9882172f76eb6ca8d4b39 -package-id=hinotify-0.3.8.1-5acdb035193afc53f559fedf65dbfef2 -package-id=hoopl-3.10.0.2-4a6fb10ddb64ba158323bbb4495d47d6 -package-id=hpc-0.6.0.2-1661a94582f91043f10870c8c5127980 -package-id=hslogger-1.2.9-dd252cf814b41d9c7ca48db3926b6d9b -package-id=http-client-0.4.27-f8cfa1bb3afdcc3f71c47da9f79bf528 -package-id=http-conduit-2.1.8-95f5a49afe92ef5e2e38119023bff69a -package-id=http-types-0.9-820fa02c0036531a8923d39a6759b146 -package-id=integer-gmp-1.0.0.0-4ff98693d6e5d6065e60052264067c09 -package-id=json-0.9.1-cbb74883676b554cfe8e473508818384 -package-id=monad-control-1.0.0.5-553ef41eef9ee9db7562ba1fcdae5175 -package-id=monad-logger-0.3.18-cfa19466f808cd2301a3d9ca4183bf2d -package-id=mountpoints-1.0.1-d61b85de7ff398f803cc1adf6a5dcc9e -package-id=mtl-2.2.1-05005bb32df8fbad260aa2bc8c4b64aa -package-id=network-2.6.2.1-bb6bd54f10de58b0cd4c34626de36631 -package-id=network-info-0.2.0.8-e3fa5b522cbae916931d8fcf15569b79 -package-id=network-multicast-0.1.0-a584295a85c191f1d593e226c9c0d80f -package-id=network-uri-2.6.0.3-8a2133b7e7afa41ae4b0a86d7ee121b3 -package-id=old-locale-1.0.0.7-5aedb410aa2e5fddd3c57e9b4de1f46a -package-id=optparse-applicative-0.12.1.0-43df39f5b1f3f9fdbbaf3d3062ae1149 -package-id=path-pieces-0.2.1-246a7433c1509b3320d79e4c70752889 -package-id=persistent-2.2.4-64cae1089197c4e57e7fdbb16a4083d7 -package-id=persistent-sqlite-2.2-ae94427e94facaef0762e4403d25f8f1 -package-id=persistent-template-2.1.5-bd873d36704c3d2f78835bf579746493 -package-id=pretty-1.1.2.0-05f1bf2d77845aeee85db3b0e77a833b -package-id=process-1.3.0.0-549d9135ddd4843d90385e2b78241e7f -package-id=random-1.1-bf26de03a53bc91c9d53a458b43425f6 -package-id=regex-tdfa-1.2.1-528fe34045196aa9b0a215ffdd13e7a9 -package-id=resourcet-1.1.7.2-779c84438f533247b7dc02bf31c96278 -package-id=sandi-0.3.6-a3602bfefdef7094a2e0d08aaf02a9b7 -package-id=securemem-0.1.9-d5cab5cfe2930c14897cb896bf078cb9 -package-id=shakespeare-2.0.7-675e0028d50bdd99eacd4742b59af1ef -package-id=stm-2.4.4.1-b43e402fc74ce6b0320fe4217e7e432d -package-id=tasty-0.11.0.2-a93fce90c89082b2cce2ec4991535f17 -package-id=tasty-hunit-0.9.2-5074a7814a9cce3e384cb8561cfd13ee -package-id=tasty-quickcheck-0.8.4-054957dd003ecedfef813fd20b40cdca -package-id=tasty-rerun-1.1.5-d5cd405ac6c703cc4931f7a00813bd22 -package-id=template-haskell-2.10.0.0-519a3df6ca75400791d9a21bab268b67 -package-id=terminfo-0.4.0.1-ac8390bd8b2f827b0bd512cb2aadf6c3 -package-id=text-1.2.2.0-5a148cba9ba9d4d8e0c527d918b16c90 -package-id=time-1.5.0.1-f24490e32a9d627ebaed9aa51bc1b5eb -package-id=torrent-10000.0.0-6d1ad89d629a9900d6ccc154dcf455c1 -package-id=transformers-0.4.2.0-a5bbd954d1c2451a9da96a3615054cc0 -package-id=unix-2.7.1.0-7648cc70adf6627d253e291634b58aed -package-id=unix-compat-0.4.1.4-cdf42b3898250c01e079e54638785bd7 -package-id=utf8-string-1.0.1.1-5395efcd42433a5b996c60f9c6f57100 -package-id=uuid-1.3.11-b268793d557aad2f9f3fea8799062947 -package-id=wai-3.2.0-7e39626a34c9ab88db637e32da1ba59a -package-id=wai-extra-3.0.14-c3f2b1cd60aee7cbd8756fced69a4f54 -package-id=warp-3.2.2-718344c22273281f698a0d2a32e7f0fd -package-id=warp-tls-3.2.1-bad243985a313a31830e2d50614d77bf -package-id=xhtml-3000.2.1-7f8e2763621190e01e6fe1c350bff358 -package-id=yesod-1.4.2-cedfef845251005e30bdbd8881719527 -package-id=yesod-core-1.4.19-8185290d888c04461ebd5f3c76e05144 -package-id=yesod-default-1.2.0-5d724e6255914e391bee90b30a4cef13 -package-id=yesod-form-1.4.6-3e6e1831e9f056644469f9198d1dc7fb -package-id=yesod-static-1.5.0.3-ac37cb547978014a3ab32e91ad8aab2b /home/builder/git-annex/Setup.hs -o /home/builder/git-annex/.stack-work/dist/i386-linux/Cabal-1.22.5.0/setup/setup
    Process exited with code: ExitFailure 1
joeyh commented 8 years ago

Seems like the explicit-setup-deps have somehow gotten applied to building dependencies of my package, and not only to the package itself.

mgsloan commented 8 years ago

The issue here is that we are directly invoking ghc to build Setup.hs. This usually works fine with default settings and using whatever packages are installed. explicit-setup-deps locks down the dependencies used, but does not pass any additional flags to ghc. We should probably re-use our stack ghci code, which determines the ghc flags to use to build a package, and when explicit-setup-deps is on, and pass those arguments.

It seems a little weird to use all the library settings for building the Setup.hs, but that seems like the most reasonable thing to do. I'm not sure how the new cabal custom-setup stuff works, but perhaps it treats the Setup.hs as another component. In that case, we could do something far more principled for this.

joeyh commented 8 years ago

The new cabal custom-setup seems the way to go. I have added a setup-depends field for my package with the setup's dependencies, and if stack gets support for that I shouldn't need to worry about explicit-setup-deps, I hope.