GHC | 18 Jun 2012 07:18
Favicon

#7004: Error compiling repa-algorithms with LLVM

#7004: Error compiling repa-algorithms with LLVM
---------------------------------------+------------------------------------
 Reporter:  benl                       |          Owner:  dterei         
     Type:  bug                        |         Status:  new            
 Priority:  normal                     |      Component:  Compiler (LLVM)
  Version:  7.4.1                      |       Keywords:                 
       Os:  MacOS X                    |   Architecture:  x86_64 (amd64) 
  Failure:  GHC rejects valid program  |       Testcase:                 
Blockedby:                             |       Blocking:                 
  Related:                             |  
---------------------------------------+------------------------------------
 With LLVM 3.0 and 3.1:

 {{{
 $ cabal install repa-examples
 Resolving dependencies...
 Configuring repa-algorithms-3.2.1.1...
 Building repa-algorithms-3.2.1.1...
 Preprocessing library repa-algorithms-3.2.1.1...
 [ 1 of 10] Compiling Data.Array.Repa.Algorithms.Randomish (
 Data/Array/Repa/Algorithms/Randomish.hs,
 dist/build/Data/Array/Repa/Algorithms/Randomish.o )

 /var/folders/39/s54cw_0x0pg1shz3z8wd3z080000gn/T/cc-IVGvFg.s:18:2:
     error: instruction requires a CPU feature not currently enabled
     jmpl *%eax ## TAILCALL
     ^
 }}}

 With LLVM 2.8:
(Continue reading)

GHC | 19 Jun 2012 03:47
Favicon

Re: #7004: Error compiling repa-algorithms with LLVM

#7004: Error compiling repa-algorithms with LLVM
---------------------------------------+------------------------------------
 Reporter:  benl                       |          Owner:  dterei         
     Type:  bug                        |         Status:  new            
 Priority:  normal                     |      Component:  Compiler (LLVM)
  Version:  7.4.1                      |       Keywords:                 
       Os:  MacOS X                    |   Architecture:  x86_64 (amd64) 
  Failure:  GHC rejects valid program  |       Testcase:                 
Blockedby:                             |       Blocking:                 
  Related:                             |  
---------------------------------------+------------------------------------

Comment(by robby):

 FWIW, I am using mac os 10.7.3 on an 11" mac book air, which has an i7
 (not an amd chip). Before the commands above, I just installed the
 platform, specifically:
 {{{Haskell Platform 2012.2.0.0 32bit}}}.

--

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7004#comment:1>
GHC | 19 Jun 2012 12:16
Favicon

Re: #7004: Error compiling repa-algorithms with LLVM

#7004: Error compiling repa-algorithms with LLVM
--------------------------------+-------------------------------------------
    Reporter:  benl             |       Owner:  dterei                   
        Type:  bug              |      Status:  new                      
    Priority:  normal           |   Milestone:                           
   Component:  Compiler (LLVM)  |     Version:  7.4.1                    
    Keywords:                   |          Os:  MacOS X                  
Architecture:  x86_64 (amd64)   |     Failure:  GHC rejects valid program
  Difficulty:  Unknown          |    Testcase:                           
   Blockedby:                   |    Blocking:                           
     Related:                   |  
--------------------------------+-------------------------------------------
Changes (by simonpj):

 * cc: robby <at> … (added)
  * difficulty:  => Unknown

Comment:

 Maybe try a tiny `foo.s` file containing `jumpl *%eax` and see if the
 assembler complains?

--

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7004#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs <at> haskell.org
(Continue reading)

GHC | 19 Jun 2012 12:18
Favicon

Re: #7004: Error compiling repa-algorithms with LLVM

#7004: Error compiling repa-algorithms with LLVM
--------------------------------+-------------------------------------------
    Reporter:  benl             |       Owner:  dterei                   
        Type:  bug              |      Status:  new                      
    Priority:  normal           |   Milestone:                           
   Component:  Compiler (LLVM)  |     Version:  7.4.1                    
    Keywords:                   |          Os:  MacOS X                  
Architecture:  x86_64 (amd64)   |     Failure:  GHC rejects valid program
  Difficulty:  Unknown          |    Testcase:                           
   Blockedby:                   |    Blocking:                           
     Related:                   |  
--------------------------------+-------------------------------------------

Comment(by simonpj):

 Roman says: could this be a 32-bit GHC with a 64-bit GCC, or vice versa?

--

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7004#comment:3>
GHC | 19 Jun 2012 12:28
Favicon

Re: #7004: Error compiling repa-algorithms with LLVM

#7004: Error compiling repa-algorithms with LLVM
--------------------------------+-------------------------------------------
    Reporter:  benl             |       Owner:  dterei                   
        Type:  bug              |      Status:  new                      
    Priority:  normal           |   Milestone:                           
   Component:  Compiler (LLVM)  |     Version:  7.4.1                    
    Keywords:                   |          Os:  MacOS X                  
Architecture:  x86_64 (amd64)   |     Failure:  GHC rejects valid program
  Difficulty:  Unknown          |    Testcase:                           
   Blockedby:                   |    Blocking:                           
     Related:                   |  
--------------------------------+-------------------------------------------

Comment(by chak):

 Replying to [comment:1 robby]:
 > FWIW, I am using mac os 10.7.3 on an 11" mac book air, which has an i7
 (not an amd chip). Before the commands above, I just installed the
 platform, specifically:
 > {{{Haskell Platform 2012.2.0.0 32bit}}}.

 Roman just suggested that there is probably a mismatch between you using a
 32bit Haskell Platform, but LLVM wanting to generate x86_64 code. Could
 you install the x86_64 version of the Haskell Platform and try again?

--

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7004#comment:4>
GHC | 19 Jun 2012 21:21
Favicon

Re: #7004: Error compiling repa-algorithms with LLVM

#7004: Error compiling repa-algorithms with LLVM
--------------------------------+-------------------------------------------
    Reporter:  benl             |       Owner:  dterei                   
        Type:  bug              |      Status:  new                      
    Priority:  normal           |   Milestone:                           
   Component:  Compiler (LLVM)  |     Version:  7.4.1                    
    Keywords:                   |          Os:  MacOS X                  
Architecture:  x86_64 (amd64)   |     Failure:  GHC rejects valid program
  Difficulty:  Unknown          |    Testcase:                           
   Blockedby:                   |    Blocking:                           
     Related:                   |  
--------------------------------+-------------------------------------------

Comment(by dterei):

 Yes I thought this error looked familiar. I don't have time right now and
 probably for at least a week to look into this sadly but I'm pretty sure
 Roman is right.

 I don't think I really support 32bit GHC on 10.7, so please use 64bit.

--

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7004#comment:5>
GHC | 20 Jun 2012 15:02
Favicon

Re: #7004: Error compiling repa-algorithms with LLVM

#7004: Error compiling repa-algorithms with LLVM
--------------------------------+-------------------------------------------
    Reporter:  benl             |       Owner:  dterei                   
        Type:  bug              |      Status:  new                      
    Priority:  normal           |   Milestone:                           
   Component:  Compiler (LLVM)  |     Version:  7.4.1                    
    Keywords:                   |          Os:  MacOS X                  
Architecture:  x86_64 (amd64)   |     Failure:  GHC rejects valid program
  Difficulty:  Unknown          |    Testcase:                           
   Blockedby:                   |    Blocking:                           
     Related:                   |  
--------------------------------+-------------------------------------------

Comment(by robby):

 Thanks, everyone.

 It appears that the 64bit Haskell Platform combined with llvm 3.0 works to
 be able to install repa-examples. I'm not seeing the cool programs that
 Manuel demo'd in China, but I do see something now.

 Also, in case anyone's interested, llvm 2.8 still gives the error above,
 and I had trouble uninstalling the 32bit version of the Haskell Platform,
 but I found a thread on haskell-cafe that suggested a series of "sudo rm"s
 that seems to have done the trick.

--

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7004#comment:6>
GHC | 21 Jun 2012 09:32
Favicon

Re: #7004: Error compiling repa-algorithms with LLVM

#7004: Error compiling repa-algorithms with LLVM
----------------------------------------+-----------------------------------
  Reporter:  benl                       |          Owner:  dterei        
      Type:  bug                        |         Status:  closed        
  Priority:  normal                     |      Milestone:                
 Component:  Compiler (LLVM)            |        Version:  7.4.1         
Resolution:  fixed                      |       Keywords:                
        Os:  MacOS X                    |   Architecture:  x86_64 (amd64)
   Failure:  GHC rejects valid program  |     Difficulty:  Unknown       
  Testcase:                             |      Blockedby:                
  Blocking:                             |        Related:                
----------------------------------------+-----------------------------------
Changes (by chak):

  * status:  new => closed
  * resolution:  => fixed

Comment:

 Robby, some of the examples that I had are in repa-examples and some of
 them are in gloss-examples (install it with `cabal install gloss-
 examples`). Gloss is the OpenGL library that is used for visualisation in
 all, but the Canny edge detection.

 (It is a bit confusing that these Repa examples are bundled with Gloss,
 but as gloss depends on Repa and these examples need both, there is really
 no other way to structure this. Except maybe to have a third repa-gloss-
 examples package.)

 As I opened a separate ticket concerning a better error message in the
(Continue reading)

GHC | 21 Jun 2012 10:36
Favicon

Re: #7004: Error compiling repa-algorithms with LLVM

#7004: Error compiling repa-algorithms with LLVM
----------------------------------------+-----------------------------------
  Reporter:  benl                       |          Owner:  dterei        
      Type:  bug                        |         Status:  closed        
  Priority:  normal                     |      Milestone:                
 Component:  Compiler (LLVM)            |        Version:  7.4.1         
Resolution:  fixed                      |       Keywords:                
        Os:  MacOS X                    |   Architecture:  x86_64 (amd64)
   Failure:  GHC rejects valid program  |     Difficulty:  Unknown       
  Testcase:                             |      Blockedby:                
  Blocking:                             |        Related:                
----------------------------------------+-----------------------------------

Comment(by robby):

 Thanks!

--

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7004#comment:8>
GHC | 25 Jun 2012 11:57
Favicon

Re: #7004: Error compiling repa-algorithms with LLVM

#7004: Error compiling repa-algorithms with LLVM
----------------------------------------+-----------------------------------
  Reporter:  benl                       |          Owner:  dterei        
      Type:  bug                        |         Status:  closed        
  Priority:  normal                     |      Milestone:                
 Component:  Compiler (LLVM)            |        Version:  7.4.1         
Resolution:  fixed                      |       Keywords:                
        Os:  MacOS X                    |   Architecture:  x86_64 (amd64)
   Failure:  GHC rejects valid program  |     Difficulty:  Unknown       
  Testcase:                             |      Blockedby:                
  Blocking:                             |        Related:                
----------------------------------------+-----------------------------------

Comment(by dterei):

 OK so I thought this error looked familiar. This is an old error that I
 already fixed:

 https://github.com/ghc/ghc/commit/5e383469

 It is in GHC 7.4.2, current haskell platform is 7.4.1 based so it suffers
 the error. It only arises on a 32bit platform as well. Basically I wasn't
 passing though the march option to the assember (as the llvm backend now
 uses clang as the assembler so has a different code path than NCG).

 A work around is to use this flag with ghc:
 {{{
 $ ghc -opta-m32
 }}}

(Continue reading)


Gmane