[GHC] #15396: -staticlib is broken on GHC 8.4.3 on Linux under certain conditions

GHC ghc-devs at haskell.org
Tue Jul 17 10:21:32 UTC 2018


#15396: -staticlib is broken on GHC 8.4.3 on Linux under certain conditions
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.4.3
  (Linking)                          |
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by angerman):

 > Each data section is 2 byte aligned. If it would end on an odd offset, a
 newline ('\n', 0x0A) is used as filler.
 (from [https://en.wikipedia.org/wiki/Ar_%28Unix%29 wikipedia:ar (Unix)])

 That's pretty much what the `Ar` module fails to account for.

 For some reason `libHSbase-4.11.1.0.a` ends up having odd byte long object
 files. As such parsing the archive falls apart.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15396#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list