Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack master fails to build bloodhound Setup.hs, 0.1.4 succeeds #941

Closed
hesselink opened this issue Sep 7, 2015 · 9 comments
Closed

Stack master fails to build bloodhound Setup.hs, 0.1.4 succeeds #941

hesselink opened this issue Sep 7, 2015 · 9 comments

Comments

@hesselink
Copy link
Contributor

On stack master, I can't build bloodhound since stack fails to compile its custom Setup.hs. The error message is:

        Could not find module ‘System.FilePath’
        It is a member of the hidden package ‘filepath-1.3.0.2’.
        Use -v to see a list of the files searched for.

The filepath package is installed in the ghc package database:

$ stack exec ghc-pkg list filepath
Run from outside a project, using implicit global config
Using resolver: lts-2.15 from global config file: /Users/erik/.stack/global/stack.yaml
/Users/erik/.stack/programs/x86_64-osx/ghc-7.8.4/lib/ghc-7.8.4/package.conf.d
   filepath-1.3.0.2
/Users/erik/.stack/snapshots/x86_64-osx/lts-2.15/7.8.4/pkgdb
/Users/erik/.stack/global/.stack-work/install/x86_64-osx/lts-2.15/7.8.4/pkgdb

The full failing output from stack install bloodhound -v:

2015-09-07 09:43:58.060691:  [debug] Run process:  /Users/erik/.stack/programs/x86_64-osx/ghc-7.8.4/bin/runhaskell
  -clear-package-db
  -global-package-db
  -package-db=/Users/erik/.stack/snapshots/x86_64-osx/lts-2.15/7.8.4/pkgdb/
  -package-db=/Users/erik/.stack/global/.stack-work/install/x86_64-osx/lts-2.15/7.8.4/pkgdb/
  -hide-all-packages
  -package=Cabal-1.18.1.5
  -package-id=aeson-0.8.0.2-99c681ff2da9d8fa05471a12eae18303
  -package-id=base-4.7.0.2-918c7ac27f65a87103264a9f51652d63
  -package-id=bytestring-0.10.4.0-78bc8f2c724c765c78c004a84acf6cc3
  -package-id=conduit-1.2.4.2-4017aa9da039be73c6d46386d79ea063
  -package-id=containers-0.5.5.1-d7910f1cd81272c1f31ca9f71d0f206e
  -package-id=http-client-0.4.12-6922f52138b200b37deba7894779c39d
  -package-id=http-types-0.8.6-f86a077c5ffb0e9ce2fec2b47702a917
  -package-id=semigroups-0.16.2.2-aba9685302a99558953f3ec553e1df22
  -package-id=text-1.2.0.6-48c6b51d86eb306f10326b730ae4e082
  -package-id=time-1.4.2-192d26f44a2c945780bbb921626c3399
  -package-id=vector-0.10.12.3-f4222db607fd5fdd7545d3e82419b307
  /var/folders/qg/4lbbbp0d1hbg7f6_cr2r8h8h0000gn/T/stack54381/bloodhound-0.5.0.1/Setup.hs
  --builddir=.stack-work/dist/x86_64-osx/Cabal-1.18.1.5/
  configure
  --user
  --package-db=clear
  --package-db=global
  --package-db=/Users/erik/.stack/snapshots/x86_64-osx/lts-2.15/7.8.4/pkgdb/
  --libdir=/Users/erik/.stack/snapshots/x86_64-osx/lts-2.15/7.8.4/lib
  --bindir=/Users/erik/.stack/snapshots/x86_64-osx/lts-2.15/7.8.4/bin
  --datadir=/Users/erik/.stack/snapshots/x86_64-osx/lts-2.15/7.8.4/share
  --libexecdir=/Users/erik/.stack/snapshots/x86_64-osx/lts-2.15/7.8.4/libexec
  --sysconfdir=/Users/erik/.stack/snapshots/x86_64-osx/lts-2.15/7.8.4/etc
  --docdir=/Users/erik/.stack/snapshots/x86_64-osx/lts-2.15/7.8.4/doc/bloodhound-0.5.0.1
  --htmldir=/Users/erik/.stack/snapshots/x86_64-osx/lts-2.15/7.8.4/doc/bloodhound-0.5.0.1
  --haddockdir=/Users/erik/.stack/snapshots/x86_64-osx/lts-2.15/7.8.4/doc/bloodhound-0.5.0.1
  --constraint=aeson==0.8.0.2
  --constraint=base==4.7.0.2
  --constraint=bytestring==0.10.4.0
  --constraint=conduit==1.2.4.2
  --constraint=containers==0.5.5.1
  --constraint=http-client==0.4.12
  --constraint=http-types==0.8.6
  --constraint=semigroups==0.16.2.2
  --constraint=text==1.2.0.6
  --constraint=time==1.4.2
  --constraint=vector==0.10.12.3
  @(stack_FhlmuwqZDji0WhaDijVRMV:Stack.Build.Execute
  src/Stack/Build/Execute.hs:727:21)

And the similar line from the succeeding 0.1.4 build:

2015-09-07 09:44:12.432638: [debug] Run process: /Users/erik/.stack/programs/x86_64-osx/ghc-7.8.4/bin/runhaskell
  -package=Cabal-1.18.1.5
  -clear-package-db
  -global-package-db
  -package-db=/Users/erik/.stack/snapshots/x86_64-osx/lts-2.15/7.8.4/pkgdb/
  /var/folders/qg/4lbbbp0d1hbg7f6_cr2r8h8h0000gn/T/stack54476/bloodhound-0.5.0.1/Setup.hs
  --builddir=.stack-work/dist/x86_64-osx/Cabal-1.18.1.5/
  configure
  --user
  --package-db=clear
  --package-db=global
  --package-db=/Users/erik/.stack/snapshots/x86_64-osx/lts-2.15/7.8.4/pkgdb/
  --libdir=/Users/erik/.stack/snapshots/x86_64-osx/lts-2.15/7.8.4/lib
  --bindir=/Users/erik/.stack/snapshots/x86_64-osx/lts-2.15/7.8.4/bin
  --datadir=/Users/erik/.stack/snapshots/x86_64-osx/lts-2.15/7.8.4/share
  --libexecdir=/Users/erik/.stack/snapshots/x86_64-osx/lts-2.15/7.8.4/libexec
  --sysconfdir=/Users/erik/.stack/snapshots/x86_64-osx/lts-2.15/7.8.4/etc
  --docdir=/Users/erik/.stack/snapshots/x86_64-osx/lts-2.15/7.8.4/doc/bloodhound-0.5.0.1
  --htmldir=/Users/erik/.stack/snapshots/x86_64-osx/lts-2.15/7.8.4/doc/bloodhound-0.5.0.1
  --haddockdir=/Users/erik/.stack/snapshots/x86_64-osx/lts-2.15/7.8.4/doc/bloodhound-0.5.0.1
  --constraint=aeson==0.8.0.2
  --constraint=base==4.7.0.2
  --constraint=bytestring==0.10.4.0
  --constraint=conduit==1.2.4.2
  --constraint=containers==0.5.5.1
  --constraint=http-client==0.4.12
  --constraint=http-types==0.8.6
  --constraint=semigroups==0.16.2.2
  --constraint=text==1.2.0.6
  --constraint=time==1.4.2
  --constraint=vector==0.10.12.3
  @(stack_FhlmuwqZDji0WhaDijVRMV:Stack.Build.Execute
  src/Stack/Build/Execute.hs:696:21)
@snoyberg
Copy link
Contributor

snoyberg commented Sep 7, 2015

Oh, that's unfortunate. Pinging @mitchellwrosen. This is a fallout of #897 and #899, where we're now explicit about which packages are provided to Setup.hs. I see three solutions:

  1. Declare this new behavior of stack "correct," and tell package authors that they need to add such dependencies to their .cabal files. I don't think we should do that.
  2. Revert Give Setup.hs all project dependencies #897 #899 and figure out a different approach
  3. Keep Give Setup.hs all project dependencies #897 #899, but implicitly add all packages from the global package database to be available for Setup.hs. That seems reasonable, since those would be the only packages that a Setup.hs could depend on in general without listing them in the .cabal file.

Thoughts?

@bixuanzju
Copy link
Contributor

I have the same error, but this time for stack install happy

   Process exited with code: ExitFailure 1
    Logs have been written to: /Users/jeremybi/.stack/global/.stack-work/logs/happy-1.19.5.log


    /var/folders/f3/vdwt6pq13jx9vlx_xz_83rkw0000gn/T/stack77141/happy-1.19.5/Setup.lhs:13:8:
        Could not find module ‘System.FilePath’
        It is a member of the hidden package ‘filepath-1.4.0.0@filep_KsGE6pHE5eZHSN90ZVax6A’.
        Use -v to see a list of the files searched for.

    /var/folders/f3/vdwt6pq13jx9vlx_xz_83rkw0000gn/T/stack77141/happy-1.19.5/Setup.lhs:15:8:
        Could not find module ‘System.Directory’
        It is a member of the hidden package ‘directory-1.2.2.0@direc_KowvXytSqazBcvN7MGpFtg’.
        Use -v to see a list of the files searched for.

snoyberg added a commit that referenced this issue Sep 7, 2015
@snoyberg
Copy link
Contributor

snoyberg commented Sep 7, 2015

OK, I pushed my option (3), can you give it a shot?

@hesselink
Copy link
Contributor Author

I now get this error:

    Top level:
        Ambiguous interface for ‘Prelude’:
          it was found in multiple packages:
          base haskell98-2.0.0.3 haskell2010-1.1.2.0

This should be really easy to test btw, just install bloodhound (0.5.0.1) with the lts-2.15 resolver.

@snoyberg
Copy link
Contributor

snoyberg commented Sep 7, 2015

I was testing with happy, not bloodhound. Alright, I think the solution is
to track if a package is hidden or not by default.

Strange that happy doesn't trigger this problem.

On Mon, Sep 7, 2015 at 3:18 PM, Erik Hesselink notifications@github.com
wrote:

I now get this error:

Top level:
    Ambiguous interface for ‘Prelude’:
      it was found in multiple packages:
      base haskell98-2.0.0.3 haskell2010-1.1.2.0

This should be really easy to test btw, just install bloodhound (0.5.0.1)
with the lts-2.15 resolver.


Reply to this email directly or view it on GitHub
#941 (comment)
.

@snoyberg
Copy link
Contributor

snoyberg commented Sep 7, 2015

Apparently GHC 7.10 no longer ships with the haskell98 and haskell2010 packages. TIL

@snoyberg
Copy link
Contributor

snoyberg commented Sep 7, 2015

OK, I tested with 7.8 against happy (don't have time now to build the
bloodhound deps). Can you check if that fixes it?

On Mon, Sep 7, 2015 at 3:20 PM, Michael Snoyman michael@snoyman.com wrote:

I was testing with happy, not bloodhound. Alright, I think the solution is
to track if a package is hidden or not by default.

Strange that happy doesn't trigger this problem.

On Mon, Sep 7, 2015 at 3:18 PM, Erik Hesselink notifications@github.com
wrote:

I now get this error:

Top level:
    Ambiguous interface for ‘Prelude’:
      it was found in multiple packages:
      base haskell98-2.0.0.3 haskell2010-1.1.2.0

This should be really easy to test btw, just install bloodhound (0.5.0.1)
with the lts-2.15 resolver.


Reply to this email directly or view it on GitHub
#941 (comment)
.

@adinapoli
Copy link
Contributor

@snoyberg I was being hit by the very same problem (in my case the incriminated package was comonad) and I'm happy to report that it now builds fine:

☁  pan [issue-36] ⚡ stack install comonad-4.2.7
stack install comonad-4.2.7
comonad-4.2.7: configure
comonad-4.2.7: build
comonad-4.2.7: install
☁  pan [issue-36] ⚡ stack --version
Version 0.1.4.1, Git revision eab3db27bd27d22a2a5b4430aff7038d891d5d51 X86_64

@hesselink
Copy link
Contributor Author

@snoyberg Yes, that fixes it. Thanks for the quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants