unregistersied GHC can't be built with ghc-HEAD: has no member named 'srt'
Tried to build a few unregisterised targets today. All fail the same as x86_64 unregisterised:
$ ./configure --enable-unregisterised --with-ghc=x86_64-HEAD-linux-gnu-ghc --enable-bootstrap-with-devel-snapshot --disable-ld-override
$ make
HSC2HS libraries/ghci/dist-boot/build/GHCi/InfoTable.hs
In file included from /usr/x86_64-HEAD-linux-gnu/usr/include/bits/_G_config.h:19,
from /usr/x86_64-HEAD-linux-gnu/usr/include/bits/libio.h:35,
from /usr/x86_64-HEAD-linux-gnu/usr/include/stdio.h:41,
from /usr/lib64/x86_64-HEAD-linux-gnu-ghc-8.5.20180509/include/rts/Flags.h:16,
from /usr/lib64/x86_64-HEAD-linux-gnu-ghc-8.5.20180509/include/Rts.h:191,
from InfoTable.hsc:4:
InfoTable.hsc: In function 'main':
/home/slyfox/dev/git/ghc-unreg/inplace/lib/template-hsc.h:75:24: error: 'StgInfoTable' {aka 'struct StgInfoTable_'} has no member named 'srt'
(long) offsetof (t, f));
^~~~~~~~
Looks like this code needs an update against srt / has_srt (or it's another case of leaking build GHC headers into host ghc?):
peekItbl :: Ptr StgInfoTable -> IO StgInfoTable
peekItbl a0 = do
#if defined(TABLES_NEXT_TO_CODE)
let entry' = Nothing
#else
entry' <- Just <$> (#peek StgInfoTable, entry) a0
#endif
ptrs' <- (#peek StgInfoTable, layout.payload.ptrs) a0
nptrs' <- (#peek StgInfoTable, layout.payload.nptrs) a0
tipe' <- (#peek StgInfoTable, type) a0
#if __GLASGOW_HASKELL__ > 804
srtlen' <- (#peek StgInfoTable, srt) a0
#else
srtlen' <- (#peek StgInfoTable, srt_bitmap) a0
#endif
return StgInfoTable
{ entry = entry'
, ptrs = ptrs'
, nptrs = nptrs'
, tipe = tipe'
, srtlen = srtlen'
, code = Nothing
}
Trac metadata
Trac field | Value |
---|---|
Version | 8.2.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | simonmar |
Operating system | |
Architecture |