#5043: Compiling bytestring-mmap with -fvia-C yields broken .s file, two .size
directives
-------------------------------+--------------------------------------------
    Reporter:  jeffwheeler     |       Owner:                    
        Type:  bug             |      Status:  new               
    Priority:  normal          |   Component:  Compiler          
     Version:  7.0.2           |    Keywords:                    
    Testcase:                  |   Blockedby:                    
          Os:  Linux           |    Blocking:                    
Architecture:  x86_64 (amd64)  |     Failure:  Compile-time crash
-------------------------------+--------------------------------------------
 I tried to install the bytestring-mmap package, which specifies in its
 cabal file the option -fvia-C (when this is removed, the package compiles
 fine).

 I'm using GHC 7.0.2 (installed Haskell Platform recently) on x86_64
 (Ubuntu 11.04). On my system, I can reliably reproduce with simply

 {{{
 $ cabal install bytestring-mmap-0.2.1
 }}}

 To get the .s file I attached, you need to unpack the package, edit the
 cabal file to include the GHC option `-keep-tmp-files`, and then `cabal
 install` there. The error shows the location of the .s file:

 {{{
 bytestring-mmap-0.2.1$ cabal install
 Resolving dependencies...
 Configuring bytestring-mmap-0.2.1...
 Preprocessing library bytestring-mmap-0.2.1...
 Building bytestring-mmap-0.2.1...
 [1 of 3] Compiling System.IO.Posix.MMap.Internal (
 System/IO/Posix/MMap/Internal.hs,
 dist/build/System/IO/Posix/MMap/Internal.o )
 /tmp/ghc1834_0/ghc1834_0.s: Assembler messages:

 /tmp/ghc1834_0/ghc1834_0.s:859:0:
      Error: .size expression for
 __stginit_bytestringzmmmapzm0zi2zi1_SystemziIOziPosixziMMapziInternal does
 not evaluate to a constant
 cabal: Error: some packages failed to install:
 bytestring-mmap-0.2.1 failed during the building phase. The exception was:
 ExitFailure 1
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5043>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to