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

GHC ghc-devs at haskell.org
Thu May 17 07:08:41 UTC 2018


#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


More information about the ghc-tickets mailing list