commercialhaskell / stack

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

Ambiguous occurrence ‘defaultTimeLocale’ when building stack from hackage #255

Closed cdepillabout closed 9 years ago

cdepillabout commented 9 years ago

When trying to instal stack in a sandbox, I get the following error:

[19 of 45] Compiling Stack.Types.StackT ( src/Stack/Types/StackT.hs, dist/dist-sandbox-9e149746/build/Stack/Types/StackT.o )

src/Stack/Types/StackT.hs:140:43:
    Ambiguous occurrence ‘defaultTimeLocale’
    It could refer to either ‘Data.Time.defaultTimeLocale’,
                             imported from ‘Data.Time’ at src/Stack/Types/StackT.hs:33:1-26
                             (and originally defined in ‘time-1.5.0.1:Data.Time.Format.Locale’)
                          or ‘System.Locale.defaultTimeLocale’,
                             imported from ‘System.Locale’ at src/Stack/Types/StackT.hs:45:1-30

GHC, cabal-install, etc. versions are below:

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.10.1
$ cabal --version
cabal-install version 1.22.3.0
using version 1.22.2.0 of the Cabal library
$ alex --version
Alex version 3.1.3, (c) 2003 Chris Dornan and Simon Marlow
$ happy --version
Happy Version 1.19.3 Copyright (c) 1993-1996 Andy Gill, Simon Marlow (c) 1997-2005 Simon Marlow

The following is the full output of cabal install:

$ cabal sandbox init
$ cabal install -j stack
Resolving dependencies...
Notice: installing into a sandbox located at
/home/illabout/filesystem/stack/.cabal-sandbox
Downloading auto-update-0.1.2.1...
Configuring ansi-terminal-0.6.2.1...
Downloading base-orphans-0.3.2...
Configuring byteable-0.1.1...
Downloading bytestring-builder-0.10.6.0.0...
Downloading gitrev-1.0.0...
Downloading memory-0.7...
Downloading monad-loops-0.4.2.1...
Downloading mmorph-1.0.4...
Downloading network-2.6.2.0...
Downloading safe-0.3.9...
Downloading syb-0.5.1...
Downloading tar-0.4.1.0...
Downloading text-1.2.1.1...
Building byteable-0.1.1...
Building ansi-terminal-0.6.2.1...
Downloading zlib-0.6.1.1...
Configuring base64-bytestring-1.0.0.1...
Installed byteable-0.1.1
Building base64-bytestring-1.0.0.1...
Installed ansi-terminal-0.6.2.1
Installed base64-bytestring-1.0.0.1
Configuring data-default-class-0.0.1...
Configuring cereal-0.4.1.1...
Building cereal-0.4.1.1...
Building data-default-class-0.0.1...
Installed data-default-class-0.0.1
Configuring dlist-0.7.1.1...
Building dlist-0.7.1.1...
Configuring hourglass-0.2.9...
Installed dlist-0.7.1.1
Building hourglass-0.2.9...
Configuring mtl-2.2.1...
Installed cereal-0.4.1.1
Building mtl-2.2.1...
Configuring nats-1...
Installed mtl-2.2.1
Building nats-1...
Configuring old-locale-1.0.0.7...
Installed hourglass-0.2.9
Configuring primitive-0.6...
Installed nats-1
Building old-locale-1.0.0.7...
Building primitive-0.6...
Configuring prelude-extras-0.4...
Installed old-locale-1.0.0.7
Building prelude-extras-0.4...
Configuring random-1.1...
Installed primitive-0.6
Configuring base-orphans-0.3.2...
Installed prelude-extras-0.4
Building random-1.1...
Building base-orphans-0.3.2...
Configuring auto-update-0.1.2.1...
Installed base-orphans-0.3.2
Building auto-update-0.1.2.1...
Configuring silently-1.2.4.1...
Installed auto-update-0.1.2.1
Building silently-1.2.4.1...
Configuring split-0.2.2...
Installed silently-1.2.4.1
Building split-0.2.2...
Configuring stm-2.4.4...
Installed random-1.1
Building stm-2.4.4...
Configuring transformers-compat-0.4.0.4...
Installed split-0.2.2
Building transformers-compat-0.4.0.4...
Configuring tagged-0.8.0.1...
Installed stm-2.4.4
Downloading stm-chans-3.0.0.4...
Configuring gitrev-1.0.0...
Installed transformers-compat-0.4.0.4
Downloading MonadRandom-0.4...
Building tagged-0.8.0.1...
Building gitrev-1.0.0...
Configuring bytestring-builder-0.10.6.0.0...
Installed gitrev-1.0.0
Building bytestring-builder-0.10.6.0.0...
Configuring monad-loops-0.4.2.1...
Installed tagged-0.8.0.1
Configuring memory-0.7...
Installed bytestring-builder-0.10.6.0.0
Building monad-loops-0.4.2.1...
Building memory-0.7...
Configuring mmorph-1.0.4...
Installed monad-loops-0.4.2.1
Building mmorph-1.0.4...
Configuring safe-0.3.9...
Installed mmorph-1.0.4
Building safe-0.3.9...
Configuring network-2.6.2.0...
Installed memory-0.7
Downloading securemem-0.1.9...
Configuring syb-0.5.1...
Installed safe-0.3.9
Building syb-0.5.1...
tConfiguring tar-0.4.1.0...
Installed syb-0.5.1
Building tar-0.4.1.0...
Building network-2.6.2.0...
Configuring text-1.2.1.1...
Installed tar-0.4.1.0
Building text-1.2.1.1...
Configuring zlib-0.6.1.1...
Installed network-2.6.2.0
Building zlib-0.6.1.1...
Configuring cryptohash-0.11.6...
Installed zlib-0.6.1.1
Building cryptohash-0.11.6...
Configuring ansi-wl-pprint-0.6.7.2...
Installed cryptohash-0.11.6
Building ansi-wl-pprint-0.6.7.2...
Installed ansi-wl-pprint-0.6.7.2
Configuring pem-0.2.2...
Building pem-0.2.2...
Configuring asn1-types-0.3.0...
Installed pem-0.2.2
Building asn1-types-0.3.0...
Installed asn1-types-0.3.0
Configuring StateVar-1.1.0.0...
Building StateVar-1.1.0.0...
Configuring vector-0.10.12.3...
Installed StateVar-1.1.0.0
Building vector-0.10.12.3...
Configuring async-2.0.2...
Installed text-1.2.1.1
Downloading blaze-builder-0.4.0.1...
Downloading fast-logger-2.3.1...
Downloading path-pieces-0.2.0...
Building async-2.0.2...
Configuring exceptions-0.8.0.2...
Installed async-2.0.2
Building exceptions-0.8.0.2...
Configuring transformers-base-0.4.4...
Installed exceptions-0.8.0.2
Downloading path-0.5.0...
Building transformers-base-0.4.4...
Configuring stm-chans-3.0.0.4...
Installed transformers-base-0.4.4
Building stm-chans-3.0.0.4...
Configuring MonadRandom-0.4...
Installed stm-chans-3.0.0.4
Building MonadRandom-0.4...
Configuring securemem-0.1.9...
Installed MonadRandom-0.4
Building securemem-0.1.9...
Configuring distributive-0.4.4...
Installed securemem-0.1.9
Building distributive-0.4.4...
Configuring socks-0.5.4...
Installed vector-0.10.12.3
Downloading vector-binary-instances-0.2.1.0...
Building socks-0.5.4...
Installed distributive-0.4.4
Configuring optparse-applicative-0.11.0.2...
Building optparse-applicative-0.11.0.2...
Installed socks-0.5.4
Configuring asn1-encoding-0.9.0...
Building asn1-encoding-0.9.0...
Configuring mime-types-0.1.0.6...
Installed optparse-applicative-0.11.0.2
Building mime-types-0.1.0.6...
Configuring hashable-1.2.3.2...
Installed asn1-encoding-0.9.0
Building hashable-1.2.3.2...
Configuring parsec-3.1.9...
Installed hashable-1.2.3.2
Building parsec-3.1.9...
Configuring blaze-builder-0.4.0.1...
Installed mime-types-0.1.0.6
Building blaze-builder-0.4.0.1...
Configuring fast-logger-2.3.1...
Installed blaze-builder-0.4.0.1
Downloading blaze-markup-0.7.0.2...
Downloading streaming-commons-0.1.12.1...
Building fast-logger-2.3.1...
Configuring temporary-1.2.0.3...
Installed parsec-3.1.9
Configuring path-0.5.0...
Installed fast-logger-2.3.1
Building temporary-1.2.0.3...
Building path-0.5.0...
Configuring path-pieces-0.2.0...
Installed temporary-1.2.0.3
Building path-pieces-0.2.0...
Configuring monad-control-1.0.0.4...
Installed path-0.5.0
Building monad-control-1.0.0.4...
Configuring vector-binary-instances-0.2.1.0...
Installed path-pieces-0.2.0
Configuring crypto-cipher-types-0.0.9...
Installed monad-control-1.0.0.4
Downloading lifted-base-0.2.3.6...
Downloading resource-pool-0.2.3.2...
Building vector-binary-instances-0.2.1.0...
Building crypto-cipher-types-0.0.9...
Configuring crypto-random-0.0.9...
Installed vector-binary-instances-0.2.1.0
Installed crypto-cipher-types-0.0.9
Building crypto-random-0.0.9...
Configuring asn1-parse-0.9.1...
Building asn1-parse-0.9.1...
Configuring crypto-pubkey-types-0.4.3...
Installed crypto-random-0.0.9
Installed asn1-parse-0.9.1
Configuring case-insensitive-1.2.0.4...
Building crypto-pubkey-types-0.4.3...
Building case-insensitive-1.2.0.4...
Configuring scientific-0.3.3.8...
Installed case-insensitive-1.2.0.4
Building scientific-0.3.3.8...
Configuring unordered-containers-0.2.5.1...
Installed scientific-0.3.3.8
Downloading attoparsec-0.13.0.0...
Building unordered-containers-0.2.5.1...
Configuring cookie-0.4.1.5...
Installed crypto-pubkey-types-0.4.3
Downloading x509-1.5.1...
Building cookie-0.4.1.5...
Configuring blaze-markup-0.7.0.2...
Installed cookie-0.4.1.5
Building blaze-markup-0.7.0.2...
Configuring streaming-commons-0.1.12.1...
Installed blaze-markup-0.7.0.2
Downloading blaze-html-0.8.0.2...
Configuring network-uri-2.6.0.3...
Installed unordered-containers-0.2.5.1
Building streaming-commons-0.1.12.1...
Building network-uri-2.6.0.3...
Configuring lifted-base-0.2.3.6...
Installed network-uri-2.6.0.3
Building lifted-base-0.2.3.6...
Configuring resource-pool-0.2.3.2...
Installed streaming-commons-0.1.12.1
Building resource-pool-0.2.3.2...
Installed lifted-base-0.2.3.6
Downloading enclosed-exceptions-1.0.1.1...
Configuring cipher-aes-0.2.10...
Downloading resourcet-1.1.5...
Building cipher-aes-0.2.10...
Configuring cipher-des-0.0.6...
Installed resource-pool-0.2.3.2
Building cipher-des-0.0.6...
Configuring cipher-rc4-0.1.4...
Installed cipher-des-0.0.6
Installed cipher-aes-0.2.10
Configuring crypto-numbers-0.2.7...
Building cipher-rc4-0.1.4...
Building crypto-numbers-0.2.7...
Installed cipher-rc4-0.1.4
Configuring http-types-0.8.6...
Building http-types-0.8.6...
Configuring x509-1.5.1...
Installed crypto-numbers-0.2.7
Building x509-1.5.1...
Configuring blaze-html-0.8.0.2...
Installed http-types-0.8.6
Downloading http-client-0.4.11.3...
Building blaze-html-0.8.0.2...
Configuring attoparsec-0.13.0.0...
Installed x509-1.5.1
Building attoparsec-0.13.0.0...
Configuring semigroups-0.16.2.2...
Installed blaze-html-0.8.0.2
Building semigroups-0.16.2.2...
Configuring enclosed-exceptions-1.0.1.1...
Installed semigroups-0.16.2.2
Downloading bifunctors-5...
Building enclosed-exceptions-1.0.1.1...
Configuring resourcet-1.1.5...
Installed attoparsec-0.13.0.0
Downloading aeson-0.8.1.1...
Installed enclosed-exceptions-1.0.1.1
Configuring crypto-pubkey-0.2.8...
Building resourcet-1.1.5...
Building crypto-pubkey-0.2.8...
Configuring http-client-0.4.11.3...
Installed resourcet-1.1.5
Downloading conduit-1.2.4.2...
Building http-client-0.4.11.3...
Configuring x509-store-1.5.0...
Installed crypto-pubkey-0.2.8
Building x509-store-1.5.0...
Configuring bifunctors-5...
Installed x509-store-1.5.0
Downloading x509-validation-1.5.2...
Building bifunctors-5...
Configuring void-0.7...
Installed bifunctors-5
Building void-0.7...
Configuring aeson-0.8.1.1...
Installed void-0.7
Downloading contravariant-1.3.1.1...
Building aeson-0.8.1.1...
Installed http-client-0.4.11.3
Configuring conduit-1.2.4.2...
Building conduit-1.2.4.2...
Configuring x509-system-1.5.0...
Installed conduit-1.2.4.2
Downloading conduit-extra-1.1.9...
Building x509-system-1.5.0...
Configuring x509-validation-1.5.2...
Installed x509-system-1.5.0
Building x509-validation-1.5.2...
Configuring contravariant-1.3.1.1...
Installed x509-validation-1.5.2
Building contravariant-1.3.1.1...
Installed contravariant-1.3.1.1
Downloading comonad-4.2.6...
Configuring conduit-extra-1.1.9...
Building conduit-extra-1.1.9...
Configuring tls-1.2.17...
Installed conduit-extra-1.1.9
Downloading monad-logger-0.3.13.1...
Building tls-1.2.17...
Installed aeson-0.8.1.1
Downloading yaml-0.8.11...
Configuring cryptohash-conduit-0.1.1...
Building cryptohash-conduit-0.1.1...
Configuring comonad-4.2.6...
Installed cryptohash-conduit-0.1.1
Building comonad-4.2.6...
Configuring monad-logger-0.3.13.1...
Installed comonad-4.2.6
Downloading profunctors-5.1.1...
Downloading semigroupoids-5.0.0.2...
Building monad-logger-0.3.13.1...
Installed monad-logger-0.3.13.1
Downloading persistent-2.2...
Configuring yaml-0.8.11...
Configuring semigroupoids-5.0.0.2...
Installed tls-1.2.17
Building yaml-0.8.11...
Building semigroupoids-5.0.0.2...
Configuring profunctors-5.1.1...
Installed semigroupoids-5.0.0.2
Building profunctors-5.1.1...
Configuring connection-0.2.4...
Installed profunctors-5.1.1
Downloading free-4.12.1...
Building connection-0.2.4...
Configuring persistent-2.2...
Installed yaml-0.8.11
Configuring free-4.12.1...
Installed connection-0.2.4
Building persistent-2.2...
Building free-4.12.1...
Configuring http-client-tls-0.2.2...
Installed free-4.12.1
Downloading either-4.4.1...
Building http-client-tls-0.2.2...
Configuring either-4.4.1...
Installed http-client-tls-0.2.2
Downloading http-conduit-2.1.5...
Building either-4.4.1...
^HInstalled either-4.4.1
Downloading optparse-simple-0.0.3...
Configuring http-conduit-2.1.5...
Building http-conduit-2.1.5...
Configuring optparse-simple-0.0.3...
Installed http-conduit-2.1.5
Building optparse-simple-0.0.3...
Installed optparse-simple-0.0.3
Installed persistent-2.2
Downloading persistent-sqlite-2.2...
Downloading persistent-template-2.1.3.3...
Configuring persistent-template-2.1.3.3...
Configuring persistent-sqlite-2.2...
Building persistent-template-2.1.3.3...
Building persistent-sqlite-2.2...
Installed persistent-template-2.1.3.3
Installed persistent-sqlite-2.2
Downloading stack-0.0.1...
Configuring stack-0.0.1...
Building stack-0.0.1...
Failed to install stack-0.0.1
Build log ( /home/illabout/filesystem/stack/.cabal-sandbox/logs/stack-0.0.1.log ):
Configuring stack-0.0.1...
Building stack-0.0.1...
Preprocessing library stack-0.0.1...
Warning: Can't find file "/usr/lib/ghc-7.10.1/include/ghcversion.h" in directories
        src/Stack
        .
        dist/dist-sandbox-9e149746/build
        dist/dist-sandbox-9e149746/build
        dist/dist-sandbox-9e149746/build/autogen
        dist/dist-sandbox-9e149746/build
        /home/illabout/filesystem/stack/.cabal-sandbox/lib/x86_64-linux-ghc-7.10.1/netwo_Bdsn6Y1VKLa3MCczwSV70J/include
        /home/illabout/filesystem/stack/.cabal-sandbox/lib/x86_64-linux-ghc-7.10.1/vecto_6aaU0nnmvuo8Fm695YhjzM/include
        /home/illabout/filesystem/stack/.cabal-sandbox/lib/x86_64-linux-ghc-7.10.1/primi_4EFP5cvZDduIYCPc8lT1lV/include
        /usr/lib/ghc-7.10.1/proce_0hwN3CTKynhHQqQkChnSdH/include
        /usr/lib/ghc-7.10.1/direc_3TcTyYedch32o1zTH2MR00/include
        /usr/lib/ghc-7.10.1/unix_G4Yo1pNtYrk8nCq1cx8P9d/include
        /usr/lib/ghc-7.10.1/time_Hh2clZW6in4HpYHx5bLtb7/include
        /usr/lib/ghc-7.10.1/bytes_6vj5EoliHgNHISHCVCb069/include
        /usr/lib/ghc-7.10.1/base_I5BErHzyOm07EBNpKBEeUv/include
        /usr/lib/ghc-7.10.1/integ_2aU3IZNMF9a7mQ0OzsZ0dS/include
        /usr/lib/ghc-7.10.1/include
        /usr/lib/libffi-3.2.1/include
  Asked for by: src/Stack/Docker.hs  at line 2 col 1
Warning: Can't find file "/usr/lib/ghc-7.10.1/include/ghcversion.h" in directories
        src/Stack/Types
        .
        dist/dist-sandbox-9e149746/build
        dist/dist-sandbox-9e149746/build
        dist/dist-sandbox-9e149746/build/autogen
        dist/dist-sandbox-9e149746/build
        /home/illabout/filesystem/stack/.cabal-sandbox/lib/x86_64-linux-ghc-7.10.1/netwo_Bdsn6Y1VKLa3MCczwSV70J/include
        /home/illabout/filesystem/stack/.cabal-sandbox/lib/x86_64-linux-ghc-7.10.1/vecto_6aaU0nnmvuo8Fm695YhjzM/include
        /home/illabout/filesystem/stack/.cabal-sandbox/lib/x86_64-linux-ghc-7.10.1/primi_4EFP5cvZDduIYCPc8lT1lV/include
        /usr/lib/ghc-7.10.1/proce_0hwN3CTKynhHQqQkChnSdH/include
        /usr/lib/ghc-7.10.1/direc_3TcTyYedch32o1zTH2MR00/include
        /usr/lib/ghc-7.10.1/unix_G4Yo1pNtYrk8nCq1cx8P9d/include
        /usr/lib/ghc-7.10.1/time_Hh2clZW6in4HpYHx5bLtb7/include
        /usr/lib/ghc-7.10.1/bytes_6vj5EoliHgNHISHCVCb069/include
        /usr/lib/ghc-7.10.1/base_I5BErHzyOm07EBNpKBEeUv/include
        /usr/lib/ghc-7.10.1/integ_2aU3IZNMF9a7mQ0OzsZ0dS/include
        /usr/lib/ghc-7.10.1/include
        /usr/lib/libffi-3.2.1/include
  Asked for by: src/Stack/Types/StackT.hs  at line 2 col 1
Warning: Can't find file "/usr/lib/ghc-7.10.1/include/ghcversion.h" in directories
        src/Stack
        .
        dist/dist-sandbox-9e149746/build
        dist/dist-sandbox-9e149746/build
        dist/dist-sandbox-9e149746/build/autogen
        dist/dist-sandbox-9e149746/build
        /home/illabout/filesystem/stack/.cabal-sandbox/lib/x86_64-linux-ghc-7.10.1/netwo_Bdsn6Y1VKLa3MCczwSV70J/include
        /home/illabout/filesystem/stack/.cabal-sandbox/lib/x86_64-linux-ghc-7.10.1/vecto_6aaU0nnmvuo8Fm695YhjzM/include
        /home/illabout/filesystem/stack/.cabal-sandbox/lib/x86_64-linux-ghc-7.10.1/primi_4EFP5cvZDduIYCPc8lT1lV/include
        /usr/lib/ghc-7.10.1/proce_0hwN3CTKynhHQqQkChnSdH/include
        /usr/lib/ghc-7.10.1/direc_3TcTyYedch32o1zTH2MR00/include
        /usr/lib/ghc-7.10.1/unix_G4Yo1pNtYrk8nCq1cx8P9d/include
        /usr/lib/ghc-7.10.1/time_Hh2clZW6in4HpYHx5bLtb7/include
        /usr/lib/ghc-7.10.1/bytes_6vj5EoliHgNHISHCVCb069/include
        /usr/lib/ghc-7.10.1/base_I5BErHzyOm07EBNpKBEeUv/include
        /usr/lib/ghc-7.10.1/integ_2aU3IZNMF9a7mQ0OzsZ0dS/include
        /usr/lib/ghc-7.10.1/include
        /usr/lib/libffi-3.2.1/include
  Asked for by: src/Stack/Build.hs  at line 2 col 1
[ 1 of 45] Compiling Control.Monad.Logger.Sticky ( src/Control/Monad/Logger/Sticky.hs, dist/dist-sandbox-9e149746/build/Control/Monad/Logger/Sticky.o )
[ 2 of 45] Compiling Data.Set.Monad   ( src/Data/Set/Monad.hs, dist/dist-sandbox-9e149746/build/Data/Set/Monad.o )
[ 3 of 45] Compiling Network.HTTP.Download.Verified ( src/Network/HTTP/Download/Verified.hs, dist/dist-sandbox-9e149746/build/Network/HTTP/Download/Verified.o )
[ 4 of 45] Compiling Data.Attoparsec.Combinators ( src/Data/Attoparsec/Combinators.hs, dist/dist-sandbox-9e149746/build/Data/Attoparsec/Combinators.o )
[ 5 of 45] Compiling Stack.Types.PackageName ( src/Stack/Types/PackageName.hs, dist/dist-sandbox-9e149746/build/Stack/Types/PackageName.o )
[ 6 of 45] Compiling Stack.Types.FlagName ( src/Stack/Types/FlagName.hs, dist/dist-sandbox-9e149746/build/Stack/Types/FlagName.o )
[ 7 of 45] Compiling Data.Maybe.Extra ( src/Data/Maybe/Extra.hs, dist/dist-sandbox-9e149746/build/Data/Maybe/Extra.o )
[ 8 of 45] Compiling Stack.Types.Docker ( src/Stack/Types/Docker.hs, dist/dist-sandbox-9e149746/build/Stack/Types/Docker.o )
[ 9 of 45] Compiling System.Process.PagerEditor ( src/System/Process/PagerEditor.hs, dist/dist-sandbox-9e149746/build/System/Process/PagerEditor.o )
[10 of 45] Compiling Paths_stack      ( dist/dist-sandbox-9e149746/build/autogen/Paths_stack.hs, dist/dist-sandbox-9e149746/build/Paths_stack.o )
[11 of 45] Compiling Stack.Types.Version ( src/Stack/Types/Version.hs, dist/dist-sandbox-9e149746/build/Stack/Types/Version.o )
[12 of 45] Compiling Stack.Types.BuildPlan ( src/Stack/Types/BuildPlan.hs, dist/dist-sandbox-9e149746/build/Stack/Types/BuildPlan.o )
[13 of 45] Compiling Stack.Types.PackageIdentifier ( src/Stack/Types/PackageIdentifier.hs, dist/dist-sandbox-9e149746/build/Stack/Types/PackageIdentifier.o )
[14 of 45] Compiling Stack.Types.GhcPkgId ( src/Stack/Types/GhcPkgId.hs, dist/dist-sandbox-9e149746/build/Stack/Types/GhcPkgId.o )
[15 of 45] Compiling System.Process.Read ( src/System/Process/Read.hs, dist/dist-sandbox-9e149746/build/System/Process/Read.o )
[16 of 45] Compiling Stack.Types.Config ( src/Stack/Types/Config.hs, dist/dist-sandbox-9e149746/build/Stack/Types/Config.o )
[17 of 45] Compiling Stack.Docker.GlobalDB ( src/Stack/Docker/GlobalDB.hs, dist/dist-sandbox-9e149746/build/Stack/Docker/GlobalDB.o )
[18 of 45] Compiling Stack.Types.Internal ( src/Stack/Types/Internal.hs, dist/dist-sandbox-9e149746/build/Stack/Types/Internal.o )
[19 of 45] Compiling Stack.Types.StackT ( src/Stack/Types/StackT.hs, dist/dist-sandbox-9e149746/build/Stack/Types/StackT.o )

src/Stack/Types/StackT.hs:140:43:
    Ambiguous occurrence ‘defaultTimeLocale’
    It could refer to either ‘Data.Time.defaultTimeLocale’,
                             imported from ‘Data.Time’ at src/Stack/Types/StackT.hs:33:1-26
                             (and originally defined in ‘time-1.5.0.1:Data.Time.Format.Locale’)
                          or ‘System.Locale.defaultTimeLocale’,
                             imported from ‘System.Locale’ at src/Stack/Types/StackT.hs:45:1-30
cabal: Error: some packages failed to install:
stack-0.0.1 failed during the building phase. The exception was:
ExitFailure 1
snoyberg commented 9 years ago

That's weird, our Travis bot specifically tests with cabal and GHC 7.10 to help with the bootstrap case. I'll see if I can repro.

cdepillabout commented 9 years ago

I tried using the stackage nightly cabal.config and it fails with the same error as well.

snoyberg commented 9 years ago

I just completed a build in the same setup, and it worked correctly. We do have CPP in place to work around this issue... can you try unpacking the source and removing lines 41-43 of the file in question? It could be that Cabal (for some reason) isn't setting the CPP macros itself.

cdepillabout commented 9 years ago

Removing just lines 41-43 left me with the same error, but removing lines 41-46 fixed the error for me. stack now compiles and runs correctly.

snoyberg commented 9 years ago

That's quite unexpected. If you don't mind, could you tell me the contents of your cabal_macros.h file, and specifically the MIN_VERSION_time macro? Mine looks like:

#define VERSION_time "1.5.0.1"
#define MIN_VERSION_time(major1,major2,minor) (\
  (major1) <  1 || \
  (major1) == 1 && (major2) <  5 || \
  (major1) == 1 && (major2) == 5 && (minor) <= 0)
cdepillabout commented 9 years ago

It looks like my version of cpphs was too old.

Building stack with cpphs version 1.17.1 caused the error above.

Building stack with cpphs version 1.19 worked.

Is there some way to specify in the .cabal file that a recent version of cpphs is needed?

Also, I can get stack to build by removing the use of cpphs. In the ghc-options: line of stack.cabal, I tried removing the -pgmP and -optP options. It builds successfully.

snoyberg commented 9 years ago

Cabal does not actually support build tools at all, so adding the versions wouldn't help. I believe we've already removed the cpphs stuff from master, so that wool be included in the next release. Thanks for looking into this more deeply.

On Wed, Jun 10, 2015, 2:08 PM Dennis Gosnell notifications@github.com wrote:

It looks like my version of cpphs was too old.

Building stack with cpphs version 1.17.1 caused the error above.

Building stack with cpphs version 1.19 worked.

Is there some way to specify in the .cabal file that a recent version of cpphs is needed?

Also, I can get stack to build by removing the use of cpphs. In the ghc-options: line of stack.cabal, I tried removing the -pgmP and -optP options. It builds successfully.

— Reply to this email directly or view it on GitHub https://github.com/commercialhaskell/stack/issues/255#issuecomment-110701585 .

cdepillabout commented 9 years ago

Okay, sounds good.

Thanks a lot for your help!