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

hie-bios check can't parse "ghc-8.6.5/platformConstants" on MacOS #261

Closed
armatures opened this issue Oct 30, 2020 · 2 comments
Closed

hie-bios check can't parse "ghc-8.6.5/platformConstants" on MacOS #261

armatures opened this issue Oct 30, 2020 · 2 comments
Labels

Comments

@armatures
Copy link

When I run hie-bios check . in this project, the command fails with

hie-bios: Can't parse "/Users/me/.stack/programs/x86_64-osx/ghc-8.6.5/lib/ghc-8.6.5/platformConstants"

This issue seems related, and came down to some sort of ghc version mismatch. Should I specify a different GHC version somewhere?

I installed hie-bios by cloning this repo and running cabal install.

  • Cabal is version 3.2.0.0.
  • stack --version returns: Version 2.5.1, Git revision d6ab861544918185236cf826cb2028abb266d6d5 x86_64 hpack-0.33.0
  • ghc version is 8.10.1

running hie-bios debug gives:

Root directory:        /Users/me/Exercism/haskell/hello-world
Component directory:   /Users/me/Exercism/haskell/hello-world
GHC options:           -i -odir=/Users/me/Exercism/haskell/hello-world/.stack-work/odir -hidir=/Users/me/Exercism/haskell/hello-world/.stack-work/odir -hide-all-packages -i/Users/me/Exercism/haskell/hello-world/.stack-work/dist/x86_64-osx/Cabal-2.4.0.1/build -i/Users/me/Exercism/haskell/hello-world/src -i/Users/me/Exercism/haskell/hello-world/.stack-work/dist/x86_64-osx/Cabal-2.4.0.1/build/autogen -i/Users/me/Exercism/haskell/hello-world/.stack-work/dist/x86_64-osx/Cabal-2.4.0.1/build/global-autogen -stubdir=/Users/me/Exercism/haskell/hello-world/.stack-work/dist/x86_64-osx/Cabal-2.4.0.1/build -package-id=base-4.12.0.0 -Wall -optP-include -optP/Users/me/Exercism/haskell/hello-world/.stack-work/ghci/4bdc0394/cabal_macros.h -ghci-script=/private/var/folders/kw/c01ws73s1xn996t2c_jt_fr00000gn/T/haskell-stack-ghci/f4670df3/ghci-script -package-db /Users/me/Exercism/haskell/hello-world/.stack-work/install/x86_64-osx/dddf1fa4299d4f2498309287b528721ce74ccb03c3787ddc26fe1fcc739ffe8d/8.6.5/pkgdb -package-db /Users/me/.stack/snapshots/x86_64-osx/dddf1fa4299d4f2498309287b528721ce74ccb03c3787ddc26fe1fcc739ffe8d/8.6.5/pkgdb -package-db /Users/me/.stack/programs/x86_64-osx/ghc-8.6.5/lib/ghc-8.6.5/package.conf.d
GHC library directory: CradleSuccess "/Users/me/.stack/programs/x86_64-osx/ghc-8.6.5/lib/ghc-8.6.5"
GHC version:           CradleSuccess "8.6.5"
Config Location:       No explicit config found
Cradle:                Cradle {cradleRootDir = "/Users/me/Exercism/haskell", cradleOptsProg = CradleAction: Default}
Dependencies:          hello-world.cabal package.yaml stack.yaml

contents of the platformConstants file:

PlatformConstants {
    pc_platformConstants = ()
    , pc_CONTROL_GROUP_CONST_291 = 291
    , pc_STD_HDR_SIZE = 1
    , pc_PROF_HDR_SIZE = 2
    , pc_BLOCK_SIZE = 4096
    , pc_BLOCKS_PER_MBLOCK = 252
    , pc_TICKY_BIN_COUNT = 9
    , pc_OFFSET_StgRegTable_rR1 = 0
    , pc_OFFSET_StgRegTable_rR2 = 8
    , pc_OFFSET_StgRegTable_rR3 = 16
    , pc_OFFSET_StgRegTable_rR4 = 24
    , pc_OFFSET_StgRegTable_rR5 = 32
    , pc_OFFSET_StgRegTable_rR6 = 40
    , pc_OFFSET_StgRegTable_rR7 = 48
    , pc_OFFSET_StgRegTable_rR8 = 56
    , pc_OFFSET_StgRegTable_rR9 = 64
    , pc_OFFSET_StgRegTable_rR10 = 72
    , pc_OFFSET_StgRegTable_rF1 = 80
    , pc_OFFSET_StgRegTable_rF2 = 84
    , pc_OFFSET_StgRegTable_rF3 = 88
    , pc_OFFSET_StgRegTable_rF4 = 92
    , pc_OFFSET_StgRegTable_rF5 = 96
    , pc_OFFSET_StgRegTable_rF6 = 100
    , pc_OFFSET_StgRegTable_rD1 = 104
    , pc_OFFSET_StgRegTable_rD2 = 112
    , pc_OFFSET_StgRegTable_rD3 = 120
    , pc_OFFSET_StgRegTable_rD4 = 128
    , pc_OFFSET_StgRegTable_rD5 = 136
    , pc_OFFSET_StgRegTable_rD6 = 144
    , pc_OFFSET_StgRegTable_rXMM1 = 152
    , pc_OFFSET_StgRegTable_rXMM2 = 168
    , pc_OFFSET_StgRegTable_rXMM3 = 184
    , pc_OFFSET_StgRegTable_rXMM4 = 200
    , pc_OFFSET_StgRegTable_rXMM5 = 216
    , pc_OFFSET_StgRegTable_rXMM6 = 232
    , pc_OFFSET_StgRegTable_rYMM1 = 248
    , pc_OFFSET_StgRegTable_rYMM2 = 280
    , pc_OFFSET_StgRegTable_rYMM3 = 312
    , pc_OFFSET_StgRegTable_rYMM4 = 344
    , pc_OFFSET_StgRegTable_rYMM5 = 376
    , pc_OFFSET_StgRegTable_rYMM6 = 408
    , pc_OFFSET_StgRegTable_rZMM1 = 440
    , pc_OFFSET_StgRegTable_rZMM2 = 504
    , pc_OFFSET_StgRegTable_rZMM3 = 568
    , pc_OFFSET_StgRegTable_rZMM4 = 632
    , pc_OFFSET_StgRegTable_rZMM5 = 696
    , pc_OFFSET_StgRegTable_rZMM6 = 760
    , pc_OFFSET_StgRegTable_rL1 = 824
    , pc_OFFSET_StgRegTable_rSp = 832
    , pc_OFFSET_StgRegTable_rSpLim = 840
    , pc_OFFSET_StgRegTable_rHp = 848
    , pc_OFFSET_StgRegTable_rHpLim = 856
    , pc_OFFSET_StgRegTable_rCCCS = 864
    , pc_OFFSET_StgRegTable_rCurrentTSO = 872
    , pc_OFFSET_StgRegTable_rCurrentNursery = 888
    , pc_OFFSET_StgRegTable_rHpAlloc = 904
    , pc_OFFSET_stgEagerBlackholeInfo = -24
    , pc_OFFSET_stgGCEnter1 = -16
    , pc_OFFSET_stgGCFun = -8
    , pc_OFFSET_Capability_r = 24
    , pc_OFFSET_bdescr_start = 0
    , pc_OFFSET_bdescr_free = 8
    , pc_OFFSET_bdescr_blocks = 48
    , pc_OFFSET_bdescr_flags = 46
    , pc_SIZEOF_CostCentreStack = 96
    , pc_OFFSET_CostCentreStack_mem_alloc = 72
    , pc_REP_CostCentreStack_mem_alloc = 8
    , pc_OFFSET_CostCentreStack_scc_count = 48
    , pc_REP_CostCentreStack_scc_count = 8
    , pc_OFFSET_StgHeader_ccs = 8
    , pc_OFFSET_StgHeader_ldvw = 16
    , pc_SIZEOF_StgSMPThunkHeader = 8
    , pc_OFFSET_StgEntCounter_allocs = 48
    , pc_REP_StgEntCounter_allocs = 8
    , pc_OFFSET_StgEntCounter_allocd = 16
    , pc_REP_StgEntCounter_allocd = 8
    , pc_OFFSET_StgEntCounter_registeredp = 0
    , pc_OFFSET_StgEntCounter_link = 56
    , pc_OFFSET_StgEntCounter_entry_count = 40
    , pc_SIZEOF_StgUpdateFrame_NoHdr = 8
    , pc_SIZEOF_StgMutArrPtrs_NoHdr = 16
    , pc_OFFSET_StgMutArrPtrs_ptrs = 0
    , pc_OFFSET_StgMutArrPtrs_size = 8
    , pc_SIZEOF_StgSmallMutArrPtrs_NoHdr = 8
    , pc_OFFSET_StgSmallMutArrPtrs_ptrs = 0
    , pc_SIZEOF_StgArrBytes_NoHdr = 8
    , pc_OFFSET_StgArrBytes_bytes = 0
    , pc_OFFSET_StgTSO_alloc_limit = 96
    , pc_OFFSET_StgTSO_cccs = 112
    , pc_OFFSET_StgTSO_stackobj = 16
    , pc_OFFSET_StgStack_sp = 8
    , pc_OFFSET_StgStack_stack = 16
    , pc_OFFSET_StgUpdateFrame_updatee = 0
    , pc_OFFSET_StgFunInfoExtraFwd_arity = 4
    , pc_REP_StgFunInfoExtraFwd_arity = 4
    , pc_SIZEOF_StgFunInfoExtraRev = 24
    , pc_OFFSET_StgFunInfoExtraRev_arity = 20
    , pc_REP_StgFunInfoExtraRev_arity = 4
    , pc_MAX_SPEC_SELECTEE_SIZE = 15
    , pc_MAX_SPEC_AP_SIZE = 7
    , pc_MIN_PAYLOAD_SIZE = 1
    , pc_MIN_INTLIKE = -16
    , pc_MAX_INTLIKE = 16
    , pc_MIN_CHARLIKE = 0
    , pc_MAX_CHARLIKE = 255
    , pc_MUT_ARR_PTRS_CARD_BITS = 7
    , pc_MAX_Vanilla_REG = 10
    , pc_MAX_Float_REG = 6
    , pc_MAX_Double_REG = 6
    , pc_MAX_Long_REG = 1
    , pc_MAX_XMM_REG = 6
    , pc_MAX_Real_Vanilla_REG = 6
    , pc_MAX_Real_Float_REG = 6
    , pc_MAX_Real_Double_REG = 6
    , pc_MAX_Real_XMM_REG = 6
    , pc_MAX_Real_Long_REG = 0
    , pc_RESERVED_C_STACK_BYTES = 16384
    , pc_RESERVED_STACK_WORDS = 21
    , pc_AP_STACK_SPLIM = 1024
    , pc_WORD_SIZE = 8
    , pc_DOUBLE_SIZE = 8
    , pc_CINT_SIZE = 4
    , pc_CLONG_SIZE = 8
    , pc_CLONG_LONG_SIZE = 8
    , pc_BITMAP_BITS_SHIFT = 6
    , pc_TAG_BITS = 3
    , pc_WORDS_BIGENDIAN = False
    , pc_DYNAMIC_BY_DEFAULT = False
    , pc_LDV_SHIFT = 30
    , pc_ILDV_CREATE_MASK = 1152921503533105152
    , pc_ILDV_STATE_CREATE = 0
    , pc_ILDV_STATE_USE = 1152921504606846976
  }

Using an explicit hie.yaml file specifying stack doesn't change anything.

I tried adding an hie.yaml file to see if cabal would work better. Given this hie.yaml:

cradle:
  cabal:
    component: "HelloWorld"

running hie-bios check . gives a segmentation fault. In that case, hie-bios debug gives:

Root directory:        /Users/me/Exercism/haskell/hello-world
Component directory:   /Users/me/Exercism/haskell/hello-world
GHC options:           -fbuilding-cabal-package -O0 -outputdir /Users/me/Exercism/haskell/hello-world/dist-newstyle/build/x86_64-osx/ghc-8.10.1/hello-world-1.1.0.5/build -odir /Users/me/Exercism/haskell/hello-world/dist-newstyle/build/x86_64-osx/ghc-8.10.1/hello-world-1.1.0.5/build -hidir /Users/me/Exercism/haskell/hello-world/dist-newstyle/build/x86_64-osx/ghc-8.10.1/hello-world-1.1.0.5/build -stubdir /Users/me/Exercism/haskell/hello-world/dist-newstyle/build/x86_64-osx/ghc-8.10.1/hello-world-1.1.0.5/build -i -i/Users/me/Exercism/haskell/hello-world/dist-newstyle/build/x86_64-osx/ghc-8.10.1/hello-world-1.1.0.5/build -isrc -i/Users/me/Exercism/haskell/hello-world/dist-newstyle/build/x86_64-osx/ghc-8.10.1/hello-world-1.1.0.5/build/autogen -i/Users/me/Exercism/haskell/hello-world/dist-newstyle/build/x86_64-osx/ghc-8.10.1/hello-world-1.1.0.5/build/global-autogen -I/Users/me/Exercism/haskell/hello-world/dist-newstyle/build/x86_64-osx/ghc-8.10.1/hello-world-1.1.0.5/build/autogen -I/Users/me/Exercism/haskell/hello-world/dist-newstyle/build/x86_64-osx/ghc-8.10.1/hello-world-1.1.0.5/build/global-autogen -I/Users/me/Exercism/haskell/hello-world/dist-newstyle/build/x86_64-osx/ghc-8.10.1/hello-world-1.1.0.5/build -optP-include -optP/Users/me/Exercism/haskell/hello-world/dist-newstyle/build/x86_64-osx/ghc-8.10.1/hello-world-1.1.0.5/build/autogen/cabal_macros.h -this-unit-id hello-world-1.1.0.5-inplace -hide-all-packages -Wmissing-home-modules -no-user-package-db -package-db /Users/me/.cabal/store/ghc-8.10.1/package.db -package-db /Users/me/Exercism/haskell/hello-world/dist-newstyle/packagedb/ghc-8.10.1 -package-db /Users/me/Exercism/haskell/hello-world/dist-newstyle/build/x86_64-osx/ghc-8.10.1/hello-world-1.1.0.5/package.conf.inplace -package-id base-4.14.0.0 -XHaskell2010 HelloWorld Paths_hello_world -Wall -hide-all-packages
GHC library directory: CradleSuccess "/usr/local/Cellar/ghc/8.10.1_2/lib/ghc-8.10.1"
GHC version:           CradleSuccess "8.10.1"
Config Location:       No explicit config found
Cradle:                Cradle {cradleRootDir = "/Users/me/Exercism/haskell", cradleOptsProg = CradleAction: Default}
Dependencies:          hello-world.cabal cabal.project cabal.project.local

Thank you!

@jneira jneira added type: bug Something isn't working os: macos labels Oct 30, 2020
@fendor
Copy link
Collaborator

fendor commented Jul 20, 2021

Hi, thank you for the bug report!
Sorry for the delayed response, is this issue still relevant?

@armatures
Copy link
Author

I pulled the latest commits in this repo, ran cabal install to get the latest hie-bios. I then bumped the resolver field in my test project to the latest LTS package set. Running hie-bios check . gives a different error, so I'll close this issue and open a new one.

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

No branches or pull requests

3 participants