[GHC] #11505: Boot file problem
GHC
ghc-devs at haskell.org
Wed Sep 21 20:12:49 UTC 2016
#11505: Boot file problem
-------------------------------------+-------------------------------------
Reporter: augustss | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by jberryman):
I can repro what looks like a similar issue on HEAD, but I don't have a
good test yet. I'm experimenting building GHC with the following build
flavour:
{{{
SRC_HC_OPTS = -O -H64m
GhcStage1HcOpts = -O
GhcStage2HcOpts = -O2 -XStrictData -XUnboxedSums -funbox-strict-fields
-fexpose-all-unfoldings -flate-dmd-anal -fmax-simplifier-iterations=8
-funfolding-use-threshold=120 -fstatic-argument-transformation -fsimpl-
tick-factor=100000
GhcLibHcOpts = -O2 -XUnboxedSums -funbox-strict-fields -flate-dmd-
anal -fmax-simplifier-iterations=8 -funfolding-use-threshold=120 -fsimpl-
tick-factor=100000
BUILD_PROF_LIBS = NO
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
BUILD_SPHINX_PDF = NO
BUILD_MAN = NO
}}}
Where the error pops up building stage2:
{{{
"inplace/bin/ghc-stage1" -hisuf hi -osuf o -hcsuf hc -static -O -H64m
-Wall -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header
-Iincludes/dist-ghcconstants/header -this-unit-i
d ghc-8.1 -hide-all-packages -i -icompiler/basicTypes -icompiler/cmm
-icompiler/codeGen -icompiler/coreSyn -icompiler/deSugar -icompiler/ghci
-icompiler/hsSyn -icompiler/iface -icompiler/llvmGen -i
compiler/main -icompiler/nativeGen -icompiler/parser -icompiler/prelude
-icompiler/profiling -icompiler/rename -icompiler/simplCore
-icompiler/simplStg -icompiler/specialise -icompiler/stgSyn -icom
piler/stranal -icompiler/typecheck -icompiler/types -icompiler/utils
-icompiler/vectorise -icompiler/stage2/build -Icompiler/stage2/build
-icompiler/stage2/build/./autogen -Icompiler/stage2/build/.
/autogen -Icompiler/. -Icompiler/parser -Icompiler/utils
-Icompiler/../rts/dist/build -Icompiler/stage2 -optP-DGHCI -optP-include
-optPcompiler/stage2/build/./autogen/cabal_macros.h -package-id a
rray-0.5.1.1 -package-id base-4.9.0.0 -package-id binary-0.8.3.0 -package-
id bytestring-0.10.8.1 -package-id containers-0.5.7.1 -package-id
deepseq-1.4.2.0 -package-id directory-1.2.6.2 -package-id
filepath-1.4.1.0 -package-id ghc-boot-8.1 -package-id ghci-8.1 -package-
id hoopl-3.10.2.1 -package-id hpc-0.6.0.3 -package-id process-1.4.2.0
-package-id template-haskell-2.11.0.0 -package-id time
-1.6.0.1 -package-id transformers-0.5.2.0 -package-id unix-2.7.2.0 -Wall
-fno-warn-name-shadowing -this-unit-id ghc -XHaskell2010 -optc-
DTHREADED_RTS -DGHCI_TABLES_NEXT_TO_CODE -DSTAGE=2 -Rghc-timi
ng -O2 -XStrictData -XUnboxedSums -funbox-strict-fields -fexpose-all-
unfoldings -flate-dmd-anal -fmax-simplifier-iterations=8 -funfolding-use-
threshold=120 -fstatic-argument-transformation -fsimpl
-tick-factor=100000 -no-user-package-db -rtsopts -Wnoncanonical-
monad-instances -odir compiler/stage2/build -hidir compiler/stage2/build
-stubdir compiler/stage2/build -dynamic-too -c comp
iler/basicTypes/ConLike.hs -o compiler/stage2/build/ConLike.o -dyno
compiler/stage2/build/ConLike.dyn_o
compiler/basicTypes/ConLike.hs:50:1: error:
Type constructor ‘ConLike’ has conflicting definitions in the module
and its hs-boot file
Main module: data ConLike
= RealDataCon {-# UNPACK #-}DataCon
| PatSynCon {-# UNPACK #-}PatSyn
Boot file: data ConLike
= RealDataCon !DataCon | PatSynCon !PatSyn
The constructors do not match:
The strictness annotations for ‘RealDataCon’ differ
The strictness annotations for ‘PatSynCon’ differ
<<ghc: 246434928 bytes, 111 GCs, 12727312/40013680 avg/max bytes residency
(7 samples), 83M in use, 0.000 INIT (0.000 elapsed), 0.130 MUT (0.135
elapsed), 0.179 GC (0.179 elapsed) :ghc>>
compiler/ghc.mk:577: recipe for target 'compiler/stage2/build/ConLike.o'
failed
make[1]: *** [compiler/stage2/build/ConLike.o] Error 1
}}}
Yet I can't repro with the original test case above, even when I pass all
the flags I specify in the flavor above:
{{{
$ ~/inplace/bin/ghc-stage1 -O2 -XStrictData -XUnboxedSums -funbox-strict-
fields -fexpose-all-unfoldings -flate-dmd-anal -fmax-simplifier-
iterations=8 -funfolding-use-threshold=120 -fstatic-argument-
transformation -fsimpl-tick-factor=100000 -c /tmp/Foo.hs-boot
...and so on for Bar.hs and Foo.hs
}}}
No error is thrown. I don't understand enough of the way ghc-stage1 is
being called in the ghc build's invocation to know where to begin
experimenting further with this.
Note, you have to put spaces around occurences of `#.` from
`Data.Functor.Utils` for UnboxedSums to get the compile to go this far,
but otherwise my ghc tree is unmodified from 14c2e8e0c11b
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11505#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list