Debian Bug report logs - #428060
ghc6: FTBFS with gcc-4.2

version graph

Package: ghc6; Maintainer for ghc6 is Kari Pahula <kaol@debian.org>; Source for ghc6 is src:ghc.

Reported by: "Roderich Schupp" <roderich.schupp@googlemail.com>

Date: Fri, 8 Jun 2007 14:03:01 UTC

Severity: serious

Tags: lenny, sid

Merged with 443037

Found in version ghc6/6.6.1-2

Done: Ian Lynagh <igloo@earth.li>

Bug is archived. No further changes may be made.

Forwarded to http://hackage.haskell.org/trac/ghc/ticket/1427

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Ian Lynagh (wibble) <igloo@debian.org>:
Bug#428060; Package ghc6. Full text and rfc822 format available.

Acknowledgement sent to "Roderich Schupp" <roderich.schupp@googlemail.com>:
New Bug report received and forwarded. Copy sent to Ian Lynagh (wibble) <igloo@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: "Roderich Schupp" <roderich.schupp@googlemail.com>
To: submit@bugs.debian.org
Subject: ghc6: FTBFS with gcc-4.2
Date: Fri, 8 Jun 2007 15:53:22 +0200
Package: ghc6
Version: 6.6.1-2
Severity: normal

Trying to build ghc6 with gcc-4.2 as gcc results in:

...
------------------------------------------------------------------------
== /usr/bin/make all -wr -f Makefile;
in /var/tmp/build/stuff/ghc6-6.6.1/libraries/base
------------------------------------------------------------------------
../../compiler/ghc-inplace -H16m -O -fglasgow-exts -cpp -Iinclude
-"#include" HsBase.h -funbox-strict-fields -package-name  base-2.1.1
-O -Rghc-timing -fgenerics  -fgenerics -split-objs    -c
Data/Typeable.hs-boot -o Data/Typeable.o-boot  -ohi
Data/Typeable.hi-boot
<<ghc: 15624572 bytes, 5 GCs, 98272/98272 avg/max bytes residency (1
samples), 18M in use, 0.00 INIT (0.00 elapsed), 0.11 MUT (1.09
elapsed), 0.02 GC (0.04 elapsed) :ghc>>
../../compiler/ghc-inplace -H16m -O -fglasgow-exts -cpp -Iinclude
-"#include" HsBase.h -funbox-strict-fields -package-name  base-2.1.1
-O -Rghc-timing -fgenerics  -fgenerics -split-objs    -c
Data/Dynamic.hs-boot -o Data/Dynamic.o-boot  -ohi Data/Dynamic.hi-boot
<<ghc: 11938524 bytes, 4 GCs, 98224/98224 avg/max bytes residency (1
samples), 18M in use, 0.01 INIT (0.00 elapsed), 0.06 MUT (0.36
elapsed), 0.03 GC (0.03 elapsed) :ghc>>
../../compiler/ghc-inplace -H16m -O -fglasgow-exts -cpp -Iinclude
-"#include" HsBase.h -funbox-strict-fields -package-name  base-2.1.1
-O -Rghc-timing -fgenerics  -fgenerics -split-objs    -c
GHC/Err.lhs-boot -o GHC/Err.o-boot  -ohi GHC/Err.hi-boot
<<ghc: 18035540 bytes, 5 GCs, 99228/99228 avg/max bytes residency (1
samples), 18M in use, 0.01 INIT (0.00 elapsed), 0.12 MUT (0.59
elapsed), 0.03 GC (0.03 elapsed) :ghc>>
../../compiler/ghc-inplace -H16m -O -fglasgow-exts -cpp -Iinclude
-"#include" HsBase.h -funbox-strict-fields -package-name  base-2.1.1
-O -Rghc-timing -fgenerics  -fgenerics -split-objs    -c GHC/Base.lhs
-o GHC/Base.o  -ohi GHC/Base.hi
GHC/Base_split/.o::Base(void):(.data+0x0): multiple definition of
`base_GHCziBase_zeze_closure'
GHC/Base_split/Base__1.o:(.data+0x0): first defined here
GHC/Base_split/.o::Base(void): In function `base_GHCziBase_zeze_info':
ghc14747_0.hc:(.text+0xc): multiple definition of `base_GHCziBase_zeze_info'
GHC/Base_split/Base__1.o:ghc14747_0.hc:(.text+0xc): first defined here
GHC/Base_split/Base__3.o:(.data+0x0): multiple definition of
`base_GHCziBase_zeze_closure'
GHC/Base_split/Base__1.o:(.data+0x0): first defined here
GHC/Base_split/Base__3.o: In function `base_GHCziBase_zeze_info':
ghc14747_0.hc:(.text+0xc): multiple definition of `base_GHCziBase_zeze_info'
GHC/Base_split/Base__1.o:ghc14747_0.hc:(.text+0xc): first defined here
[more of the same elided]

The reason is that the split markers (__STG_SPLIT_MARKER in
includes/Stg.h) that the ghc compiler inserts into
C code are emitted differently into assembler with gcc-4.1 and gcc-4.2.
The latter seems to kind of delay them, so part of actual assembler code
is now before the first emitted split marker, which then is erroneously
taken as prologue material and copied into every split assembler source
resulting in lots of duplicate definitions.

As a temporary workaround, a build with --with-gcc=gcc-4.1 succeeds.

Cheers, Roderich

-- System Information:
Debian Release: lenny/sid
 APT prefers unstable
 APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.21.3 (PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages ghc6 depends on:
ii  gcc                       4:4.2.0-0      The GNU C compiler
ii  haskell-utils             1.9            Utilities used by the Debian Haske
ii  libc6                     2.5-8          GNU C Library: Shared libraries
ii  libgmp3-dev               2:4.2.1+dfsg-4 Multiprecision arithmetic library
ii  libgmp3c2                 2:4.2.1+dfsg-4 Multiprecision arithmetic library
ii  libncurses5               5.6-2          Shared libraries for terminal hand
ii  libreadline5              5.2-3          GNU readline and history libraries
ii  libreadline5-dev          5.2-3          GNU readline and history libraries
ii  perl [perl5]              5.8.8-7        Larry Wall's Practical Extraction

ghc6 recommends no packages.

-- no debconf information



Severity set to `important' from `normal' Request was from "brian m. carlson" <sandals@crustytoothpaste.ath.cx> to control@bugs.debian.org. (Wed, 25 Jul 2007 01:24:02 GMT) Full text and rfc822 format available.

Message sent on to "Roderich Schupp" <roderich.schupp@googlemail.com>:
Bug#428060. Full text and rfc822 format available.

Message #10 received at 428060-submitter@bugs.debian.org (full text, mbox):

From: "brian m. carlson" <sandals@crustytoothpaste.ath.cx>
To: 428060-submitter@bugs.debian.org
Subject: Use "volatile __asm__" for split markers
Date: Fri, 10 Aug 2007 08:04:59 +0000
[Message part 1 (text/plain, inline)]
gcc allows the reordering or rewriting of assembly (with the peephole
optimizer, for example) unless you use "volatile __asm__".  Submitter,
could you test the change and see if that works?

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
[signature.asc (application/pgp-signature, inline)]

Noted your statement that Bug has been forwarded to http://hackage.haskell.org/trac/ghc/ticket/1427. Request was from Ian Lynagh <ian@matrix.chaos.earth.li> to control@bugs.debian.org. (Wed, 22 Aug 2007 01:24:02 GMT) Full text and rfc822 format available.

Severity set to `serious' from `important' Request was from Matthias Klose <doko@cs.tu-berlin.de> to control@bugs.debian.org. (Sat, 01 Sep 2007 11:06:28 GMT) Full text and rfc822 format available.

Tags added: lenny, sid Request was from Kurt Roeckx <kurt@roeckx.be> to control@bugs.debian.org. (Sun, 02 Sep 2007 15:27:28 GMT) Full text and rfc822 format available.

Forcibly Merged 428060 443037. Request was from Arjan Oosting <arjan@debian.org> to control@bugs.debian.org. (Mon, 08 Oct 2007 20:30:02 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Ian Lynagh (wibble) <igloo@debian.org>:
Bug#428060; Package ghc6. Full text and rfc822 format available.

Acknowledgement sent to Arjan Oosting <arjan@debian.org>:
Extra info received and forwarded to list. Copy sent to Ian Lynagh (wibble) <igloo@debian.org>. Full text and rfc822 format available.

Message #23 received at 428060@bugs.debian.org (full text, mbox):

From: Arjan Oosting <arjan@debian.org>
To: Debian Haskell <debian-haskell@lists.urchin.earth.li>, 428060@bugs.debian.org
Cc: 445756@bugs.debian.org, 445751@bugs.debian.org, 445762@bugs.debian.org, 445754@bugs.debian.org, 445759@bugs.debian.org, 445760@bugs.debian.org
Subject: FTBFS: multiple definition of ...
Date: Mon, 08 Oct 2007 22:57:06 +0200
[Message part 1 (text/plain, inline)]
Hi people,

I just got a FTBFS bug report for my haskell-edison package [1] with the
title: "haskell-edison: FTBFS: multiple definition of
`EdisonAPIzm1zi2zi1_DataziEdisonziPrelude_zdp1Measured_closure'"

I see that there a couple of Haskell packages which also have FTBFS bug
reports with the same problem (which bug reports I have CC'ed). One of
these packages is ghc6 and that bugreport [2] tells me the problem is
caused by the 'new' gcc-4.2 we have in unstable and testing. 

The upstream bug report [3] says something about gcc 4.2 needing the
-fno-toplevel-reorder flag and that the bug is fixed for ghc in version
6.8:

> status changed from new to closed.
> resolution set to fixed.
> Fixed:
> 
> Tue Aug 21 16:15:53 BST 2007  Simon Marlow <simonmar@microsoft.com>
>  * FIX #1427, #1569: gcc 4.2.x needs -fno-toplevel-reorder

I tried to fix the FTBFS of haskell-edison by explicitly adding the
-fno-toplevel-reorder flag to the call to cc (ghc ... -opt-c
-fno-toplevel-reorder) but this had no effect. 

After I also stopped using the --enable-split-objs ghc flag, I could
compile haskell-edison again.

I have a couple of questions though which you might be able to awnser:
      * I assume this workaround is only needed until ghc 6.8 to enters
        the archive? 
      * Also in the upstream bug report I see nothing about
        --enable-split-objs. Is this tested with cvs version of ghc? 

Greetings Arjan

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=445754
[2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=428060
[3] http://hackage.haskell.org/trac/ghc/ticket/1427
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Ian Lynagh (wibble) <igloo@debian.org>:
Bug#428060; Package ghc6. Full text and rfc822 format available.

Acknowledgement sent to Arjan Oosting <arjanoosting@home.nl>:
Extra info received and forwarded to list. Copy sent to Ian Lynagh (wibble) <igloo@debian.org>. Full text and rfc822 format available.

Message #28 received at 428060@bugs.debian.org (full text, mbox):

From: Arjan Oosting <arjanoosting@home.nl>
To: Debian Haskell <debian-haskell@lists.urchin.earth.li>
Cc: 428060@bugs.debian.org, 445756@bugs.debian.org, 445751@bugs.debian.org, 445762@bugs.debian.org, 445754@bugs.debian.org, 445759@bugs.debian.org, 445760@bugs.debian.org
Subject: Re: FTBFS: multiple definition of ...
Date: Mon, 08 Oct 2007 23:30:08 +0200
[Message part 1 (text/plain, inline)]
Op maandag 08-10-2007 om 22:57 uur [tijdzone +0200], schreef Arjan
Oosting:
> I tried to fix the FTBFS of haskell-edison by explicitly adding the
> -fno-toplevel-reorder flag to the call to cc (ghc ... -opt-c
> -fno-toplevel-reorder) but this had no effect. 
> 
> After I also stopped using the --enable-split-objs ghc flag, I could
> compile haskell-edison again.

I have tried a little bit more and I do not need the "-opt-c
-fno-toplevel-reorder" ghc flag but only need to remove the
--enable-split-objs ./setup flag to fix the FTBFS of haskell-edison

Greetings Arjan   
[signature.asc (application/pgp-signature, inline)]

Blocking bugs of 443053 added: 428060 and 443037 Request was from Mike O'Connor <stew@vireo.org> to control@bugs.debian.org. (Wed, 31 Oct 2007 12:30:04 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Ian Lynagh (wibble) <igloo@debian.org>:
Bug#428060; Package ghc6. Full text and rfc822 format available.

Acknowledgement sent to Ana Guerrero <ana@debian.org>:
Extra info received and forwarded to list. Copy sent to Ian Lynagh (wibble) <igloo@debian.org>. Full text and rfc822 format available.

Message #35 received at 428060@bugs.debian.org (full text, mbox):

From: Ana Guerrero <ana@debian.org>
To: 428060@bugs.debian.org
Cc: Ian Lynagh <igloo@debian.org>
Subject: Re: Bug#428060: ghc6: FTBFS with gcc-4.2
Date: Sun, 13 Jan 2008 13:53:04 +0100
Hi Ian,

t
On Fri, Jun 08, 2007 at 03:53:22PM +0200, Roderich Schupp wrote:
> Package: ghc6
> Version: 6.6.1-2
> Severity: normal
>
> Trying to build ghc6 with gcc-4.2 as gcc results in:
>
> ...
> ------------------------------------------------------------------------
> == /usr/bin/make all -wr -f Makefile;
> in /var/tmp/build/stuff/ghc6-6.6.1/libraries/base
> ------------------------------------------------------------------------
> ../../compiler/ghc-inplace -H16m -O -fglasgow-exts -cpp -Iinclude
> -"#include" HsBase.h -funbox-strict-fields -package-name  base-2.1.1
> -O -Rghc-timing -fgenerics  -fgenerics -split-objs    -c
> Data/Typeable.hs-boot -o Data/Typeable.o-boot  -ohi
> Data/Typeable.hi-boot
> <<ghc: 15624572 bytes, 5 GCs, 98272/98272 avg/max bytes residency (1
> samples), 18M in use, 0.00 INIT (0.00 elapsed), 0.11 MUT (1.09
> elapsed), 0.02 GC (0.04 elapsed) :ghc>>
> ../../compiler/ghc-inplace -H16m -O -fglasgow-exts -cpp -Iinclude
> -"#include" HsBase.h -funbox-strict-fields -package-name  base-2.1.1
> -O -Rghc-timing -fgenerics  -fgenerics -split-objs    -c
> Data/Dynamic.hs-boot -o Data/Dynamic.o-boot  -ohi Data/Dynamic.hi-boot
> <<ghc: 11938524 bytes, 4 GCs, 98224/98224 avg/max bytes residency (1
> samples), 18M in use, 0.01 INIT (0.00 elapsed), 0.06 MUT (0.36
> elapsed), 0.03 GC (0.03 elapsed) :ghc>>
> ../../compiler/ghc-inplace -H16m -O -fglasgow-exts -cpp -Iinclude
> -"#include" HsBase.h -funbox-strict-fields -package-name  base-2.1.1
> -O -Rghc-timing -fgenerics  -fgenerics -split-objs    -c
> GHC/Err.lhs-boot -o GHC/Err.o-boot  -ohi GHC/Err.hi-boot
> <<ghc: 18035540 bytes, 5 GCs, 99228/99228 avg/max bytes residency (1
> samples), 18M in use, 0.01 INIT (0.00 elapsed), 0.12 MUT (0.59
> elapsed), 0.03 GC (0.03 elapsed) :ghc>>
> ../../compiler/ghc-inplace -H16m -O -fglasgow-exts -cpp -Iinclude
> -"#include" HsBase.h -funbox-strict-fields -package-name  base-2.1.1
> -O -Rghc-timing -fgenerics  -fgenerics -split-objs    -c GHC/Base.lhs
> -o GHC/Base.o  -ohi GHC/Base.hi
> GHC/Base_split/.o::Base(void):(.data+0x0): multiple definition of
> `base_GHCziBase_zeze_closure'
> GHC/Base_split/Base__1.o:(.data+0x0): first defined here
> GHC/Base_split/.o::Base(void): In function `base_GHCziBase_zeze_info':
> ghc14747_0.hc:(.text+0xc): multiple definition of `base_GHCziBase_zeze_info'
> GHC/Base_split/Base__1.o:ghc14747_0.hc:(.text+0xc): first defined here
> GHC/Base_split/Base__3.o:(.data+0x0): multiple definition of
> `base_GHCziBase_zeze_closure'
> GHC/Base_split/Base__1.o:(.data+0x0): first defined here
> GHC/Base_split/Base__3.o: In function `base_GHCziBase_zeze_info':
> ghc14747_0.hc:(.text+0xc): multiple definition of `base_GHCziBase_zeze_info'
> GHC/Base_split/Base__1.o:ghc14747_0.hc:(.text+0xc): first defined here
> [more of the same elided]
>
> The reason is that the split markers (__STG_SPLIT_MARKER in
> includes/Stg.h) that the ghc compiler inserts into
> C code are emitted differently into assembler with gcc-4.1 and gcc-4.2.
> The latter seems to kind of delay them, so part of actual assembler code
> is now before the first emitted split marker, which then is erroneously
> taken as prologue material and copied into every split assembler source
> resulting in lots of duplicate definitions.
>
> As a temporary workaround, a build with --with-gcc=gcc-4.1 succeeds.
>

This bug seems to be fixed in newer versions according to upstream's
track: could you update the package?

Ana




Reply sent to Ian Lynagh <igloo@earth.li>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to "Roderich Schupp" <roderich.schupp@googlemail.com>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #40 received at 428060-done@bugs.debian.org (full text, mbox):

From: Ian Lynagh <igloo@earth.li>
To: 428060-done@bugs.debian.org
Subject: Fixed in 6.8.2-1
Date: Sun, 13 Jan 2008 21:17:01 +0000
This is fixed in 6.8.2-1.


Thanks
Ian





Reply sent to Ian Lynagh <igloo@earth.li>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Lucas Nussbaum <lucas@lucas-nussbaum.net>:
Bug acknowledged by developer. Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 13 Feb 2008 07:39:12 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 01:48:41 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.