Compiling bytestring-mmap with -fvia-C yields broken .s file, two .size directives
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
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.0.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |