Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 3,630
    • Issues 3,630
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 202
    • Merge Requests 202
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Security & Compliance
    • Security & Compliance
    • Dependency List
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #17468

Closed
Open
Opened Nov 12, 2019 by Niklas Hambüchen@nh2
  • Report abuse
  • New issue
Report abuse New issue

Hadrian uses wrong stage's ghc-pkg, writing incompatible package.cache

I tried to add a field to InstalledPackageInfo.

This gave me the error:

_build/stage0/lib/package.conf.d/package.cache: GHC.PackageDb.readPackageDb: inappropriate type (Not a valid Unicode code point!)

Full output: https://gist.github.com/nh2/94dc2f98b38798ed4a4e65844dd3ac9a

Doing _build/stage0/lib/package.conf.d/{package.cache,rts.conf} (also deleting a .conf file to work around #17467) and re-running ./hadrian/build.stack.sh -j --flavour=quickest --verbose reveals the problem (full output):

ghc-pkg: cannot find package rts
| Run GhcPkg Copy Stage0: rts => _build/stage0/lib/package.conf.d/rts.conf
/raid/stack/programs/x86_64-linux/ghc-8.6.5/bin/ghc-pkg --expand-pkgroot --no-user-package-db describe rts
/raid/stack/programs/x86_64-linux/ghc-8.6.5/bin/ghc-pkg --global-package-db _build/stage0/lib/package.conf.d register -v0 -

As identified by @bgamari, it's using the global (stage0) ghc-pkg register to write the package.conf, which then of course cannot be deserialised by my modified ghc-pkg that expectes one field more.

nh2: so you're saying it should use _build/stage0/bin/ghc-pkg instead?

bgamari: right

Related issues

  • Discussion
  • Designs
Assignee
Assign to
8.12.1
Milestone
8.12.1
Assign milestone
Time tracking
None
Due date
None
4
Labels
bug ghc build failure hadrian package system
Assign labels
  • View project labels
Reference: ghc/ghc#17468