LLVM failures

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

LLVM failures

Simon Peyton Jones
I'm getting testsuite failures like this on Windows

<no location info>:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM

Fair enough, but shouldn't 'configure' find out if I have LLVM.  And if I don't, shouldn't the tests be disabled?

Do we have instructions for installing LLVM on Windows?

Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130114/a371bddd/attachment.htm>

Reply | Threaded
Open this post in threaded view
|

LLVM failures

David Terei
'configure' could play a role but doesn't at the moment as we always
compile the LLVM backend and it dynamically supports a few different
LLVM versions. So there has been nothing to decide at compile time.

A patch was added a while back to allow 'configure' to specify where
to find the llvm binaries instead of just expecting them on the PATH
but that is all for now.

An extremely minimal guide exists in the userguide:

http://www.haskell.org/ghc/docs/latest/html/users_guide/code-generators.html#llvm-code-gen

We simply point you to the download page for LLVM.

http://llvm.org/releases/download.html#3.2

I haven't tried on Windows for a little while but historically it was
very easy, just unzip the files and make sure the binaries are in your
PATH. More detailed installation instructions would be worthwhile
though.

On 15 January 2013 04:56, Simon Peyton-Jones <simonpj at microsoft.com> wrote:

> I?m getting testsuite failures like this on Windows
>
>
>
> <no location info>:
>
>     Warning: Couldn't figure out LLVM version!
>
>              Make sure you have installed LLVM
>
>
>
> Fair enough, but shouldn?t ?configure? find out if I have LLVM.  And if I
> don?t, shouldn?t the tests be disabled?
>
>
>
> Do we have instructions for installing LLVM on Windows?
>
>
>
> Simon
>
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
>


Reply | Threaded
Open this post in threaded view
|

LLVM failures

Simon Marlow-7
In reply to this post by Simon Peyton Jones
On 14/01/13 17:56, Simon Peyton-Jones wrote:

> I?m getting testsuite failures like this on Windows
>
> <no location info>:
>
>      Warning: Couldn't figure out LLVM version!
>
>               Make sure you have installed LLVM
>
> Fair enough, but shouldn?t ?configure? find out if I have LLVM.  And if
> I don?t, shouldn?t the tests be disabled?

The 'llvm' way is supposed to be disabled in the testsuite if LLVM is
not found.  Here is the code from testsuite/mk/test.mk:

ifneq "$(shell $(SHELL) -c 'llc --version | grep version' 2> /dev/null)" ""
RUNTEST_OPTS += -e ghc_with_llvm=1
else
RUNTEST_OPTS += -e ghc_with_llvm=0
endif

Maybe this isn't working?  Or maybe you have llc on your path, but
there's something wrong with it? Which test is failing specifically?

Cheers,
        Simon


> Do we have instructions for installing LLVM on Windows?
>
> Simon
>
>
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
>



Reply | Threaded
Open this post in threaded view
|

LLVM failures

Simon Peyton Jones
| >      Warning: Couldn't figure out LLVM version!
| >               Make sure you have installed LLVM
| >
...
| The 'llvm' way is supposed to be disabled in the testsuite if LLVM is
| not found.  Here is the code from testsuite/mk/test.mk:
...
| Maybe this isn't working?  Or maybe you have llc on your path, but
| there's something wrong with it? Which test is failing specifically?

Ah. Yes!  There *is* an llc.exe on my path, and it comes with the Haskell Platform!

bash-3.1$ which llc
/c/fp/HP-2012.4.0.0/mingw/bin/llc.exe

Details below. So I suppose the next question is why it doesn't work?

Simon



bash-3.1$ llc --version
LLVM (http://llvm.org/):
  LLVM version 3.1
  Optimized build with assertions.
  Built May 22 2012 (00:18:58).
  Default target: i686-pc-mingw32
  Host CPU: corei7

  Registered Targets:
    arm      - ARM
    cellspu  - STI CBEA Cell SPU [experimental]
    cpp      - C++ backend
    hexagon  - Hexagon
    mblaze   - MBlaze
    mips     - Mips
    mips64   - Mips64 [experimental]
    mips64el - Mips64el [experimental]
    mipsel   - Mipsel
    msp430   - MSP430 [experimental]
    ppc32    - PowerPC 32
    ppc64    - PowerPC 64
    ptx32    - PTX (32-bit) [Experimental]
    ptx64    - PTX (64-bit) [Experimental]
    sparc    - Sparc
    sparcv9  - Sparc V9
    thumb    - Thumb
    x86      - 32-bit X86: Pentium-Pro and above
    x86-64   - 64-bit X86: EM64T and AMD64
    xcore    - XCore
bash-3.1$



Reply | Threaded
Open this post in threaded view
|

LLVM failures

David Terei
If you try compiling something with the LLVM backend but with '-v2'
enabled, it should tell you why it can't figure out the LLVM version
in use. I'll try to test myself but it may be a little while before I
have a windows box setup for that.

On 16 January 2013 19:43, Simon Peyton-Jones <simonpj at microsoft.com> wrote:

> | >      Warning: Couldn't figure out LLVM version!
> | >               Make sure you have installed LLVM
> | >
> ...
> | The 'llvm' way is supposed to be disabled in the testsuite if LLVM is
> | not found.  Here is the code from testsuite/mk/test.mk:
> ...
> | Maybe this isn't working?  Or maybe you have llc on your path, but
> | there's something wrong with it? Which test is failing specifically?
>
> Ah. Yes!  There *is* an llc.exe on my path, and it comes with the Haskell Platform!
>
> bash-3.1$ which llc
> /c/fp/HP-2012.4.0.0/mingw/bin/llc.exe
>
> Details below. So I suppose the next question is why it doesn't work?
>
> Simon
>
>
>
> bash-3.1$ llc --version
> LLVM (http://llvm.org/):
>   LLVM version 3.1
>   Optimized build with assertions.
>   Built May 22 2012 (00:18:58).
>   Default target: i686-pc-mingw32
>   Host CPU: corei7
>
>   Registered Targets:
>     arm      - ARM
>     cellspu  - STI CBEA Cell SPU [experimental]
>     cpp      - C++ backend
>     hexagon  - Hexagon
>     mblaze   - MBlaze
>     mips     - Mips
>     mips64   - Mips64 [experimental]
>     mips64el - Mips64el [experimental]
>     mipsel   - Mipsel
>     msp430   - MSP430 [experimental]
>     ppc32    - PowerPC 32
>     ppc64    - PowerPC 64
>     ptx32    - PTX (32-bit) [Experimental]
>     ptx64    - PTX (64-bit) [Experimental]
>     sparc    - Sparc
>     sparcv9  - Sparc V9
>     thumb    - Thumb
>     x86      - 32-bit X86: Pentium-Pro and above
>     x86-64   - 64-bit X86: EM64T and AMD64
>     xcore    - XCore
> bash-3.1$
>


Reply | Threaded
Open this post in threaded view
|

LLVM failures

Nathan Hüsken
In reply to this post by Simon Peyton Jones
Remember getting these errors, and I remember fixing them by having
llc-3.0 and opt-3.0 in the path.

On 01/14/2013 06:56 PM, Simon Peyton-Jones wrote:

> I'm getting testsuite failures like this on Windows
>
> <no location info>:
>     Warning: Couldn't figure out LLVM version!
>              Make sure you have installed LLVM
>
> Fair enough, but shouldn't 'configure' find out if I have LLVM.  And if I don't, shouldn't the tests be disabled?
>
> Do we have instructions for installing LLVM on Windows?
>
> Simon
>
>
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
>



Reply | Threaded
Open this post in threaded view
|

LLVM failures

David Terei
In reply to this post by Simon Peyton Jones
Oh and LLVM 3.1 is a supported version so it should be fine. LLVM 3.2
(released last month) isn't yet supported.

On 16 January 2013 19:43, Simon Peyton-Jones <simonpj at microsoft.com> wrote:

> | >      Warning: Couldn't figure out LLVM version!
> | >               Make sure you have installed LLVM
> | >
> ...
> | The 'llvm' way is supposed to be disabled in the testsuite if LLVM is
> | not found.  Here is the code from testsuite/mk/test.mk:
> ...
> | Maybe this isn't working?  Or maybe you have llc on your path, but
> | there's something wrong with it? Which test is failing specifically?
>
> Ah. Yes!  There *is* an llc.exe on my path, and it comes with the Haskell Platform!
>
> bash-3.1$ which llc
> /c/fp/HP-2012.4.0.0/mingw/bin/llc.exe
>
> Details below. So I suppose the next question is why it doesn't work?
>
> Simon
>
>
>
> bash-3.1$ llc --version
> LLVM (http://llvm.org/):
>   LLVM version 3.1
>   Optimized build with assertions.
>   Built May 22 2012 (00:18:58).
>   Default target: i686-pc-mingw32
>   Host CPU: corei7
>
>   Registered Targets:
>     arm      - ARM
>     cellspu  - STI CBEA Cell SPU [experimental]
>     cpp      - C++ backend
>     hexagon  - Hexagon
>     mblaze   - MBlaze
>     mips     - Mips
>     mips64   - Mips64 [experimental]
>     mips64el - Mips64el [experimental]
>     mipsel   - Mipsel
>     msp430   - MSP430 [experimental]
>     ppc32    - PowerPC 32
>     ppc64    - PowerPC 64
>     ptx32    - PTX (32-bit) [Experimental]
>     ptx64    - PTX (64-bit) [Experimental]
>     sparc    - Sparc
>     sparcv9  - Sparc V9
>     thumb    - Thumb
>     x86      - 32-bit X86: Pentium-Pro and above
>     x86-64   - 64-bit X86: EM64T and AMD64
>     xcore    - XCore
> bash-3.1$
>


Reply | Threaded
Open this post in threaded view
|

LLVM failures

Simon Peyton Jones
In reply to this post by Nathan Hüsken
| Remember getting these errors, and I remember fixing them by having
| llc-3.0 and opt-3.0 in the path.

Hmm. Well, HP has llc 3.1 so if that doesn't work it's a right nuisance.

David said to try -v2. Here's the result

*** LlVM CodeGen:
Error (figuring out LLVM version): : runInteractiveProcess: invalid argument (Invalid argument)

<no location info>:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM

I have no idea what "invalid argument" means. I can do further experiments if told what to try.

Simon

| -----Original Message-----
| From: ghc-devs-bounces at haskell.org [mailto:ghc-devs-bounces at haskell.org]
| On Behalf Of Nathan H?sken
| Sent: 16 January 2013 09:15
| To: ghc-devs at haskell.org
| Subject: Re: LLVM failures
|
| Remember getting these errors, and I remember fixing them by having
| llc-3.0 and opt-3.0 in the path.
|
| On 01/14/2013 06:56 PM, Simon Peyton-Jones wrote:
| > I'm getting testsuite failures like this on Windows
| >
| > <no location info>:
| >     Warning: Couldn't figure out LLVM version!
| >              Make sure you have installed LLVM
| >
| > Fair enough, but shouldn't 'configure' find out if I have LLVM.  And
| if I don't, shouldn't the tests be disabled?
| >
| > Do we have instructions for installing LLVM on Windows?
| >
| > Simon
| >
| >
| >
| > _______________________________________________
| > ghc-devs mailing list
| > ghc-devs at haskell.org
| > http://www.haskell.org/mailman/listinfo/ghc-devs
| >
|
|
| _______________________________________________
| ghc-devs mailing list
| ghc-devs at haskell.org
| http://www.haskell.org/mailman/listinfo/ghc-devs


Reply | Threaded
Open this post in threaded view
|

LLVM failures

David Terei
My guess is llc doesn't like the arguments being passed to it. Try
running llc as follows:

$ llc -version

(one dash, not two). That works fine on linux and osx. Does it not
work on windows?

Cheers,
David

On 16 January 2013 21:30, Simon Peyton-Jones <simonpj at microsoft.com> wrote:

> | Remember getting these errors, and I remember fixing them by having
> | llc-3.0 and opt-3.0 in the path.
>
> Hmm. Well, HP has llc 3.1 so if that doesn't work it's a right nuisance.
>
> David said to try -v2. Here's the result
>
> *** LlVM CodeGen:
> Error (figuring out LLVM version): : runInteractiveProcess: invalid argument (Invalid argument)
>
> <no location info>:
>     Warning: Couldn't figure out LLVM version!
>              Make sure you have installed LLVM
>
> I have no idea what "invalid argument" means. I can do further experiments if told what to try.
>
> Simon
>
> | -----Original Message-----
> | From: ghc-devs-bounces at haskell.org [mailto:ghc-devs-bounces at haskell.org]
> | On Behalf Of Nathan H?sken
> | Sent: 16 January 2013 09:15
> | To: ghc-devs at haskell.org
> | Subject: Re: LLVM failures
> |
> | Remember getting these errors, and I remember fixing them by having
> | llc-3.0 and opt-3.0 in the path.
> |
> | On 01/14/2013 06:56 PM, Simon Peyton-Jones wrote:
> | > I'm getting testsuite failures like this on Windows
> | >
> | > <no location info>:
> | >     Warning: Couldn't figure out LLVM version!
> | >              Make sure you have installed LLVM
> | >
> | > Fair enough, but shouldn't 'configure' find out if I have LLVM.  And
> | if I don't, shouldn't the tests be disabled?
> | >
> | > Do we have instructions for installing LLVM on Windows?
> | >
> | > Simon
> | >
> | >
> | >
> | > _______________________________________________
> | > ghc-devs mailing list
> | > ghc-devs at haskell.org
> | > http://www.haskell.org/mailman/listinfo/ghc-devs
> | >
> |
> |
> | _______________________________________________
> | ghc-devs mailing list
> | ghc-devs at haskell.org
> | http://www.haskell.org/mailman/listinfo/ghc-devs
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs


Reply | Threaded
Open this post in threaded view
|

LLVM failures

Simon Peyton Jones
It's fine.  llc -version (one dash) works ok.  see below

bash-3.1$ llc -version
LLVM (http://llvm.org/):
  LLVM version 3.1
  Optimized build with assertions.
  Built May 22 2012 (00:18:58).
  Default target: i686-pc-mingw32
  Host CPU: corei7

  Registered Targets:
    arm      - ARM
    cellspu  - STI CBEA Cell SPU [experimental]
    cpp      - C++ backend
    hexagon  - Hexagon
    mblaze   - MBlaze
    mips     - Mips
    mips64   - Mips64 [experimental]
    mips64el - Mips64el [experimental]
    mipsel   - Mipsel
    msp430   - MSP430 [experimental]
    ppc32    - PowerPC 32
    ppc64    - PowerPC 64
    ptx32    - PTX (32-bit) [Experimental]
    ptx64    - PTX (64-bit) [Experimental]
    sparc    - Sparc
    sparcv9  - Sparc V9
    thumb    - Thumb
    x86      - 32-bit X86: Pentium-Pro and above
    x86-64   - 64-bit X86: EM64T and AMD64
    xcore    - XCore
bash-3.1$

| -----Original Message-----
| From: David Terei [mailto:davidterei at gmail.com]
| Sent: 16 January 2013 10:59
| To: Simon Peyton-Jones
| Cc: Nathan H?sken; ghc-devs at haskell.org
| Subject: Re: LLVM failures
|
| My guess is llc doesn't like the arguments being passed to it. Try
| running llc as follows:
|
| $ llc -version
|
| (one dash, not two). That works fine on linux and osx. Does it not work
| on windows?
|
| Cheers,
| David
|
| On 16 January 2013 21:30, Simon Peyton-Jones <simonpj at microsoft.com>
| wrote:
| > | Remember getting these errors, and I remember fixing them by having
| > | llc-3.0 and opt-3.0 in the path.
| >
| > Hmm. Well, HP has llc 3.1 so if that doesn't work it's a right
| nuisance.
| >
| > David said to try -v2. Here's the result
| >
| > *** LlVM CodeGen:
| > Error (figuring out LLVM version): : runInteractiveProcess: invalid
| > argument (Invalid argument)
| >
| > <no location info>:
| >     Warning: Couldn't figure out LLVM version!
| >              Make sure you have installed LLVM
| >
| > I have no idea what "invalid argument" means. I can do further
| experiments if told what to try.
| >
| > Simon
| >
| > | -----Original Message-----
| > | From: ghc-devs-bounces at haskell.org
| > | [mailto:ghc-devs-bounces at haskell.org]
| > | On Behalf Of Nathan H?sken
| > | Sent: 16 January 2013 09:15
| > | To: ghc-devs at haskell.org
| > | Subject: Re: LLVM failures
| > |
| > | Remember getting these errors, and I remember fixing them by having
| > | llc-3.0 and opt-3.0 in the path.
| > |
| > | On 01/14/2013 06:56 PM, Simon Peyton-Jones wrote:
| > | > I'm getting testsuite failures like this on Windows
| > | >
| > | > <no location info>:
| > | >     Warning: Couldn't figure out LLVM version!
| > | >              Make sure you have installed LLVM
| > | >
| > | > Fair enough, but shouldn't 'configure' find out if I have LLVM.
| > | > And
| > | if I don't, shouldn't the tests be disabled?
| > | >
| > | > Do we have instructions for installing LLVM on Windows?
| > | >
| > | > Simon
| > | >
| > | >
| > | >
| > | > _______________________________________________
| > | > ghc-devs mailing list
| > | > ghc-devs at haskell.org
| > | > http://www.haskell.org/mailman/listinfo/ghc-devs
| > | >
| > |
| > |
| > | _______________________________________________
| > | ghc-devs mailing list
| > | ghc-devs at haskell.org
| > | http://www.haskell.org/mailman/listinfo/ghc-devs
| >
| > _______________________________________________
| > ghc-devs mailing list
| > ghc-devs at haskell.org
| > http://www.haskell.org/mailman/listinfo/ghc-devs


Reply | Threaded
Open this post in threaded view
|

LLVM failures

David Terei
OK I'll try to get a windows machine up and fix this in the next week or so.

On 16 January 2013 23:29, Simon Peyton-Jones <simonpj at microsoft.com> wrote:

> It's fine.  llc -version (one dash) works ok.  see below
>
> bash-3.1$ llc -version
> LLVM (http://llvm.org/):
>   LLVM version 3.1
>   Optimized build with assertions.
>   Built May 22 2012 (00:18:58).
>   Default target: i686-pc-mingw32
>   Host CPU: corei7
>
>   Registered Targets:
>     arm      - ARM
>     cellspu  - STI CBEA Cell SPU [experimental]
>     cpp      - C++ backend
>     hexagon  - Hexagon
>     mblaze   - MBlaze
>     mips     - Mips
>     mips64   - Mips64 [experimental]
>     mips64el - Mips64el [experimental]
>     mipsel   - Mipsel
>     msp430   - MSP430 [experimental]
>     ppc32    - PowerPC 32
>     ppc64    - PowerPC 64
>     ptx32    - PTX (32-bit) [Experimental]
>     ptx64    - PTX (64-bit) [Experimental]
>     sparc    - Sparc
>     sparcv9  - Sparc V9
>     thumb    - Thumb
>     x86      - 32-bit X86: Pentium-Pro and above
>     x86-64   - 64-bit X86: EM64T and AMD64
>     xcore    - XCore
> bash-3.1$
>
> | -----Original Message-----
> | From: David Terei [mailto:davidterei at gmail.com]
> | Sent: 16 January 2013 10:59
> | To: Simon Peyton-Jones
> | Cc: Nathan H?sken; ghc-devs at haskell.org
> | Subject: Re: LLVM failures
> |
> | My guess is llc doesn't like the arguments being passed to it. Try
> | running llc as follows:
> |
> | $ llc -version
> |
> | (one dash, not two). That works fine on linux and osx. Does it not work
> | on windows?
> |
> | Cheers,
> | David
> |
> | On 16 January 2013 21:30, Simon Peyton-Jones <simonpj at microsoft.com>
> | wrote:
> | > | Remember getting these errors, and I remember fixing them by having
> | > | llc-3.0 and opt-3.0 in the path.
> | >
> | > Hmm. Well, HP has llc 3.1 so if that doesn't work it's a right
> | nuisance.
> | >
> | > David said to try -v2. Here's the result
> | >
> | > *** LlVM CodeGen:
> | > Error (figuring out LLVM version): : runInteractiveProcess: invalid
> | > argument (Invalid argument)
> | >
> | > <no location info>:
> | >     Warning: Couldn't figure out LLVM version!
> | >              Make sure you have installed LLVM
> | >
> | > I have no idea what "invalid argument" means. I can do further
> | experiments if told what to try.
> | >
> | > Simon
> | >
> | > | -----Original Message-----
> | > | From: ghc-devs-bounces at haskell.org
> | > | [mailto:ghc-devs-bounces at haskell.org]
> | > | On Behalf Of Nathan H?sken
> | > | Sent: 16 January 2013 09:15
> | > | To: ghc-devs at haskell.org
> | > | Subject: Re: LLVM failures
> | > |
> | > | Remember getting these errors, and I remember fixing them by having
> | > | llc-3.0 and opt-3.0 in the path.
> | > |
> | > | On 01/14/2013 06:56 PM, Simon Peyton-Jones wrote:
> | > | > I'm getting testsuite failures like this on Windows
> | > | >
> | > | > <no location info>:
> | > | >     Warning: Couldn't figure out LLVM version!
> | > | >              Make sure you have installed LLVM
> | > | >
> | > | > Fair enough, but shouldn't 'configure' find out if I have LLVM.
> | > | > And
> | > | if I don't, shouldn't the tests be disabled?
> | > | >
> | > | > Do we have instructions for installing LLVM on Windows?
> | > | >
> | > | > Simon
> | > | >
> | > | >
> | > | >
> | > | > _______________________________________________
> | > | > ghc-devs mailing list
> | > | > ghc-devs at haskell.org
> | > | > http://www.haskell.org/mailman/listinfo/ghc-devs
> | > | >
> | > |
> | > |
> | > | _______________________________________________
> | > | ghc-devs mailing list
> | > | ghc-devs at haskell.org
> | > | http://www.haskell.org/mailman/listinfo/ghc-devs
> | >
> | > _______________________________________________
> | > ghc-devs mailing list
> | > ghc-devs at haskell.org
> | > http://www.haskell.org/mailman/listinfo/ghc-devs