commercialhaskell / stack

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

Stack fails to unset a flag from a build-plan on OS X #2968

Closed dredozubov closed 7 years ago

dredozubov commented 7 years ago

I'm using stack 1.3.2 + resolver lts-6.25. HsOpenSSL fails to build on OS X, although the flag that's necessary to build it successfully is present in a build plan. It builds correctly on different linux machines. Relevant part of ~/.stack/build-plan/lts-6.25.yaml:

  HsOpenSSL:
    users:
    - cql-io
    - happstack-server-tls
    - haxr
    - http-client-openssl
    - http-streams
    - moesocks
    - openssl-streams
    - ses-html
    - soap-openssl
    - stripe-http-streams
    constraints:
      benches: expect-success
      library-profiling: true
      flags:
        fast-bignum: false
      build-benchmarks: true
      skip-build: false
      tests: do-not-build
      haddocks: expect-success
      configure-args: []
      version-range: ! '>=0.11.3.2 && <0.12'
    version: '0.11.3.2'
    cabal-file-info:
      size: 5356
      hashes:
        MD5: 9a66bcab2a8d63fc6d48a60d058afbd6
        Skein512_512: f513da36b3313655c867d9605ea1552ddf2c83c3e0975fc60d03d840af6fb6d54b60f0f4c8a5c1945bfaca06bbb189683bf32e38e7125feb6f12e26b3ceeb282
        SHA1: 7d1d09fadd0a568ee7832d6e355ad14a004880c2
        SHA512: f1eb5950f09644e7b4a96dcd3db4dac7664407777f6ae9dab658af8fee6bbce090f38a8f903c4106cd68342a7918f1e10236dbf3026bc3850136db9b7051fb52
        SHA256: 660300185052238384d0f1eeb08c6bdede7aa040a670975557f0fec9bfe629cf
        GitSHA1: f1b97abfcc181d1ceca63524e5e712da8c4a0b23
    github-pings:
    - vshabanov
    description:
      cabal-version: '1.12'
      modules:
      - OpenSSL
      - OpenSSL.BN
      - OpenSSL.Cipher
      - OpenSSL.DER
      - OpenSSL.DH
      - OpenSSL.DSA
      - OpenSSL.EVP.Base64
      - OpenSSL.EVP.Cipher
      - OpenSSL.EVP.Digest
      - OpenSSL.EVP.Internal
      - OpenSSL.EVP.Open
      - OpenSSL.EVP.PKey
      - OpenSSL.EVP.Seal
      - OpenSSL.EVP.Sign
      - OpenSSL.EVP.Verify
      - OpenSSL.PEM
      - OpenSSL.PKCS7
      - OpenSSL.RSA
      - OpenSSL.Random
      - OpenSSL.Session
      - OpenSSL.X509
      - OpenSSL.X509.Request
      - OpenSSL.X509.Revocation
      - OpenSSL.X509.Store
      provided-exes: []
      packages:
        bytestring:
          components:
          - library
          range: ! '>=0.9 && <0.11'
        base:
          components:
          - library
          range: ! '>=4.4 && <5'
        time:
          components:
          - library
          range: ! '>=1.5 && <1.7'
        network:
          components:
          - library
          range: ! '>=2.1 && <2.7'
      tools: {}

Software versions and stack install HsOpenSSL -v output:

 % stack --version
Version 1.3.2 x86_64 hpack-0.15.0

% cat stack.yaml | grep resolver
resolver: lts-6.25

% uname -a
Darwin haven 15.6.0 Darwin Kernel Version 15.6.0: Thu Sep  1 15:01:16 PDT 2016; root:xnu-3248.60.11~2/RELEASE_X86_64 x86_64 i386 MacBookPro11,1 Darwin

% stack install --dependencies-only --flag HsOpenSSL:homebrew-openssl HsOpenSSL -v
Version 1.3.2 x86_64 hpack-0.15.0
2017-02-02 12:07:46.953009: [debug] Checking for project config at: /Users/dr/workspace/contractor/stack.yaml
@(Stack/Config.hs:863:9)
2017-02-02 12:07:46.953973: [debug] Loading project config file stack.yaml
@(Stack/Config.hs:881:13)
2017-02-02 12:07:46.958544: [debug] Trying to decode /Users/dr/.stack/build-plan-cache/x86_64-osx/lts-6.25.cache
@(Data/Store/VersionTagged.hs:68:5)
2017-02-02 12:07:46.977782: [debug] Success decoding /Users/dr/.stack/build-plan-cache/x86_64-osx/lts-6.25.cache
@(Data/Store/VersionTagged.hs:72:13)
2017-02-02 12:07:46.981993: [debug] Using standard GHC build
@(Stack/Setup.hs:597:9)
2017-02-02 12:07:46.982640: [debug] Getting global package database location
@(Stack/GhcPkg.hs:55:5)
2017-02-02 12:07:46.983010: [debug] Run process: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --no-user-package-db list --global
@(System/Process/Read.hs:306:3)
2017-02-02 12:07:46.983223: [debug] Getting Cabal package version
@(Stack/GhcPkg.hs:189:5)
2017-02-02 12:07:46.983879: [debug] Run process: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --no-user-package-db field --simple-output Cabal version
@(System/Process/Read.hs:306:3)
2017-02-02 12:07:46.984064: [debug] Asking GHC for its version
@(Stack/Setup/Installed.hs:103:13)
2017-02-02 12:07:46.984311: [debug] Run process: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc --numeric-version
@(System/Process/Read.hs:306:3)
2017-02-02 12:07:47.021878: [debug] Process finished in 38ms: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --no-user-package-db list --global
@(System/Process/Read.hs:306:3)
2017-02-02 12:07:47.022174: [debug] Process finished in 38ms: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --no-user-package-db field --simple-output Cabal version
@(System/Process/Read.hs:306:3)
2017-02-02 12:07:47.046737: [debug] Process finished in 62ms: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc --numeric-version
@(System/Process/Read.hs:306:3)
2017-02-02 12:07:47.046932: [debug] Resolving package entries
@(Stack/Setup.hs:252:5)
2017-02-02 12:07:47.047572: [debug] Starting to execute command inside EnvConfig
@(Stack/Runners.hs:163:18)
2017-02-02 12:07:47.047708: [debug] Parsing the cabal files of the local packages
@(Stack/Build/Source.hs:298:5)
2017-02-02 12:07:47.146043: [debug] Parsing the targets
@(Stack/Build/Source.hs:235:5)
2017-02-02 12:07:47.146291: [warn] - Implicitly adding HsOpenSSL to extra-deps based on command line flag
@(Stack/Build/Source.hs:287:17)
2017-02-02 12:07:47.146519: [debug] Exception ignored when attempting to load /Users/dr/workspace/contractor/travel246/admin/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/dr/workspace/contractor/travel246/admin/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2017-02-02 12:07:47.146885: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/travel246/admin/admin.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.180484: [debug] Finished in 33ms: getPackageFiles /Users/dr/workspace/contractor/travel246/admin/admin.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.184696: [debug] Exception ignored when attempting to load /Users/dr/workspace/contractor/platform/amadeus/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/dr/workspace/contractor/platform/amadeus/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2017-02-02 12:07:47.185023: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/platform/amadeus/amadeus.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.228135: [debug] Finished in 42ms: getPackageFiles /Users/dr/workspace/contractor/platform/amadeus/amadeus.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.231982: [debug] Exception ignored when attempting to load /Users/dr/workspace/contractor/b2b/api/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/dr/workspace/contractor/b2b/api/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2017-02-02 12:07:47.232266: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/b2b/api/api.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.238338: [debug] Finished in 5ms: getPackageFiles /Users/dr/workspace/contractor/b2b/api/api.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.239200: [debug] Exception ignored when attempting to load /Users/dr/workspace/contractor/platform/api-platform/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/dr/workspace/contractor/platform/api-platform/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2017-02-02 12:07:47.239491: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/platform/api-platform/api-platform.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.249059: [debug] Finished in 9ms: getPackageFiles /Users/dr/workspace/contractor/platform/api-platform/api-platform.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.250595: [debug] Exception ignored when attempting to load /Users/dr/workspace/contractor/atc-shopper/atc-shopper/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/dr/workspace/contractor/atc-shopper/atc-shopper/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2017-02-02 12:07:47.250934: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/atc-shopper/atc-shopper/atc-shopper.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.273108: [debug] Finished in 22ms: getPackageFiles /Users/dr/workspace/contractor/atc-shopper/atc-shopper/atc-shopper.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.274828: [debug] Exception ignored when attempting to load /Users/dr/workspace/contractor/platform/authorizenet/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/dr/workspace/contractor/platform/authorizenet/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2017-02-02 12:07:47.275132: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/platform/authorizenet/authorizenet.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.312234: [debug] Finished in 37ms: getPackageFiles /Users/dr/workspace/contractor/platform/authorizenet/authorizenet.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.314925: [debug] Exception ignored when attempting to load /Users/dr/workspace/contractor/b2b/backend/backend/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/dr/workspace/contractor/b2b/backend/backend/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2017-02-02 12:07:47.315233: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/b2b/backend/backend/backend.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.330563: [debug] Finished in 15ms: getPackageFiles /Users/dr/workspace/contractor/b2b/backend/backend/backend.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.336512: [debug] Exception ignored when attempting to load /Users/dr/workspace/contractor/b2b/backend/backend-bin/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/dr/workspace/contractor/b2b/backend/backend-bin/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2017-02-02 12:07:47.337218: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/b2b/backend/backend-bin/backend-bin.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.339756: [debug] Finished in 2ms: getPackageFiles /Users/dr/workspace/contractor/b2b/backend/backend-bin/backend-bin.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.340358: [debug] Exception ignored when attempting to load /Users/dr/workspace/contractor/platform/common/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/dr/workspace/contractor/platform/common/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2017-02-02 12:07:47.340599: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/platform/common/common.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.366688: [debug] Finished in 25ms: getPackageFiles /Users/dr/workspace/contractor/platform/common/common.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.369523: [debug] Exception ignored when attempting to load /Users/dr/workspace/contractor/platform/lens-time/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/dr/workspace/contractor/platform/lens-time/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2017-02-02 12:07:47.369764: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/platform/lens-time/lens-time.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.370306: [debug] Finished in 0ms: getPackageFiles /Users/dr/workspace/contractor/platform/lens-time/lens-time.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.370661: [debug] Exception ignored when attempting to load /Users/dr/workspace/contractor/platform/platform/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/dr/workspace/contractor/platform/platform/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2017-02-02 12:07:47.370994: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/platform/platform/platform.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.513586: [debug] Finished in 142ms: getPackageFiles /Users/dr/workspace/contractor/platform/platform/platform.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.527685: [debug] Exception ignored when attempting to load /Users/dr/workspace/contractor/platform/sig/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/dr/workspace/contractor/platform/sig/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2017-02-02 12:07:47.527998: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/platform/sig/sig.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.536865: [debug] Finished in 8ms: getPackageFiles /Users/dr/workspace/contractor/platform/sig/sig.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.538343: [debug] Exception ignored when attempting to load /Users/dr/workspace/contractor/tinkoff-travel/admin/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/dr/workspace/contractor/tinkoff-travel/admin/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2017-02-02 12:07:47.538683: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/tinkoff-travel/admin/tinkoff-admin.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.564286: [debug] Finished in 25ms: getPackageFiles /Users/dr/workspace/contractor/tinkoff-travel/admin/tinkoff-admin.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.566566: [debug] Exception ignored when attempting to load /Users/dr/workspace/contractor/tinkoff-travel/tinkoff-travel/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/dr/workspace/contractor/tinkoff-travel/tinkoff-travel/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2017-02-02 12:07:47.566933: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/tinkoff-travel/tinkoff-travel/tinkoff-travel.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.629104: [debug] Finished in 61ms: getPackageFiles /Users/dr/workspace/contractor/tinkoff-travel/tinkoff-travel/tinkoff-travel.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.639181: [debug] Exception ignored when attempting to load /Users/dr/workspace/contractor/travel246/travel246/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/dr/workspace/contractor/travel246/travel246/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2017-02-02 12:07:47.640232: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/travel246/travel246/travel246.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.740290: [debug] Finished in 99ms: getPackageFiles /Users/dr/workspace/contractor/travel246/travel246/travel246.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.755386: [debug] Exception ignored when attempting to load /Users/dr/workspace/contractor/travel246/twitter-conduit/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/dr/workspace/contractor/travel246/twitter-conduit/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2017-02-02 12:07:47.755774: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/travel246/twitter-conduit/twitter-conduit.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.768226: [debug] Finished in 12ms: getPackageFiles /Users/dr/workspace/contractor/travel246/twitter-conduit/twitter-conduit.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.771386: [debug] Exception ignored when attempting to load /Users/dr/workspace/contractor/travel246/twitter-types/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/dr/workspace/contractor/travel246/twitter-types/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2017-02-02 12:07:47.771762: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/travel246/twitter-types/twitter-types.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.774550: [debug] Finished in 2ms: getPackageFiles /Users/dr/workspace/contractor/travel246/twitter-types/twitter-types.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.776270: [debug] Exception ignored when attempting to load /Users/dr/workspace/contractor/.stack-work/downloaded/H-rYr3rJWgIX/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/dr/workspace/contractor/.stack-work/downloaded/H-rYr3rJWgIX/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2017-02-02 12:07:47.776574: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/.stack-work/downloaded/H-rYr3rJWgIX/xml-isogen.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.783854: [debug] Finished in 7ms: getPackageFiles /Users/dr/workspace/contractor/.stack-work/downloaded/H-rYr3rJWgIX/xml-isogen.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.786250: [debug] Exception ignored when attempting to load /Users/dr/workspace/contractor/b2b/backend/yesod-backend/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/dr/workspace/contractor/b2b/backend/yesod-backend/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2017-02-02 12:07:47.787027: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/b2b/backend/yesod-backend/yesod-backend.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.806676: [debug] Finished in 19ms: getPackageFiles /Users/dr/workspace/contractor/b2b/backend/yesod-backend/yesod-backend.cabal
@(Stack/Package.hs:250:21)
2017-02-02 12:07:47.828932: [debug] Finding out which packages are already installed
@(Stack/Build/Installed.hs:68:5)
2017-02-02 12:07:47.830762: [debug] Run process: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --global --no-user-package-db dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-02-02 12:07:47.890299: [debug] Process finished in 59ms: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --global --no-user-package-db dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-02-02 12:07:47.903321: [debug] Ignoring package haskeline due to wanting version 0.7.2.3 instead of 0.7.2.1
@(Stack/Build/Installed.hs:191:5)
2017-02-02 12:07:47.903465: [debug] Ignoring package terminfo due to wanting version 0.4.0.2 instead of 0.4.0.1
@(Stack/Build/Installed.hs:191:5)
2017-02-02 12:07:47.903575: [debug] Ignoring package Cabal due to wanting version 1.22.8.0 instead of 1.22.5.0
@(Stack/Build/Installed.hs:191:5)
2017-02-02 12:07:47.903788: [debug] Run process: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --user --no-user-package-db --package-db /Users/dr/.stack/snapshots/x86_64-osx/lts-6.25/7.10.3/pkgdb dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-02-02 12:07:48.092403: [debug] Process finished in 188ms: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --user --no-user-package-db --package-db /Users/dr/.stack/snapshots/x86_64-osx/lts-6.25/7.10.3/pkgdb dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-02-02 12:07:48.095347: [debug] Run process: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --user --no-user-package-db --package-db /Users/dr/workspace/contractor/.stack-work/install/x86_64-osx/lts-6.25/7.10.3/pkgdb dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-02-02 12:07:48.132978: [debug] Process finished in 37ms: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --user --no-user-package-db --package-db /Users/dr/workspace/contractor/.stack-work/install/x86_64-osx/lts-6.25/7.10.3/pkgdb dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-02-02 12:07:48.139608: [debug] Trying to decode /Users/dr/.stack/indices/Hackage/00-index.cache
@(Data/Store/VersionTagged.hs:68:5)
2017-02-02 12:07:48.283002: [debug] Success decoding /Users/dr/.stack/indices/Hackage/00-index.cache
@(Data/Store/VersionTagged.hs:72:13)
2017-02-02 12:07:48.421536: [debug] Constructing the build plan
@(Stack/Build/ConstructPlan.hs:159:5)
2017-02-02 12:07:48.428387: [error]
Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for HsOpenSSL-0.11.3.2(+homebrew-openssl):
    integer-gmp-1.0.0.0 must match >=0.2 && <1 (latest applicable is 0.5.1.0)

@(Stack/Build/ConstructPlan.hs:198:13)
Plan construction failed.

which is exactly the problem that occurs when flag fast-bignum is set on HsOpenSSL:

   if flag(fast-bignum)
        CPP-Options: -DFAST_BIGNUM
        if impl(ghc >= 6.11)
            -- TODO: integer-gmp >= 1 is not supported yet.
            -- https://github.com/phonohawk/HsOpenSSL/issues/36
            Build-Depends: integer-gmp >= 0.2 && < 1
            -- Doesn't work since GHC 7.10.1 (integer-gmp-1.0.0.0)
        else
            Build-Depends: ghc-prim, integer

The only way out i found is adding HsOpenSSL to extra-deps and setting this in stack.yaml:

  HsOpenSSL:
    fast-bignum: false
decentral1se commented 7 years ago

2017-02-02 12:07:47.146291: [warn] - Implicitly adding HsOpenSSL to extra-deps based on command line flag

Just gave a brief glance, but you're aware of this line in the logs?

dredozubov commented 7 years ago

@lwm good catch, this happened because i tried to demonstrate the problem after finding a way around it! I can still reproduce it without adding HsOpenSSL to the extra-dep list:

% stack install --flag HsOpenSSL:homebrew-openssl HsOpenSSL -v
Version 1.3.2 x86_64 hpack-0.15.0
2017-02-02 19:48:25.862562: [debug] Checking for project config at: /Users/dr/workspace/contractor/stack.yaml
@(Stack/Config.hs:863:9)
2017-02-02 19:48:25.863988: [debug] Loading project config file stack.yaml
@(Stack/Config.hs:881:13)
2017-02-02 19:48:25.866567: [debug] Trying to decode /Users/dr/.stack/build-plan-cache/x86_64-osx/lts-6.25.cache
@(Data/Store/VersionTagged.hs:68:5)
2017-02-02 19:48:25.881261: [debug] Success decoding /Users/dr/.stack/build-plan-cache/x86_64-osx/lts-6.25.cache
@(Data/Store/VersionTagged.hs:72:13)
2017-02-02 19:48:25.885936: [debug] Using standard GHC build
@(Stack/Setup.hs:597:9)
2017-02-02 19:48:25.886685: [debug] Getting global package database location
@(Stack/GhcPkg.hs:55:5)
2017-02-02 19:48:25.887163: [debug] Run process: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --no-user-package-db list --global
@(System/Process/Read.hs:306:3)
2017-02-02 19:48:25.887440: [debug] Asking GHC for its version
@(Stack/Setup/Installed.hs:103:13)
2017-02-02 19:48:25.887643: [debug] Run process: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc --numeric-version
@(System/Process/Read.hs:306:3)
2017-02-02 19:48:25.896699: [debug] Getting Cabal package version
@(Stack/GhcPkg.hs:189:5)
2017-02-02 19:48:25.896848: [debug] Run process: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --no-user-package-db field --simple-output Cabal version
@(System/Process/Read.hs:306:3)
2017-02-02 19:48:25.945496: [debug] Process finished in 58ms: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --no-user-package-db list --global
@(System/Process/Read.hs:306:3)
2017-02-02 19:48:25.947940: [debug] Process finished in 44ms: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --no-user-package-db field --simple-output Cabal version
@(System/Process/Read.hs:306:3)
2017-02-02 19:48:25.975676: [debug] Process finished in 79ms: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc --numeric-version
@(System/Process/Read.hs:306:3)
2017-02-02 19:48:25.975848: [debug] Resolving package entries
@(Stack/Setup.hs:252:5)
2017-02-02 19:48:25.976469: [debug] Starting to execute command inside EnvConfig
@(Stack/Runners.hs:163:18)
2017-02-02 19:48:25.976594: [debug] Parsing the cabal files of the local packages
@(Stack/Build/Source.hs:298:5)
2017-02-02 19:48:26.083836: [debug] Parsing the targets
@(Stack/Build/Source.hs:235:5)
2017-02-02 19:48:26.084115: [warn] - Implicitly adding HsOpenSSL to extra-deps based on command line flag
@(Stack/Build/Source.hs:287:17)
2017-02-02 19:48:26.085098: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/travel246/admin/admin.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.138666: [debug] Finished in 53ms: getPackageFiles /Users/dr/workspace/contractor/travel246/admin/admin.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.145577: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/platform/amadeus/amadeus.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.230719: [debug] Finished in 84ms: getPackageFiles /Users/dr/workspace/contractor/platform/amadeus/amadeus.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.233071: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/b2b/api/api.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.252507: [debug] Finished in 19ms: getPackageFiles /Users/dr/workspace/contractor/b2b/api/api.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.253306: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/platform/api-platform/api-platform.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.263251: [debug] Finished in 9ms: getPackageFiles /Users/dr/workspace/contractor/platform/api-platform/api-platform.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.264214: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/atc-shopper/atc-shopper/atc-shopper.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.278611: [debug] Finished in 14ms: getPackageFiles /Users/dr/workspace/contractor/atc-shopper/atc-shopper/atc-shopper.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.280954: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/platform/authorizenet/authorizenet.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.337609: [debug] Finished in 56ms: getPackageFiles /Users/dr/workspace/contractor/platform/authorizenet/authorizenet.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.339535: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/b2b/backend/backend/backend.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.380500: [debug] Finished in 40ms: getPackageFiles /Users/dr/workspace/contractor/b2b/backend/backend/backend.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.382711: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/b2b/backend/backend-bin/backend-bin.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.384723: [debug] Finished in 1ms: getPackageFiles /Users/dr/workspace/contractor/b2b/backend/backend-bin/backend-bin.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.385323: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/platform/common/common.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.442678: [debug] Finished in 57ms: getPackageFiles /Users/dr/workspace/contractor/platform/common/common.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.444187: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/platform/lens-time/lens-time.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.444833: [debug] Finished in 0ms: getPackageFiles /Users/dr/workspace/contractor/platform/lens-time/lens-time.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.446553: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/platform/platform/platform.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.657521: [debug] Finished in 210ms: getPackageFiles /Users/dr/workspace/contractor/platform/platform/platform.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.667341: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/platform/sig/sig.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.683554: [debug] Finished in 16ms: getPackageFiles /Users/dr/workspace/contractor/platform/sig/sig.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.684406: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/tinkoff-travel/admin/tinkoff-admin.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.727192: [debug] Finished in 42ms: getPackageFiles /Users/dr/workspace/contractor/tinkoff-travel/admin/tinkoff-admin.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.733417: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/tinkoff-travel/tinkoff-travel/tinkoff-travel.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.816529: [debug] Finished in 82ms: getPackageFiles /Users/dr/workspace/contractor/tinkoff-travel/tinkoff-travel/tinkoff-travel.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:26.824891: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/travel246/travel246/travel246.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:27.008689: [debug] Finished in 183ms: getPackageFiles /Users/dr/workspace/contractor/travel246/travel246/travel246.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:27.016170: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/travel246/twitter-conduit/twitter-conduit.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:27.029212: [debug] Finished in 12ms: getPackageFiles /Users/dr/workspace/contractor/travel246/twitter-conduit/twitter-conduit.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:27.031427: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/travel246/twitter-types/twitter-types.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:27.037330: [debug] Finished in 5ms: getPackageFiles /Users/dr/workspace/contractor/travel246/twitter-types/twitter-types.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:27.038135: [debug] Exception ignored when attempting to load /Users/dr/workspace/contractor/.stack-work/downloaded/H-rYr3rJWgIX/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/dr/workspace/contractor/.stack-work/downloaded/H-rYr3rJWgIX/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2017-02-02 19:48:27.038525: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/.stack-work/downloaded/H-rYr3rJWgIX/xml-isogen.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:27.042015: [debug] Finished in 3ms: getPackageFiles /Users/dr/workspace/contractor/.stack-work/downloaded/H-rYr3rJWgIX/xml-isogen.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:27.049957: [debug] Start: getPackageFiles /Users/dr/workspace/contractor/b2b/backend/yesod-backend/yesod-backend.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:27.086861: [debug] Finished in 36ms: getPackageFiles /Users/dr/workspace/contractor/b2b/backend/yesod-backend/yesod-backend.cabal
@(Stack/Package.hs:250:21)
2017-02-02 19:48:27.093903: [debug] Finding out which packages are already installed
@(Stack/Build/Installed.hs:68:5)
2017-02-02 19:48:27.094393: [debug] Run process: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --global --no-user-package-db dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-02-02 19:48:27.150758: [debug] Process finished in 56ms: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --global --no-user-package-db dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-02-02 19:48:27.165085: [debug] Ignoring package haskeline due to wanting version 0.7.2.3 instead of 0.7.2.1
@(Stack/Build/Installed.hs:191:5)
2017-02-02 19:48:27.165206: [debug] Ignoring package terminfo due to wanting version 0.4.0.2 instead of 0.4.0.1
@(Stack/Build/Installed.hs:191:5)
2017-02-02 19:48:27.165296: [debug] Ignoring package Cabal due to wanting version 1.22.8.0 instead of 1.22.5.0
@(Stack/Build/Installed.hs:191:5)
2017-02-02 19:48:27.165561: [debug] Run process: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --user --no-user-package-db --package-db /Users/dr/.stack/snapshots/x86_64-osx/lts-6.25/7.10.3/pkgdb dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-02-02 19:48:27.417177: [debug] Process finished in 251ms: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --user --no-user-package-db --package-db /Users/dr/.stack/snapshots/x86_64-osx/lts-6.25/7.10.3/pkgdb dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-02-02 19:48:27.420159: [debug] Run process: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --user --no-user-package-db --package-db /Users/dr/workspace/contractor/.stack-work/install/x86_64-osx/lts-6.25/7.10.3/pkgdb dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-02-02 19:48:27.462598: [debug] Process finished in 42ms: /Users/dr/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --user --no-user-package-db --package-db /Users/dr/workspace/contractor/.stack-work/install/x86_64-osx/lts-6.25/7.10.3/pkgdb dump --expand-pkgroot
@(System/Process/Read.hs:306:3)
2017-02-02 19:48:27.472931: [debug] Trying to decode /Users/dr/.stack/indices/Hackage/00-index.cache
@(Data/Store/VersionTagged.hs:68:5)
2017-02-02 19:48:27.616789: [debug] Success decoding /Users/dr/.stack/indices/Hackage/00-index.cache
@(Data/Store/VersionTagged.hs:72:13)
2017-02-02 19:48:27.778644: [debug] Constructing the build plan
@(Stack/Build/ConstructPlan.hs:159:5)
2017-02-02 19:48:27.785917: [error]
Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for HsOpenSSL-0.11.3.2(+homebrew-openssl):
    integer-gmp-1.0.0.0 must match >=0.2 && <1 (latest applicable is 0.5.1.0)

@(Stack/Build/ConstructPlan.hs:198:13)
decentral1se commented 7 years ago

without adding HsOpenSSL to the extra-dep list

Isn't it the case that Stack is adding it for you because of HsOpenSSL:homebrew-openssl?

dredozubov commented 7 years ago

@lwm i'm now sure how it works internally when i explicitly pass the flag for HsOpenSSL, but this way i don't see the line you've mentioned above ([warn] - Implicitly adding HsOpenSSL to extra-deps based on command line flag)

mgsloan commented 7 years ago

This is a potentially confusing aspect of flags. If you specify any flags for a snapshot package, it does not use any of the flags from the build-plan.