Ticket #7143 (new bug)

Opened 9 months ago

Last modified 4 months ago

ghc-7.6.0.20120810-x86_64-windows.exe -> ghc can't figure out LLVM version

Reported by: cetinsert Owned by: dterei
Priority: high Milestone: 7.8.1
Component: Compiler (LLVM) Version: 7.6.1-rc1
Keywords: llvm Cc: shelarcy@…
Operating System: Windows Architecture: Unknown/Multiple
Type of failure: Incorrect warning at compile-time Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I have downloaded:

ghc: ghc-7.6.0.20120810-x86_64-windows.exe

mingw64:  http://www.drangon.org/mingw/mirror.php?num=2&fname=mingw-w64-bin-x86_64-20120807.7z

llvm64:  http://www.drangon.org/mingw/mirror.php?num=2&fname=llvm-3.1-w64-bin-x86_64-20120610.7z

my path contains:

/c/ghc/ghc-7.6.0.20120810/bin:/c/Users/Cetin/AppData/Roaming/cabal/bin:/c/llvm/bin:/c/mw64/bin

When I run:

ghc -fllvm --make Main.hs

I get:

[1 of 1] Compiling Main             ( Main.hs, Main.o )

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

Attached is the output from:

ghc -v3 -fllvm --make Main.hs

for all Main.hs - it mentions:

*** 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
*** LLVM Optimiser:
"" "C:\Users\Cetin\AppData\Local\Temp\ghc6036_0\ghc6036_0.ll" "-o" "C:\Users\Cetin\AppData\Local\Temp\ghc6036_0\ghc6036_0.bc" "-mem2reg" "--enable-tbaa=true"


Failed: "" "C:\Users\Cetin\AppData\Local\Temp\ghc6036_0\ghc6036_0.ll" "-o" "C:\Users\Cetin\AppData\Local\Temp\ghc6036_0\ghc6036_0.bc" "-mem2reg" "--enable-tb

Attachments

llvm-full-version-check Download (6.0 KB) - added by cetinsert 9 months ago.
checking versions of llc and opt in the same session as a -v3 compilation with ghc -fllvm

Change History

Changed 9 months ago by cetinsert

checking versions of llc and opt in the same session as a -v3 compilation with ghc -fllvm

Changed 9 months ago by cetinsert

  • summary changed from ghc-7.6.0.20120810-x86_64-windows.exe -> ghc can't figure out LLC version to ghc-7.6.0.20120810-x86_64-windows.exe -> ghc can't figure out LLVM version

Changed 9 months ago by igloo

  • priority changed from normal to high
  • difficulty set to Unknown
  • milestone set to 7.8.1

Thanks for the report. I've never tried to use LLVM, but GHC's built-in native-code-generator should work, so I don't think this is urgent. I've therefore milestoned it for 7.8.

Changed 9 months ago by dterei

  • owner set to dterei

Thanks for the report cetinsert, I'll take a look as time permits.

Changed 8 months ago by shelarcy

  • cc shelarcy@… added
  • architecture changed from x86_64 (amd64) to Unknown/Multiple

Windows 32 bit version causes same problem.

> ghc -info
 [("Project name","The Glorious Glasgow Haskell Compilation System")
 ,("GCC extra via C opts"," -fwrapv")
 ,("C compiler command","$topdir/../mingw/bin/gcc.exe")
 ,("C compiler flags"," -fno-stack-protector  -Wl,--hash-size=31 -Wl,--reduce-me
mory-overheads")
 ,("ar command","$topdir/../mingw/bin/ar.exe")
 ,("ar flags","q")
 ,("ar supports at file","YES")
 ,("touch command","$topdir/touchy.exe")
 ,("dllwrap command","$topdir/../mingw/bin/dllwrap.exe")
 ,("windres command","$topdir/../mingw/bin/windres.exe")
 ,("perl command","$topdir/../perl/perl.exe")
 ,("target os","OSMinGW32")
 ,("target arch","ArchX86")
 ,("target word size","4")
 ,("target has GNU nonexec stack","False")
 ,("target has .ident directive","True")
 ,("target has subsections via symbols","False")
 ,("LLVM llc command","")
 ,("LLVM opt command","")
 ,("Project version","7.6.1")
 ,("Booter version","7.4.2")
 ,("Stage","2")
 ,("Build platform","i386-unknown-mingw32")
 ,("Host platform","i386-unknown-mingw32")
 ,("Target platform","i386-unknown-mingw32")
 ,("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_debu
g_dyn")
 ,("Leading underscore","YES")
 ,("Debug on","False")
 ,("LibDir","C:\\ghc\\ghc-7.6.1\\lib")
 ,("Global Package DB","C:\\ghc\\ghc-7.6.1\\lib\\package.conf.d")
 ,("Gcc Linker flags","[\"-Wl,--hash-size=31\",\"-Wl,--reduce-memory-overheads\"
]")
 ,("Ld Linker flags","[\"--hash-size=31\",\"--reduce-memory-overheads\"]")
 ]

> ghc -fllvm Main.hs
[1 of 1] Compiling Main             ( Main.hs, Main.o )

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

I used GHC 7.6.1 with LLVM official site's LLVM 2.9 binary.

> llc --version
Low Level Virtual Machine (http://llvm.org/):
  llvm version 2.9
  Optimized build.
  Built Apr  6 2011 (03:41:01).
  Host: i386-pc-mingw32
  Host CPU: i686

Changed 6 months ago by igloo

  • component changed from Compiler to Compiler (LLVM)

Changed 4 months ago by shelarcy

This bug is also discussed in below thread.

*  http://www.haskell.org/pipermail/ghc-devs/2013-January/thread.html#25

Note: See TracTickets for help on using tickets.