Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,865
    • Issues 4,865
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 461
    • Merge requests 461
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #17193
Closed
Open
Created Sep 14, 2019 by Simon Jakobi@sjakobiDeveloper

Hadrian builds with wrong GHC

Summary

Hadrian seems to ignore that I configured using ghc-8.6.5, and builds with the default ghc /opt/ghc/bin/ghc, version 8.8.1, instead. Then it seems to run into #17146 (closed).

How can I work around this?

Steps to reproduce

$ ./boot; ./configure GHC=ghc-8.6.5
$ ./hadrian/build.sh -j --flavour=quick
...
Error when running Shake build system:
  at action, called at src/Rules.hs:70:19 in main:Rules
  at need, called at src/Rules.hs:92:5 in main:Rules
* Depends on: _build/stage0/lib/package.conf.d/ghc-8.9.0.20190914.conf
  at need, called at src/Rules/Register.hs:113:5 in main:Rules.Register
* Depends on: _build/stage0/compiler/build/libHSghc-8.9.0.20190914.a
  at need, called at src/Rules/Library.hs:144:5 in main:Rules.Library
* Depends on: _build/stage0/compiler/build/c/parser/cutils.o
* Raised the exception:
user error (Development.Shake.cmd, system command failed
Command line: /opt/ghc/bin/ghc -Wall -hisuf hi -osuf o -hcsuf hc -static -hide-all-packages -no-user-package-db '-package-db _build/stage0/lib/package.conf.d' '-this-unit-id ghc-8.9.0.20190914' '-package-id array-0.5.4.0' '-package-id base-4.13.0.0' '-package-id binary-0.8.7.0' '-package-id bytestring-0.10.9.0' '-package-id containers-0.6.2.1' '-package-id deepseq-1.4.4.0' '-package-id directory-1.3.3.2' '-package-id filepath-1.4.2.1' '-package-id ghc-boot-8.9.0.20190914' '-package-id ghc-boot-th-8.9.0.20190914' '-package-id ghc-heap-8.9.0.20190914' '-package-id ghci-8.9.0.20190914' '-package-id hpc-0.6.0.3' '-package-id process-1.6.5.1' '-package-id template-haskell-2.16.0.0' '-package-id terminfo-0.4.1.4' '-package-id time-1.9.3' '-package-id transformers-0.5.6.2' '-package-id unix-2.7.2.2' -i -i_build/stage0/compiler/build -i_build/stage0/compiler/build/autogen -icompiler/. -icompiler/backpack -icompiler/basicTypes -icompiler/cmm -icompiler/coreSyn -icompiler/deSugar -icompiler/ghci -icompiler/hsSyn -icompiler/iface -icompiler/llvmGen -icompiler/main -icompiler/nativeGen -icompiler/parser -icompiler/prelude -icompiler/profiling -icompiler/rename -icompiler/simplCore -icompiler/simplStg -icompiler/specialise -icompiler/stgSyn -icompiler/stranal -icompiler/typecheck -icompiler/types -icompiler/utils -icompiler/hieFile -Iincludes -I_build/generated -I_build/stage0/compiler/build -I_build/stage0/compiler/build/. -I_build/stage0/compiler/build/parser -I_build/stage0/compiler/build/utils -Icompiler/. -Icompiler/parser -Icompiler/utils -I/opt/ghc/8.8.1/lib/ghc-8.8.1/process-1.6.5.1/include -I/opt/ghc/8.8.1/lib/ghc-8.8.1/unix-2.7.2.2/include -I/opt/ghc/8.8.1/lib/ghc-8.8.1/time-1.9.3/include -I/opt/ghc/8.8.1/lib/ghc-8.8.1/bytestring-0.10.9.0/include -I/opt/ghc/8.8.1/lib/ghc-8.8.1/base-4.13.0.0/include -I/opt/ghc/8.8.1/lib/ghc-8.8.1/integer-gmp-1.0.2.0/include -I/opt/ghc/8.8.1/lib/ghc-8.8.1/include -I_build/generated -optc-I_build/generated -optP-include -optP_build/stage0/compiler/build/autogen/cabal_macros.h -optP-DHAVE_EXTERNAL_INTERPRETER -optP-DHAVE_INTERPRETER -outputdir _build/stage0/compiler/build -optc-Iincludes -optc-I_build/generated -optc-I_build/stage0/compiler/build -optc-I_build/stage0/compiler/build/. -optc-I_build/stage0/compiler/build/parser -optc-I_build/stage0/compiler/build/utils -optc-Icompiler/. -optc-Icompiler/parser -optc-Icompiler/utils -optc-I/opt/ghc/8.8.1/lib/ghc-8.8.1/process-1.6.5.1/include -optc-I/opt/ghc/8.8.1/lib/ghc-8.8.1/unix-2.7.2.2/include -optc-I/opt/ghc/8.8.1/lib/ghc-8.8.1/time-1.9.3/include -optc-I/opt/ghc/8.8.1/lib/ghc-8.8.1/bytestring-0.10.9.0/include -optc-I/opt/ghc/8.8.1/lib/ghc-8.8.1/base-4.13.0.0/include -optc-I/opt/ghc/8.8.1/lib/ghc-8.8.1/integer-gmp-1.0.2.0/include -optc-I/opt/ghc/8.8.1/lib/ghc-8.8.1/include -optc-Werror=unused-but-set-variable -optc-Wno-error=inline -c compiler/parser/cutils.c -o _build/stage0/compiler/build/c/parser/cutils.o -O0 -H64m -Wall -Wno-name-shadowing -Wnoncanonical-monad-instances -Wnoncanonical-monoid-instances -this-unit-id ghc -XHaskell2010 -XNoImplicitPrelude -DSTAGE=1 -O2 -fno-warn-deprecated-flags
Exit code: 1
Stderr:
In file included from includes/Rts.h:197:0: error:
    0,
                     from compiler/parser/cutils.c:6:
includes/rts/storage/ClosureMacros.h: In function ‘GET_CLOSURE_TAG’:

includes/rts/storage/ClosureMacros.h:211:25: error:
     error: ‘TAG_MASK’ undeclared (first use in this function)
         return (StgWord)p & TAG_MASK;
                             ^
    |
211 |     return (StgWord)p & TAG_MASK;
    |                         ^

includes/rts/storage/ClosureMacros.h:211:25: error:
     note: each undeclared identifier is reported only once for each function it appears in
    |
211 |     return (StgWord)p & TAG_MASK;
    |                         ^
includes/rts/storage/ClosureMacros.h: In function ‘UNTAG_CLOSURE’:

includes/rts/storage/ClosureMacros.h:217:40: error:
     error: ‘TAG_MASK’ undeclared (first use in this function)
         return (StgClosure*)((StgWord)p & ~TAG_MASK);
                                            ^
    |
217 |     return (StgClosure*)((StgWord)p & ~TAG_MASK);
    |                                        ^
includes/rts/storage/ClosureMacros.h: In function ‘UNTAG_CONST_CLOSURE’:

includes/rts/storage/ClosureMacros.h:223:46: error:
     error: ‘TAG_MASK’ undeclared (first use in this function)
         return (const StgClosure*)((StgWord)p & ~TAG_MASK);
                                                  ^
    |
223 |     return (const StgClosure*)((StgWord)p & ~TAG_MASK);
    |                                              ^
`gcc' failed in phase `C Compiler'. (Exit code: 1)
)

Expected behavior

Hadrian should build with ghc-8.6.5 as configured.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking