Bugs item #586934, was opened at 2002-07-26 10:32 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=586934&group_id=8032
Category: Compiler Group: 5.04 Status: Open Resolution: None Priority: 5 Submitted By: geoff (snailtalk) Assigned to: Simon Marlow (simonmar) Summary: ghc fail build with gcc 3.1 Initial Comment: ghc will fail to build with newer gcc if -O is given to ghc. Comfirmed with gcc 3.1, and most probably the upcoming 3.2 as well. Prologue junk?: .globl __stginit_Main __stginit_Main: pushl %ebp movl %esp, %ebp is the ghc complaint (looks like a function prologue in ASM). Temporary fix is to compile with -O -fasm. Note that this also means that you will be unable to bootstrap ghc from source if you have a newer gcc installed on your system. Verified on Linux/x86 only. ---------------------------------------------------------------------- Comment By: Duncan Coutts (duncan_coutts) Date: 2002-09-30 12:57 Message: Logged In: YES user_id=36779 I got exactly this error too. I managed to build ghc 5.04 from source using an older binary package of ghc by doing: install an older gcc: rpm -i gcc-2.96 then using some configury (from memory - appologies for mistakes) ./configure --with-hc=''ghc -pgmcgcc-2.96" \ --with-ghc="ghc -pgmcgcc-2.96" \ --with-gcc="gcc-2.96" This was on Mandrake 9.0, which uses gcc 3.2. It would probably work on the new RH 8 too since it provides an older gcc-2.96 too. I'm going to have a go at building ghc to use gcc 3.2 ---------------------------------------------------------------------- Comment By: geoff (snailtalk) Date: 2002-09-18 11:23 Message: Logged In: YES user_id=20846 That would seem to explain things a bit, since it is possible that the Mandrake gcc 3.1 package were using some snapshot of gcc which could have exhibited this problem, and such problem is also present in the current gcc 3.2. ---------------------------------------------------------------------- Comment By: Simon Marlow (simonmar) Date: 2002-09-18 11:01 Message: Logged In: YES user_id=48280 The problem is that the ghc 5.02.3 installed on your machine is using GCC 3.2, and there were some problems with this. In order to bootstrap 5.04, you will need an older GCC installed. After compiling 5.04, you can upgrade GCC again. ---------------------------------------------------------------------- Comment By: geoff (snailtalk) Date: 2002-09-18 10:47 Message: Logged In: YES user_id=20846 Ah, perhaps I should have been a bit clearer. I was trying to build ghc 5.04 on a machine with ghc 5.02.3 installed. Anyway, since cooker is a development distribution, I retried to reproduce this problem with success. Installed gcc is gcc-3.2-1mdk and ghc-5.02.3-2mdk. Note that ghc used to be available in the Mandrake contrib, it is not there anymore because it does not build with the new gcc, so it was possibly removed. The spec file is still in CVS, grab it here: http://cvs.mandrakesoft.com/cgi-bin/cvsweb.cgi/~checkout~/contrib-SPECS/ghc/ghc.spec?rev=1.12&content-type=text/plain You can remove the Patch: field in the spec file as it is not necessary to make the problem reproduce. ---------------------------------------------------------------------- Comment By: Simon Marlow (simonmar) Date: 2002-09-18 09:47 Message: Logged In: YES user_id=48280 The original reporter was building 5.02.3; there were several GCC 3.x related fixes that went into 5.04, so I suggest upgrading. I'll take a look at GCC 3.2 and investigate the new warnings. ---------------------------------------------------------------------- Comment By: Matthew Walton (matthewwalton) Date: 2002-09-18 08:49 Message: Logged In: YES user_id=110768 This is happening to me. Gentoo Linux (on x86) built with GCC 3.2 (but not the official 1.4 release using GCC 3.2, I hacked this one together myself), building GHC with GCC 3.2 using the ebuild scripts from Portage. As well as the GHC complaint here, I also see lots of messages from GCC itself apparently complaining about the validity of the HC files I'm bootstrapping from. For example: CTypesISO.hc:20090: warning: (near initialization for `CTypesISO_zdfIntegralCPtrdiff_closure.payload') CTypesISO.hc:20090: warning: excess elements in array initializer I assume this has something to do with GCC 3.2 having differing ideas about what constitutes valid C. I know they're not errors, but they're worth noting, as well as some warnings about excess tokens at the end of #endif. ---------------------------------------------------------------------- Comment By: geoff (snailtalk) Date: 2002-09-07 06:53 Message: Logged In: YES user_id=20846 Linux version is 2.4.18 kernel, Mandrake cooker. (development distribution). gcc installed is gcc 3.2 from Mandrake cooker. ghc is 5.02.3. Note that it appears not to happen under Debian unstable with their gcc3.2. ---------------------------------------------------------------------- Comment By: Simon Marlow (simonmar) Date: 2002-09-02 14:43 Message: Logged In: YES user_id=48280 I've tried to reproduce this and can't. Could you describe *exactly* what you did to cause the error, including: - Linux flavour/version - what version(s) of gcc are installed, under which names - similarly for GHC Thanks. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=586934&group_id=8032 _______________________________________________ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs