I am trying to use llvm but am being told I don't have llvm installed. Dominics-MacBook-Pro:Laplace dom$ ghc src-repa/Main.hs -rtsopts -threaded -eventlog -Odph -fllvm -optlo-O3 -fno-liberate-case -isrc-repa [1 of 3] Compiling SolverStencil ( src-repa/SolverStencil.hs, src-repa/SolverStencil.o ) Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Loading package pretty-1.1.1.0 ... linking ... done. Loading package array-0.4.0.1 ... linking ... done. Loading package deepseq-1.3.0.1 ... linking ... done. Loading package containers-0.5.0.0 ... linking ... done. Loading package old-locale-1.0.0.5 ... linking ... done. Loading package time-1.4.0.1 ... linking ... done. Loading package random-1.0.1.1 ... linking ... done. Loading package template-haskell ... linking ... done. Loading package QuickCheck-2.5.1.1 ... linking ... done. Loading package bytestring-0.10.0.2 ... linking ... done. Loading package primitive-0.5.0.1 ... linking ... done. Loading package vector-0.10.0.1 ... linking ... done. Loading package repa-3.2.3.1 ... linking ... done. <no location info>: Warning: Couldn't figure out LLVM version! Make sure you have installed LLVM ghc: could not execute: opt The ghc documentation (http://www.haskell.org/ghc/docs/7.6.1/html/users_guide/code-generators.html) says that llvm and clang are installed by default for 10.6 and later. I am on 10.8.3. Indeed Dominics-MacBook-Pro:Laplace dom$ llvm- llvm-cpp-4.2 llvm-g++ llvm-g++-4.2 llvm-gcc llvm-gcc-4.2 And Dominics-MacBook-Pro:Laplace dom$ clang clang clang++ But ghc-info tells me Dominics-MacBook-Pro:Laplace dom$ ghc --info [("Project name","The Glorious Glasgow Haskell Compilation System") ,("GCC extra via C opts"," -fwrapv") ,("C compiler command","/usr/bin/gcc") ,("C compiler flags"," -m64 -fno-stack-protector -m64") ,("ar command","/usr/bin/ar") ,("ar flags","clqs") ,("ar supports at file","@ArSupportsAtFile@") ,("touch command","touch") ,("dllwrap command","/bin/false") ,("windres command","/bin/false") ,("perl command","/usr/bin/perl") ,("target os","OSDarwin") ,("target arch","ArchX86_64") ,("target word size","8") ,("target has GNU nonexec stack","False") ,("target has .ident directive","True") ,("target has subsections via symbols","True") ,("LLVM llc command","llc") ,("LLVM opt command","opt") ,("Project version","7.6.2") ,("Booter version","7.4.2") ,("Stage","2") ,("Build platform","x86_64-apple-darwin") ,("Host platform","x86_64-apple-darwin") ,("Target platform","x86_64-apple-darwin") ,("Have interpreter","YES") ,("Object splitting supported","YES") ,("Have native code generator","YES") ,("Support SMP","YES") ,("Unregisterised","NO") ,("Tables next to code","YES") ,("RTS ways","l debug thr thr_debug thr_l thr_p dyn debug_dyn thr_dyn thr_debug_dyn") ,("Leading underscore","YES") ,("Debug on","False") ,("LibDir","/usr/local/lib/ghc-7.6.2") ,("Global Package DB","/usr/local/lib/ghc-7.6.2/package.conf.d") ,("Gcc Linker flags","[\"-m64\"]") ,("Ld Linker flags","[\"-arch\",\"x86_64\"]") ] But I don't have either llc or opt Dominics-MacBook-Pro:Laplace dom$ llc -bash: llc: command not found Dominics-MacBook-Pro:Laplace dom$ opt -bash: opt: command not found Dominics-MacBook-Pro:Laplace dom$ What is the solution? Thanks, Dominic Steinitz dominic@steinitz.org http://idontgetoutmuch.wordpress.com
On Sat, Aug 10, 2013 at 7:39 AM, Dominic Steinitz <dominic@steinitz.org>wrote:
<no location info>: Warning: Couldn't figure out LLVM version! Make sure you have installed LLVM ghc: could not execute: opt
The ghc documentation ( http://www.haskell.org/ghc/docs/7.6.1/html/users_guide/code-generators.html ) says that llvm and clang are installed by default for 10.6 and later. I am on 10.8.3.
Apple *still* doesn't ship a full LLVM for some reason. I installed one via MacPorts; Homebrew also has it. Maybe if enough people file bugs with Apple, they'll start providing the whole thing instead of just the parts they use in Xcode. :/ -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
Thank you very much. I used Homebrew. Now I can compile albeit with a warning. I have yet to try running it.
Loading package repa-3.2.3.1 ... linking ... done. You are using a new version of LLVM that hasn't been tested yet! We will try though...
Dominic Steinitz dominic@steinitz.org http://idontgetoutmuch.wordpress.com On 10 Aug 2013, at 16:36, Brandon Allbery <allbery.b@gmail.com> wrote:
On Sat, Aug 10, 2013 at 7:39 AM, Dominic Steinitz <dominic@steinitz.org> wrote: <no location info>: Warning: Couldn't figure out LLVM version! Make sure you have installed LLVM ghc: could not execute: opt
The ghc documentation (http://www.haskell.org/ghc/docs/7.6.1/html/users_guide/code-generators.html) says that llvm and clang are installed by default for 10.6 and later. I am on 10.8.3.
Apple *still* doesn't ship a full LLVM for some reason. I installed one via MacPorts; Homebrew also has it. Maybe if enough people file bugs with Apple, they'll start providing the whole thing instead of just the parts they use in Xcode. :/
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
On Sat, Aug 10, 2013 at 12:53 PM, Dominic Steinitz <dominic@steinitz.org>wrote:
Thank you very much. I used Homebrew. Now I can compile albeit with a warning. I have yet to try running it.
Loading package repa-3.2.3.1 ... linking ... done. You are using a new version of LLVM that hasn't been tested yet! We will try though...
There may be some support for requesting specific versions from Homebrew. With MacPorts I can install any or all of LLVM 2.9 through 3.4 (prerelease) and then use port select to specify which one is default (or even make Apple's the default while keeping the MP ones available).
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
Hi. On 10 August 2013 18:20, Brandon Allbery <allbery.b@gmail.com> wrote:
There may be some support for requesting specific versions from Homebrew.
Try `brew versions llvm`. Then, you'll need to run the git checkout command in `brew --prefix` directory. I am using llvm 3.2 because I had a few ghc related problems with llvm 3.3. Never had any problems with 3.2 though. Hope this helps, Ozgur
Thank you both. I seem to be running LLVM 3.2 so I am a bit puzzled by the warning. Is it because I am running ghc 7.6.2?
Dominics-MacBook-Pro:Laplace dom$ brew versions llvm 3.2 git checkout 40e9b90 /usr/local/Library/Formula/llvm.rb 3.1 git checkout 7d15192 /usr/local/Library/Formula/llvm.rb 3.0 git checkout 8022bf4 /usr/local/Library/Formula/llvm.rb 2.9 git checkout 471288b /usr/local/Library/Formula/llvm.rb 2.8 git checkout 1fb85ef /usr/local/Library/Formula/llvm.rb 2.7 git checkout d0efd9e /usr/local/Library/Formula/llvm.rb 2.6 git checkout 6ae3b89 /usr/local/Library/Formula/llvm.rb Dominics-MacBook-Pro:Laplace dom$ llc --version LLVM (http://llvm.org/): LLVM version 3.2svn Optimized build with assertions. Built Dec 22 2012 (01:03:07). Default target: x86_64-apple-darwin12.3.0 Host CPU: core-avx-i
Registered Targets: x86 - 32-bit X86: Pentium-Pro and above x86-64 - 64-bit X86: EM64T and AMD64 Dominics-MacBook-Pro:Laplace dom$ opt --version LLVM (http://llvm.org/): LLVM version 3.2svn Optimized build with assertions. Built Dec 22 2012 (01:03:07). Default target: x86_64-apple-darwin12.3.0 Host CPU: core-avx-i
Dominics-MacBook-Pro:Laplace dom$ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.6.2
Dominic Steinitz dominic@steinitz.org http://idontgetoutmuch.wordpress.com On 10 Aug 2013, at 18:41, Ozgur Akgun <ozgurakgun@gmail.com> wrote:
Hi.
On 10 August 2013 18:20, Brandon Allbery <allbery.b@gmail.com> wrote: There may be some support for requesting specific versions from Homebrew.
Try `brew versions llvm`. Then, you'll need to run the git checkout command in `brew --prefix` directory.
I am using llvm 3.2 because I had a few ghc related problems with llvm 3.3. Never had any problems with 3.2 though.
Hope this helps, Ozgur
On 11 August 2013 17:48, Dominic Steinitz <dominic@steinitz.org> wrote:
I seem to be running LLVM 3.2 so I am a bit puzzled by the warning. Is it because I am running ghc 7.6.2?
I get the warning too, but nothing seems to be broken with 3.2. This is what I meant to say, sorry if I was confusing. -- Ozgur Akgun
Ozgur Akgun <ozgurakgun@gmail.com> writes:
Hi.
On 10 August 2013 18:20, Brandon Allbery <allbery.b@gmail.com> wrote:
There may be some support for requesting specific versions from Homebrew.
Try `brew versions llvm`. Then, you'll need to run the git checkout command in `brew --prefix` directory.
Or brew tap homebrew/versions and then install llvm31 or whatever -- lelf
Just brew install llvm should work fine. The version warning is just the ghc devs beig conservative about what they are committing to supporting given finite resources and llvm changing over time. On Thursday, August 15, 2013, Anton Nikishaev wrote:
Ozgur Akgun <ozgurakgun@gmail.com <javascript:;>> writes:
Hi.
On 10 August 2013 18:20, Brandon Allbery <allbery.b@gmail.com<javascript:;>> wrote:
There may be some support for requesting specific versions from Homebrew.
Try `brew versions llvm`. Then, you'll need to run the git checkout command in `brew --prefix` directory.
Or brew tap homebrew/versions and then install llvm31 or whatever
-- lelf
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org <javascript:;> http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi. On 15 August 2013 20:35, Carter Schonwald <carter.schonwald@gmail.com>wrote:
Just brew install llvm should work fine.
::_M_insert_aux(__gnu_cxx::__normal_iterator<std::pair<llvm::BasicBlock*, llvm::SuccIterator<llvm::TerminatorInst*, llvm::BasicBlock> >*, std::vector<std::pair<llvm::BasicBlock*, llvm::SuccIterator<llvm::TerminatorInst*, llvm::BasicBlock> >, std::allocator<std::pair<llvm::BasicBlock*, llvm::SuccIterator<llvm::TerminatorInst*, llvm::BasicBlock> > > > >, std::pair<llvm::BasicBlock*, llvm::SuccIterator<llvm::TerminatorInst*, llvm::BasicBlock> > const&) + 6988 11 libdyld.dylib 0x00007fff8959c7e1 start + 0 12 libdyld.dylib 0x0000000000000006 start + 1990604837 Stack dump:
I wonder what makes you think this is the case. At this moment in time, `brew install llvm` will install llvm-3.3. Using llvm-3.3, I get warnings and errors. Using llvm-3.2, I get warnings but I never got any errors. This is not to say that they cannot happen on other packages. I've just uninstalled 3.2, installed 3.3, and tried to compile a project of mine. One of its dependencies, data-default-class, failed to compile. The following is what happened on my computer. Hope this helps, Ozgur. $ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.6.3 $ cabal --version cabal-install version 1.16.0.2 using version 1.16.0 of the Cabal library $ cabal install --force-reinstalls --disable-documentation --disable-library-profiling --disable-executable-profiling --ghc-options="-fllvm" data-default-class Resolving dependencies... Configuring data-default-class-0.0.1... Building data-default-class-0.0.1... Preprocessing library data-default-class-0.0.1... [1 of 1] Compiling Data.Default.Class ( Data/Default/Class.hs, dist/build/Data/Default/Class.o ) You are using a new version of LLVM that hasn't been tested yet! We will try though... wrong initalizer for intrinsic global variable [0 x i8*] undef Broken module found, compilation aborted! 0 libLLVM-3.3.dylib 0x000000010223faee llvm::sys::PrintStackTrace(__sFILE*) + 40 1 libLLVM-3.3.dylib 0x000000010223fef5 SignalHandler(int) + 241 2 libsystem_c.dylib 0x00007fff8601f94a _sigtramp + 26 3 libsystem_c.dylib 0x0000000102a10a00 _sigtramp + 2090799312 4 libLLVM-3.3.dylib 0x000000010223fd6d abort + 22 5 libLLVM-3.3.dylib 0x0000000101f08466 (anonymous namespace)::Verifier::abortIfBroken() + 236 6 libLLVM-3.3.dylib 0x0000000101f07b97 (anonymous namespace)::Verifier::doFinalization(llvm::Module&) + 3477 7 libLLVM-3.3.dylib 0x0000000101ef63a4 llvm::FPPassManager::doFinalization(llvm::Module&) + 56 8 libLLVM-3.3.dylib 0x0000000101ef5e52 llvm::FunctionPassManagerImpl::doFinalization(llvm::Module&) + 62 9 libLLVM-3.3.dylib 0x0000000101ef5d43 llvm::FunctionPassManager::doFinalization() + 21 10 opt 0x0000000101be19aa std::vector<std::pair<llvm::BasicBlock*, llvm::SuccIterator<llvm::TerminatorInst*, llvm::BasicBlock> >, std::allocator<std::pair<llvm::BasicBlock*, llvm::SuccIterator<llvm::TerminatorInst*, llvm::BasicBlock> > > 0. Program arguments: opt /var/folders/h5/3mmbxydn5qs3w9f3j6mgmhsc0000gn/T/ghc11789_0/ghc11789_0.ll -o /var/folders/h5/3mmbxydn5qs3w9f3j6mgmhsc0000gn/T/ghc11789_0/ghc11789_0.bc -O1 --enable-tbaa=true llc: /var/folders/h5/3mmbxydn5qs3w9f3j6mgmhsc0000gn/T/ghc11789_0/ghc11789_0.bc: error: Could not open input file: No such file or directory Failed to install data-default-class-0.0.1 cabal: Error: some packages failed to install: data-default-class-0.0.1 failed during the building phase. The exception was: ExitFailure 1
Huh. I thought the 3.3 llvm problems only happened when building ghc. Oops. Your absolutely right. Ghc < 7.7 does not generate in general, IR that llvm >= 3.3 will be happy with. On Thursday, August 15, 2013, Ozgur Akgun wrote:
Hi.
On 15 August 2013 20:35, Carter Schonwald <carter.schonwald@gmail.com<javascript:_e({}, 'cvml', 'carter.schonwald@gmail.com');>
wrote:
Just brew install llvm should work fine.
I wonder what makes you think this is the case.
At this moment in time, `brew install llvm` will install llvm-3.3. Using llvm-3.3, I get warnings and errors. Using llvm-3.2, I get warnings but I never got any errors. This is not to say that they cannot happen on other packages.
I've just uninstalled 3.2, installed 3.3, and tried to compile a project of mine. One of its dependencies, data-default-class, failed to compile. The following is what happened on my computer.
Hope this helps, Ozgur.
::_M_insert_aux(__gnu_cxx::__normal_iterator<std::pair<llvm::BasicBlock*, llvm::SuccIterator<llvm::TerminatorInst*, llvm::BasicBlock> >*, std::vector<std::pair<llvm::BasicBlock*, llvm::SuccIterator<llvm::TerminatorInst*, llvm::BasicBlock> >, std::allocator<std::pair<llvm::BasicBlock*, llvm::SuccIterator<llvm::TerminatorInst*, llvm::BasicBlock> > > > >, std::pair<llvm::BasicBlock*, llvm::SuccIterator<llvm::TerminatorInst*, llvm::BasicBlock> > const&) + 6988 11 libdyld.dylib 0x00007fff8959c7e1 start + 0 12 libdyld.dylib 0x0000000000000006 start + 1990604837 Stack dump:
$ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.6.3 $ cabal --version cabal-install version 1.16.0.2 using version 1.16.0 of the Cabal library $ cabal install --force-reinstalls --disable-documentation --disable-library-profiling --disable-executable-profiling --ghc-options="-fllvm" data-default-class Resolving dependencies... Configuring data-default-class-0.0.1... Building data-default-class-0.0.1... Preprocessing library data-default-class-0.0.1... [1 of 1] Compiling Data.Default.Class ( Data/Default/Class.hs, dist/build/Data/Default/Class.o ) You are using a new version of LLVM that hasn't been tested yet! We will try though... wrong initalizer for intrinsic global variable [0 x i8*] undef Broken module found, compilation aborted! 0 libLLVM-3.3.dylib 0x000000010223faee llvm::sys::PrintStackTrace(__sFILE*) + 40 1 libLLVM-3.3.dylib 0x000000010223fef5 SignalHandler(int) + 241 2 libsystem_c.dylib 0x00007fff8601f94a _sigtramp + 26 3 libsystem_c.dylib 0x0000000102a10a00 _sigtramp + 2090799312 4 libLLVM-3.3.dylib 0x000000010223fd6d abort + 22 5 libLLVM-3.3.dylib 0x0000000101f08466 (anonymous namespace)::Verifier::abortIfBroken() + 236 6 libLLVM-3.3.dylib 0x0000000101f07b97 (anonymous namespace)::Verifier::doFinalization(llvm::Module&) + 3477 7 libLLVM-3.3.dylib 0x0000000101ef63a4 llvm::FPPassManager::doFinalization(llvm::Module&) + 56 8 libLLVM-3.3.dylib 0x0000000101ef5e52 llvm::FunctionPassManagerImpl::doFinalization(llvm::Module&) + 62 9 libLLVM-3.3.dylib 0x0000000101ef5d43 llvm::FunctionPassManager::doFinalization() + 21 10 opt 0x0000000101be19aa std::vector<std::pair<llvm::BasicBlock*, llvm::SuccIterator<llvm::TerminatorInst*, llvm::BasicBlock> >, std::allocator<std::pair<llvm::BasicBlock*, llvm::SuccIterator<llvm::TerminatorInst*, llvm::BasicBlock> > > 0. Program arguments: opt /var/folders/h5/3mmbxydn5qs3w9f3j6mgmhsc0000gn/T/ghc11789_0/ghc11789_0.ll -o /var/folders/h5/3mmbxydn5qs3w9f3j6mgmhsc0000gn/T/ghc11789_0/ghc11789_0.bc -O1 --enable-tbaa=true llc: /var/folders/h5/3mmbxydn5qs3w9f3j6mgmhsc0000gn/T/ghc11789_0/ghc11789_0.bc: error: Could not open input file: No such file or directory Failed to install data-default-class-0.0.1 cabal: Error: some packages failed to install: data-default-class-0.0.1 failed during the building phase. The exception was: ExitFailure 1
Dominic Steinitz <dominic <at> steinitz.org> writes: Thanks for all the help everyone :-)
participants (5)
-
Anton Nikishaev -
Brandon Allbery -
Carter Schonwald -
Dominic Steinitz -
Ozgur Akgun