Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,334
    • Issues 4,334
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 371
    • Merge Requests 371
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #19264

Closed
Open
Opened Jan 26, 2021 by Ryan Scott@RyanGlScottMaintainer

hgmp-0.1.2 panics on HEAD (lookupGlobal) due to mismatched GHC/Num/BigNat.hi

Originally observed on a head.hackage CI build here.

Attempting to build the hgmp-0.1.2 package with GHC HEAD (at commit b18d9e97) triggers a panic. To reproduce, do the following:

$ cabal repl -b hgmp -w ~/Software/ghc-9.1.20210124/bin/ghc --constraint="hgmp==0.1.2" --allow-newer=base,ghc-prim
Resolving dependencies...
Build profile: -w ghc-9.1.20210124 -O1
In order, the following will be built (use -v for more details):
 - hgmp-0.1.2 (lib) (requires build)
 - fake-package-0 (lib) (first run)
Starting     hgmp-0.1.2 (lib)
Building     hgmp-0.1.2 (lib)

Failed to build hgmp-0.1.2.
Build log (
/home/ryanglscott/.cabal/logs/ghc-9.1.20210124/hgmp-0.1.2-40e5acddb0bd81ddbcf00e2606c0cf5908c10258cb69ed9e9609bda285e2d340.log
):
Configuring library for hgmp-0.1.2..
Preprocessing library for hgmp-0.1.2..
Building library for hgmp-0.1.2..
[1 of 4] Compiling Numeric.GMP.Types ( dist/build/Numeric/GMP/Types.hs, dist/build/Numeric/GMP/Types.o, dist/build/Numeric/GMP/Types.dyn_o )

src/Numeric/GMP/Types.hsc:14:1: warning: [-Wunused-imports]
    The import of ‘Data.Typeable’ is redundant
      except perhaps to import instances from ‘Data.Typeable’
    To import instances alone, use: import Data.Typeable()
   |
14 | import Data.Typeable
   | ^^^^^^^^^^^^^^^^^^^^

src/Numeric/GMP/Types.hsc:20:36: warning: [-Wunused-imports]
    The import of ‘nullPtr’ from module ‘Foreign’ is redundant
   |
20 | import Foreign (Storable(..), Ptr, nullPtr, plusPtr)
   |                                    ^^^^^^^
ghc: panic! (the 'impossible' happened)
  (GHC version 9.1.20210124:
        lookupGlobal
  Bad interface file: /home/ryanglscott/Software/ghc-9.1.20210124/lib/../lib/x86_64-linux-ghc-9.1.20210124/ghc-bignum-1.0/GHC/Num/BigNat.hi
      mismatched interface file profile tag (wanted "dyn", got "")
  Call stack:
      CallStack (from HasCallStack):
        callStackDoc, called at compiler/GHC/Utils/Panic.hs:181:37 in ghc:GHC.Utils.Panic
        pprPanic, called at compiler/GHC/Tc/Utils/Env.hs:155:32 in ghc:GHC.Tc.Utils.Env

Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug

cabal: Failed to build hgmp-0.1.2 (which is required by fake-package-0). See
the build log above for details.

This is a regression from GHC 9.0 and earlier. I haven't quite figured out how to minimize the example yet, unfortunately.

This appears to be ghc-bignum–related, so perhaps @hsyl20 might know what is happening here?

Assignee
Assign to
9.2.1
Milestone
9.2.1
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#19264