#1843: ghc 6.8.1 broken on Mac OS X Leopard PPC
----------------------+-----------------------------------------------------
 Reporter:  guest     |          Owner:         
     Type:  bug       |         Status:  new    
 Priority:  high      |      Milestone:  6.8.2  
Component:  Compiler  |        Version:  6.8.1  
 Severity:  critical  |     Resolution:         
 Keywords:            |     Difficulty:  Unknown
 Testcase:            |   Architecture:  powerpc
       Os:  MacOS X   |  
----------------------+-----------------------------------------------------
Comment (by mokus):

 Replying to [comment:9 mokus]:
 > I have no hypothesis regarding the segfault issue, but I can confirm
 that when building either 6.8.1 or head, my stage1 builds pretend to work,
 but my stage2 compilers are deader than doornails.  Anything I can do to
 provide more useful info?
 >

 As I typed this, I realized I hadn't actually tested the stage1 ghc-
 inplace to confirm that it regularly produces vegetables.  I have now done
 so.  Simple 'hello world'-type stuff works, but just about nothing else
 does.  Here's a pretty simple program that segfaults when run after being
 compiled by stage1/ghc-inplace:


 {{{
 {-
  -      "primes.hs"
  -}

 module Main where

 import System

 primes = 2 : 3: 5 : (filter isPrime [7,9..])

 -- x %= y: "x divides y"
 x %= y = (y `rem` x) == 0

 isPrime x
         | x <= 1                = False
         | isComposite x         = False
         | otherwise             = True
 isComposite x = any (%= x) (takeWhile (\p -> p^2 <= x) primes)

 main = do
         args <- getArgs
         let n = read (args !! 0)
         print (primes !! (n - 1))

 }}}

 Some interesting facts:  "otool -r" knows of no relocations in the
 compiled file.  There are 14 listed in the working version compiled with
 ghc-6.6.1.  When I compiled with ghc-inplace, there were 8 of the infamous
 "unknown scattered relocation type 4" messages.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1843#comment:10>
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

Reply via email to