[GHC] #15160: unregistersied GHC can't be built with ghc-HEAD: has no member named 'srt'

#15160: unregistersied GHC can't be built with ghc-HEAD: has no member named 'srt' -------------------------------------+------------------------------------- Reporter: slyfox | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- 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?): {{{#!hs 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 } }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15160 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15160: unregistersied GHC can't be built with ghc-HEAD: has no member named 'srt' -------------------------------------+------------------------------------- Reporter: slyfox | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 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 simonmar): What GHC version were you using to bootstrap with? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15160#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15160: unregistersied GHC can't be built with ghc-HEAD: has no member named 'srt' -------------------------------------+------------------------------------- Reporter: slyfox | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 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 slyfox): {{{ $ x86_64-HEAD-linux-gnu-ghc --version The Glorious Glasgow Haskell Compilation System, version 8.5.20180509 }}} {{{ $ x86_64-HEAD-linux-gnu-ghc --info [("Project name","The Glorious Glasgow Haskell Compilation System") ,("GCC extra via C opts"," -fwrapv -fno-builtin") ,("C compiler command","x86_64-HEAD-linux-gnu-gcc") ,("C compiler flags"," -fno-stack-protector") ,("C compiler link flags"," ") ,("C compiler supports -no-pie","YES") ,("Haskell CPP command","x86_64-HEAD-linux-gnu-gcc") ,("Haskell CPP flags","-E -undef -traditional") ,("ld command","x86_64-HEAD-linux-gnu-ld") ,("ld flags","") ,("ld supports compact unwind","YES") ,("ld supports build-id","YES") ,("ld supports filelist","NO") ,("ld is GNU ld","YES") ,("ar command","x86_64-HEAD-linux-gnu-ar") ,("ar flags","q") ,("ar supports at file","YES") ,("ranlib command","x86_64-HEAD-linux-gnu-ranlib") ,("touch command","touch") ,("dllwrap command","x86_64-HEAD-linux-gnu-dllwrap") ,("windres command","x86_64-HEAD-linux-gnu-windres") ,("libtool command","libtool") ,("perl command","/usr/bin/perl") ,("cross compiling","YES") ,("target os","OSLinux") ,("target arch","ArchX86_64") ,("target word size","8") ,("target has GNU nonexec stack","True") ,("target has .ident directive","True") ,("target has subsections via symbols","False") ,("target has RTS linker","YES") ,("Unregisterised","NO") ,("LLVM llc command","llc") ,("LLVM opt command","opt") ,("LLVM clang command","clang") ,("Project version","8.5.20180509") ,("Project Git commit id","5fe6aaa3756cda654374ebfd883fa8f064ff64a4") ,("Booter version","8.5.20180413") ,("Stage","1") ,("Build platform","x86_64-unknown-linux") ,("Host platform","x86_64-unknown-linux") ,("Target platform","x86_64-HEAD-linux") ,("Have interpreter","YES") ,("Object splitting supported","YES") ,("Have native code generator","YES") ,("Support SMP","NO") ,("Tables next to code","YES") ,("RTS ways","l debug thr thr_debug thr_l dyn debug_dyn thr_dyn thr_debug_dyn l_dyn thr_l_dyn") ,("RTS expects libdw","NO") ,("Support dynamic-too","YES") ,("Support parallel --make","YES") ,("Support reexported-modules","YES") ,("Support thinning and renaming package flags","YES") ,("Support Backpack","YES") ,("Requires unified installed package IDs","YES") ,("Uses package keys","YES") ,("Uses unit IDs","YES") ,("Dynamic by default","NO") ,("GHC Dynamic","NO") ,("GHC Profiled","NO") ,("Leading underscore","NO") ,("Debug on","False") ,("LibDir","/usr/lib64/x86_64-HEAD-linux-gnu-ghc-8.5.20180509") ,("Global Package DB","/usr/lib64/x86_64-HEAD-linux-gnu- ghc-8.5.20180509/package.conf.d") ] }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15160#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15160: unregistersied GHC can't be built with ghc-HEAD: has no member named 'srt' -------------------------------------+------------------------------------- Reporter: slyfox | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 Resolution: invalid | 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: | -------------------------------------+------------------------------------- Changes (by simonmar): * status: new => closed * resolution: => invalid Comment: So this is the problem: we don't officially support building GHC with an arbitrary HEAD snapshot, only released versions. In this case it failed because the `#if __GLASGOW_HASKELL__ > 804` was true, but you wanted it to be false for your snapshot. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15160#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15160: unregistersied GHC can't be built with ghc-HEAD: has no member named 'srt' -------------------------------------+------------------------------------- Reporter: slyfox | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 Resolution: invalid | 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 slyfox): Oh, I keep forgetting the rule about unsupported bootstrap from snapshot. Sorry for the noise! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15160#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC