New-build fails to find package list #3392

glguy opened this Issue May 2, 2016 · 6 comments


None yet

7 participants

glguy commented May 2, 2016

When I try to build my package using new-build, I get an error about a missing package list. Building using normal build works, however.

$ cabal update
Downloading the latest package list from

$ cabal new-build
Warning: The package list for '' does not exist. Run 'cabal
update' to download it.
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: irc-core-1.1.4 (user goal)
next goal: haskell-lexer (dependency of irc-core-1.1.4)
Dependency tree exhaustively searched.

$ cabal --version
cabal-install version
compiled using version of the Cabal library 
glguy commented May 2, 2016

The bug seems to be related to new-build not honoring some aspect of my old .cabal/config as created by an old version of the Haskell Platform somewhen long ago:

remote-repo-cache: /Users/emertens/Library/Haskell/repo-cache

Generating a new .cabal/config gets new-build working, but it would probably be worth figuring out how to look up things correctly in the configuration file because other people are likely to have the same problem who installed Haskell around when I did.

hvr commented May 2, 2016 edited

I was just gonna open an issue myself... this is about remote-repo-cache not being propagated into new-build's environment. I'm sure @dcoutts knows right away the place which needs a one-line-fix...

PS: A simple workaround on OSX is to

ln -s ~/Library/Haskell/repo-cache ~/.cabal/packages
@hvr hvr assigned hvr and dcoutts and unassigned hvr May 2, 2016
@hvr hvr added this to the cabal-install milestone May 2, 2016
mightybyte commented May 2, 2016 edited

Another fix that I found was to delete my ~/.cabal/config file and do cabal update. Then everything worked fine. Note that if you go with this approach you might want to back up the config file first in case you had critical customizations. But this has worked fine for me on two different machines.

The solution given by @hvr is definitely safer, so you may not want to do this one. But I kind of like the idea of getting the latest and greatest ~/.cabal/config defaults.

gbaz commented May 11, 2016

remote-repo-cache: /Users/gershom/Library/Haskell/repo-cache
remote-repo-cache: /Users/gershom/.cabal/packages

seems to work.

I think this is probably an infelicity in new-build that it can't properly interact with a nonstandard remote-repo-cache location?

@ezyang ezyang modified the milestone: cabal-install, Soon Sep 6, 2016
@ezyang ezyang added a commit to ezyang/cabal that referenced this issue Sep 6, 2016
@ezyang ezyang Axe cabalPackageCacheDirectory, use projectConfigCacheDir, fixing #3392
I am not sure why the original code did something insane,
which may indicate a lurking bug.

Signed-off-by: Edward Z. Yang <>
ezyang commented Sep 6, 2016

Issue subsumed by PR #3796.

@ezyang ezyang closed this Sep 6, 2016
@23Skidoo 23Skidoo removed this from the milestone Oct 8, 2016
23Skidoo commented Oct 8, 2016

Removing the milestone, since people using new-build should be running HEAD at this point, which is more stable than 1.24.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment