Error in installing dph-examples on Mac OS X 10.7.3

Hello all I am trying to install dph-examples on Mac OS X version 10.7.3 but getting this error http://hpaste.org/57699. I am using ghc-7.4.1. Error running clang! you need clang installed to use the LLVM backend cabal: Error: some packages failed to install: dph-examples-0.6.1.3 failed during the building phase. The exception was: ExitFailure 1 I have already installed Xcode 4.2 and it shows Macintosh-0026bb610428:tmp mukesh$ clang clang clang++ Macintosh-0026bb610428:tmp mukesh$ clang -v Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn) Target: x86_64-apple-darwin11.3.0 Thread model: posix Macintosh-0026bb610428:tmp mukesh$ clang++ -v Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn) Target: x86_64-apple-darwin11.3.0 Thread model: posix Macintosh-0026bb610428:tmp mukesh$ l Display all 113 possibilities? (y or n) Macintosh-0026bb610428:tmp mukesh$ llvm- llvm-ar llvm-config llvm-diff llvm-extract llvm-gcc llvm-link llvm-objdump llvm-rtdyld llvm-tblgen llvm-as llvm-cov llvm-dis llvm-g++ llvm-gcc-4.2 llvm-mc llvm-prof llvm-size llvm-bcanalyzer llvm-cpp-4.2 llvm-dwarfdump llvm-g++-4.2 llvm-ld llvm-nm llvm-ranlib llvm-stub Macintosh-0026bb610428:tmp mukesh$ llvm-g++ -v Using built-in specs. Target: i686-apple-darwin11 Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.1~1/src/configure --disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.1~1/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1 Thread model: posix gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) Regards Mukesh Tiwari

On 10/02/2012, at 6:12 AM, mukesh tiwari wrote:
Hello all I am trying to install dph-examples on Mac OS X version 10.7.3 but getting this error. I am using ghc-7.4.1.
This probably isn't DPH specific. Can you compile a "hello world" program with -fllvm? Ben.

It may be a problem with the gloss / opengl dependencies? do you have those
packages installed?
I had similar trouble earlier this week wrt dph-examples, and that was the
root of the matter in my case
-Carter
On Thu, Feb 9, 2012 at 7:04 PM, Ben Lippmeier
On 10/02/2012, at 6:12 AM, mukesh tiwari wrote:
Hello all I am trying to install dph-examples on Mac OS X version 10.7.3 but getting this error http://hpaste.org/57699. I am using ghc-7.4.1.
This probably isn't DPH specific. Can you compile a "hello world" program with -fllvm?
Ben.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

I am not able to compile using -fllvm. Macintosh-0026bb610428:tmp mukesh$ ghc-7.4.1 -fllvm Hello.hs /var/folders/b9/87kwc2nj7xd2qjt996h3635c0000gq/T/cc-btI6Vk.s:201:2: error: instruction requires a CPU feature not currently enabled jmpl *%eax ## TAILCALL ^ /var/folders/b9/87kwc2nj7xd2qjt996h3635c0000gq/T/cc-btI6Vk.s:207:2: error: instruction requires a CPU feature not currently enabled jmpl *%eax ## TAILCALL Error running clang! you need clang installed to use the LLVM backend However with ghc-7.2.1 , It compiles and run. Macintosh-0026bb610428:tmp mukesh$ ghc-7.2.1 -fllvm Hello.hs Macintosh-0026bb610428:tmp mukesh$ ./Hello Hello Haskell Regards Mukesh Tiwari On Fri, Feb 10, 2012 at 12:41 PM, Carter Schonwald < carter.schonwald@gmail.com> wrote:
It may be a problem with the gloss / opengl dependencies? do you have those packages installed?
I had similar trouble earlier this week wrt dph-examples, and that was the root of the matter in my case
-Carter
On Thu, Feb 9, 2012 at 7:04 PM, Ben Lippmeier
wrote: On 10/02/2012, at 6:12 AM, mukesh tiwari wrote:
Hello all I am trying to install dph-examples on Mac OS X version 10.7.3 but getting this error http://hpaste.org/57699. I am using ghc-7.4.1.
This probably isn't DPH specific. Can you compile a "hello world" program with -fllvm?
Ben.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Hi Carter
Yes both of these packages gloss-1.6.1.1 , OpenGL-2.5.0.0 (
http://hpaste.org/63397 ) are installed on my system.Could you please
tell me how did you resolve the issue.
Regards
Mukesh Tiwari
On Feb 10, 12:11 pm, Carter Schonwald
It may be a problem with the gloss / opengl dependencies? do you have those packages installed?
I had similar trouble earlier this week wrt dph-examples, and that was the root of the matter in my case
-Carter
On Thu, Feb 9, 2012 at 7:04 PM, Ben Lippmeier
wrote: On 10/02/2012, at 6:12 AM, mukesh tiwari wrote:
Hello all I am trying to install dph-examples on Mac OS X version 10.7.3 but getting this error http://hpaste.org/57699. I am using ghc-7.4.1.
This probably isn't DPH specific. Can you compile a "hello world" program with -fllvm?
Ben.
_______________________________________________ Haskell-Cafe mailing list Haskell-C...@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-C...@haskell.orghttp://www.haskell.org/mailman/listinfo/haskell-cafe

/Users/mukesh/.ghc/i386-darwin-7.4.1/package.conf.d you need the 64bit version of ghc on mac, not the 32 bit one, by default all mac libs are 64 bit so this yields problems when linking to c libs On Fri, Feb 10, 2012 at 10:58 AM, mukesh tiwari < mukeshtiwari.iiitm@gmail.com> wrote:
Hi Carter Yes both of these packages gloss-1.6.1.1 , OpenGL-2.5.0.0 ( http://hpaste.org/63397 ) are installed on my system.Could you please tell me how did you resolve the issue.
Regards Mukesh Tiwari
It may be a problem with the gloss / opengl dependencies? do you have
packages installed?
I had similar trouble earlier this week wrt dph-examples, and that was
root of the matter in my case
-Carter
On Thu, Feb 9, 2012 at 7:04 PM, Ben Lippmeier
wrote: On 10/02/2012, at 6:12 AM, mukesh tiwari wrote:
Hello all I am trying to install dph-examples on Mac OS X version 10.7.3 but getting this error http://hpaste.org/57699. I am using ghc-7.4.1.
This probably isn't DPH specific. Can you compile a "hello world"
On Feb 10, 12:11 pm, Carter Schonwald
wrote: those the program with -fllvm?
Ben.
_______________________________________________ Haskell-Cafe mailing list Haskell-C...@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-C...@haskell.orghttp:// www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Hi Carter
Thank you for reply. My mac is 32 bit ( I remember having some issue
with ghc-7.2.1 64 bit on 32 bit machine but probably that was on
Linux ). I will give it a shot.
Macintosh-0026bb610428:tmp mukesh$ uname -a
Darwin Macintosh-0026bb610428.local 11.3.0 Darwin Kernel Version
11.3.0: Thu Jan 12 18:48:32 PST 2012; root:xnu-1699.24.23~1/
RELEASE_I386 i386
Some where on the internet I saw that llvm comes with Xcode 4.2
( Before I had Xcode 3.2 ) so I removed the llvm installed by
homebrew. Now all I can see is
Macintosh-0026bb610428:tmp mukesh$ llvm-
llvm-cpp-4.2 llvm-g++ llvm-g++-4.2 llvm-gcc llvm-gcc-4.2
Macintosh-0026bb610428:tmp mukesh$ clang
clang clang++
and I am getting
Macintosh-0026bb610428:tmp mukesh$ cabal install dph-examples
Resolving dependencies...
Configuring dph-examples-0.6.1.3...
Building dph-examples-0.6.1.3...
Preprocessing executable 'dph-spectral-smvm' for dph-
examples-0.6.1.3...
[1 of 3] Compiling Vectorised ( examples/spectral/SMVM/dph/
Vectorised.hs, dist/build/dph-spectral-smvm/dph-spectral-smvm-tmp/
Vectorised.o )
exprType TYPE ghc-prim:GHC.Types.Double{(w) tc 3u}
exprType TYPE ghc-prim:GHC.Types.Double{(w) tc 3u}
exprType TYPE ghc-prim:GHC.Types.Double{(w) tc 3u}
exprType TYPE ghc-prim:GHC.Types.Double{(w) tc 3u}
exprType TYPE ghc-prim:GHC.Types.Double{(w) tc 3u}
exprType
TYPE (ghc-prim:GHC.Types.Int{(w) tc 3J},
ghc-prim:GHC.Types.Double{(w) tc 3u})
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM
ghc: could not execute: opt
cabal: Error: some packages failed to install:
dph-examples-0.6.1.3 failed during the building phase. The exception
was:
ExitFailure 1
Macintosh-0026bb610428:tmp mukesh$ ghc-7.4.1 -fllvm Hello.hs
[1 of 1] Compiling Main ( Hello.hs, Hello.o )
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM
ghc: could not execute: opt
Some thing wrong with Xcode 4.2 llvm ? Also ghc-7.4.1 page (
http://www.haskell.org/ghc/download_ghc_7_4_1 ) suggest for Xcode
4.1( 2.9 GB ) but I installed Xcode 4.2 ( 1.6 GB ) because of smaller
size. I am not able to solve this issue. I am in the middle of project
and stuck :(.
Regards
Mukesh Tiwari
On Feb 10, 9:36 pm, Carter Schonwald
/Users/mukesh/.ghc/i386-darwin-7.4.1/package.conf.d
you need the 64bit version of ghc on mac, not the 32 bit one, by default all mac libs are 64 bit so this yields problems when linking to c libs
On Fri, Feb 10, 2012 at 10:58 AM, mukesh tiwari <
mukeshtiwari.ii...@gmail.com> wrote:
Hi Carter Yes both of these packages gloss-1.6.1.1 , OpenGL-2.5.0.0 ( http://hpaste.org/63397) are installed on my system.Could you please tell me how did you resolve the issue.
Regards Mukesh Tiwari
It may be a problem with the gloss / opengl dependencies? do you have
On Feb 10, 12:11 pm, Carter Schonwald
wrote: those packages installed?
I had similar trouble earlier this week wrt dph-examples, and that was the root of the matter in my case
-Carter
On Thu, Feb 9, 2012 at 7:04 PM, Ben Lippmeier
wrote: On 10/02/2012, at 6:12 AM, mukesh tiwari wrote:
Hello all I am trying to install dph-examples on Mac OS X version 10.7.3 but getting this error http://hpaste.org/57699. I am using ghc-7.4.1.
This probably isn't DPH specific. Can you compile a "hello world" program with -fllvm?
Ben.
_______________________________________________ Haskell-Cafe mailing list Haskell-C...@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-C...@haskell.orghttp:// www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-C...@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-C...@haskell.orghttp://www.haskell.org/mailman/listinfo/haskell-cafe

On Fri, Feb 10, 2012 at 13:38, mukesh tiwari
Hi Carter Thank you for reply. My mac is 32 bit ( I remember having some issue with ghc-7.2.1 64 bit on 32 bit machine but probably that was on Linux ). I will give it a shot.
Macintosh-0026bb610428:tmp mukesh$ uname -a Darwin Macintosh-0026bb610428.local 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:48:32 PST 2012; root:xnu-1699.24.23~1/ RELEASE_I386 i386
That just means you have the 32-bit kernel; 64-bit executables still work on most Intel-based Macs even with a 32-bit kernel (the exceptions being early Core 1-based machines), and only machines made within the past year or so boot to a 64-bit kernel by default.
Some where on the internet I saw that llvm comes with Xcode 4.2
I believe it was mentioned to you in #haskell that it is an incomplete LLVM distribution, and you need to install a full LLVM distribution for -fllvm to work properly. IIRC you also need to avoid the just-released LLVM 3 (this may also be part of the problem with Xcode 4.2, which is actually a partial LLVM 3 prerelease). -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms

ok, this is because i think you need a stand alone LLVM backend because ghc
7.4 provides some vectorization stuff that
dph uses, and so i'd suggest installing llvm on its own, or maybe its that
dph calls llvm tools as its compliling?
eg
brew install llvm
because if you look in cabal file
http://hackage.haskell.org/packages/archive/dph-examples/0.6.1.3/dph-example...
you'll see that the build's have the -fllvm flag, and llvm as a standalone
backend isn't installed by developer tools or anything else you ahve
On Fri, Feb 10, 2012 at 2:40 PM, Brandon Allbery
On Fri, Feb 10, 2012 at 13:38, mukesh tiwari
wrote:
Hi Carter Thank you for reply. My mac is 32 bit ( I remember having some issue with ghc-7.2.1 64 bit on 32 bit machine but probably that was on Linux ). I will give it a shot.
Macintosh-0026bb610428:tmp mukesh$ uname -a Darwin Macintosh-0026bb610428.local 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:48:32 PST 2012; root:xnu-1699.24.23~1/ RELEASE_I386 i386
That just means you have the 32-bit kernel; 64-bit executables still work on most Intel-based Macs even with a 32-bit kernel (the exceptions being early Core 1-based machines), and only machines made within the past year or so boot to a 64-bit kernel by default.
Some where on the internet I saw that llvm comes with Xcode 4.2
I believe it was mentioned to you in #haskell that it is an incomplete LLVM distribution, and you need to install a full LLVM distribution for -fllvm to work properly. IIRC you also need to avoid the just-released LLVM 3 (this may also be part of the problem with Xcode 4.2, which is actually a partial LLVM 3 prerelease).
-- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (4)
-
Ben Lippmeier
-
Brandon Allbery
-
Carter Schonwald
-
mukesh tiwari