Re: Build failures on Mac OS X 10.5

2007-05-24 Thread Simon Marlow

Deborah Goldsmith wrote:

On May 23, 2007, at 2:08 AM, Simon Marlow wrote:

Deborah Goldsmith wrote:

On May 22, 2007, at 1:59 AM, Christian Maeder wrote:

What are you trying to achieve? Did you compile parts with ghc-6.6 and
ghc-6.6.1? (That may explain the crash.)

If you have installed my binary distribution you don't need to compile
the sources anymore (except for the sake of testing).
This is purely for the sake of testing. As the subject indicates, I'm 
trying to build GHC from source on 10.5. I've built earlier versions 
successfully on 10.4.
I did do a make clean between attempts, but I will try throwing the 
source directory away and re-extracting from the tar archive next.


One possibility is that if you compiled GHC via C (I believe this is 
still the default in 6.6.1), then changes in the gcc shipped with 10.5 
might be causing problems.  You might get further by adding


SRC_HC_OPTS = -O -fasm
GhcStage1HcOpts = -O -fasm
GhcStage2HcOpts = -O -fasm
GhcLibHcOpts= -O -fasm

to your mk/build.mk.  This might fix your build, but you'll still be 
left with some incompatibility between GHC and the gcc in 10.5.  You 
already encountered one such problem, when using -split-objs, right?  
If you get a successful build it should be easier to debug this.


I already have a usable build -- the 6.6.1 binary release that Christian 
put together works fine on 10.5.


Actually there appears to be a problem with that 6.6.1 binary release, at least 
on your system.  Both crashes that you described were in the stage1 compiler, 
which is compiled by your installed 6.6.1.  So either


  (a) your installed 6.6.1 is generating bogus code (which is why I suspected a
  gcc incompatibility, because that would explain why Christian doesn't
  see the same crash)

  (b) there's a bug in GHC which makes it segfault on OS X 10.5.

I'd say (b) is highly unlikely - GHC just a Haskell program (well, mostly), and 
it therefore shouldn't segfault.


Still, you tried with -O -fasm and that didn't help.  So I'm at a loss to 
explain why your stage1 GHC is crashing.  Probably the only way forward at this 
point is to get out gdb and figure out what's going wrong.


Cheers,
Simon
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


[GHC] #1375: ByteString’s “lines” eats empty lines

2007-05-24 Thread GHC
#1375: ByteString’s “lines” eats empty lines
-+--
  Reporter:  guest   |  Owner: 
  Type:  bug | Status:  new
  Priority:  normal  |  Milestone: 
 Component:  libraries/base  |Version:  6.6.1  
  Severity:  normal  |   Keywords: 
Difficulty:  Unknown | Os:  Unknown
  Testcase:  |   Architecture:  Unknown
-+--
I’d expect this to be true for ByteStrings
 map B.unpack . B.lines . B.pack == Prelude.lines
 But it seems that B.lines will merge several consecutive newlines. B.split
 '\n' works as it should, though.

 Thanks,
 Joachim

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1375
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: Build failures on Mac OS X 10.5

2007-05-24 Thread Christian Maeder
Christian Maeder schrieb:
 I can only offer to make a rebuild with any options that might help. May
 it be a problem with the GMP framework? The one for downloading
 (gmp-4.2.1) might be different from the one that's globally installed
 here (gmp-4.2).

GMP (v7) used by ghc

$ otool -L ghc-6.6.1/lib/i386-apple-darwin/ghc-6.6.1
ghc-6.6.1/lib/i386-apple-darwin/ghc-6.6.1:
GNUreadline.framework/Versions/A/GNUreadline (compatibility
version 5.0.0, current version 5.2.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 88.3.7)
GMP.framework/Versions/A/GMP (compatibility version 7.0.0,
current version 7.0.0)

versus GMP (v8) on our download page:

$ otool -L ~/Library/Frameworks/GMP.framework/Versions/A/GMP
/home/maeder/Library/Frameworks/GMP.framework/Versions/A/GMP:
GMP.framework/Versions/A/GMP (compatibility version 8.0.0,
current version 8.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 88.3.7)

but. I've no problem with either GMP frameworks
C.

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


[GHC] #1376: panic caused in ghci by the following code involving monad transformers

2007-05-24 Thread GHC
#1376: panic caused in ghci by the following code involving monad transformers
-+--
  Reporter:  [EMAIL PROTECTED]  |  Owner: 
  Type:  bug | Status:  new
  Priority:  normal  |  Milestone: 
 Component:  Compiler|Version:  6.6.1  
  Severity:  normal  |   Keywords: 
Difficulty:  Unknown | Os:  MacOS X
  Testcase:  |   Architecture:  powerpc
-+--
I was attempting to learn to use monad transformers when I came across
 this bug,
 the following is the contents of StateAccum.hs
 {{{
 import Control.Monad
 import Control.Monad.State
 import Control.Monad.List

 sumUp :: [Int] - State Int [()]
 sumUp = sequence . map (modify . (+))

 type StateWithList = ListT (State Int)

 sumUp' xs = do x - xs
lift (modify (+x))
return (lift get)


 sumThreeLists :: [Int] - [Int] - [Int] - Int
 sumThreeLists xs ys zs = execState (sumUp xs  sumUp ys  sumUp zs) 0

 main = do print $ execState (sumUp [1,2,3]) 0
   print $ sumThreeLists [1..10] [1..10] [1..10]
 }}}

 This is a transcript of the ghci session that causes the panic:
 {{{
 % ghci StateAccum.hs
___ ___ _
   / _ \ /\  /\/ __(_)
  / /_\// /_/ / /  | |  GHC Interactive, version 6.6.1, for Haskell 98.
 / /_\\/ __  / /___| |  http://www.haskell.org/ghc/
 \/\/ /_/\/|_|  Type :? for help.

 Loading package base ... linking ... done.
 [1 of 1] Compiling Main ( StateAccum.hs, interpreted )
 Ok, modules loaded: Main.
 *Main sumUp' [return 1, return 2]
 ghc-6.6.1: panic! (the 'impossible' happened)
   (GHC version 6.6.1 for powerpc-apple-darwin):
 nameModule it{v a1es}

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

 *Main
 }}}

 I'm using the binary ghc package for Mac OS PPC provided on the ghc site.
 The output for uname -a on my machine is

 {{{ Darwin Logan-Capaldos-Computer.local 8.9.0 Darwin Kernel Version
 8.9.0: Thu Feb 22 20:54:07 PST 2007; root:xnu-792.17.14~1/RELEASE_PPC
 Power Macintosh powerpc }}}

 Running with ghci -v, this is the output
 {{{
 % ghci -v StateAccum.hs
___ ___ _
   / _ \ /\  /\/ __(_)
  / /_\// /_/ / /  | |  GHC Interactive, version 6.6.1, for Haskell 98.
 / /_\\/ __  / /___| |  http://www.haskell.org/ghc/
 \/\/ /_/\/|_|  Type :? for help.

 Using package config file: /usr/local/lib/ghc-6.6.1/package.conf
 wired-in package base mapped to base-2.1.1
 wired-in package rts mapped to rts-1.0
 wired-in package haskell98 mapped to haskell98-1.0
 wired-in package template-haskell mapped to template-haskell-2.1
 Hsc static flags: -static
 Loading package base ... linking ... done.
 wired-in package base mapped to base-2.1.1
 wired-in package rts mapped to rts-1.0
 wired-in package haskell98 mapped to haskell98-1.0
 wired-in package template-haskell mapped to template-haskell-2.1
 *** Parser:
 *** Desugar:
 *** Simplify:
 *** CorePrep:
 *** ByteCodeGen:
 *** Parser:
 *** Desugar:
 *** Simplify:
 *** CorePrep:
 *** ByteCodeGen:
 wired-in package base mapped to base-2.1.1
 wired-in package rts mapped to rts-1.0
 wired-in package haskell98 mapped to haskell98-1.0
 wired-in package template-haskell mapped to template-haskell-2.1
 *** Chasing dependencies:
 Stable obj: []
 Stable BCO: []
 unload: retaining objs []
 unload: retaining bcos []
 Upsweep completely successful.
 *** Deleting temp files:
 Deleting:
 *** Chasing dependencies:
 Stable obj: []
 Stable BCO: []
 unload: retaining objs []
 unload: retaining bcos []
 compile: input file StateAccum.hs
 *** Checking old interface for main:Main:
 [1 of 1] Compiling Main ( StateAccum.hs, interpreted )
 *** Parser:
 *** Renamer/typechecker:
 *** Desugar:
 Result size = 244
 *** Simplify:
 Result size = 292
 Result size = 263
 Result size = 263
 *** Tidy Core:
 Result size = 263
 *** CorePrep:
 Result size = 331
 *** ByteCodeGen:
 *** Deleting temp files:
 Deleting:
 Upsweep completely successful.
 *** Deleting temp files:
 Deleting:
 Ok, modules loaded: Main.
 *Main sumUp' [return 1, return 2]
 *** Parser:
 *** Desugar:
 *** Simplify:
 *** CorePrep:
 *** ByteCodeGen:
 ghc-6.6.1: panic! (the 'impossible' happened)
   (GHC version 6.6.1 for powerpc-apple-darwin):
 nameModule it{v a1es}

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

 *Main
 }}}

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1376
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs