Building LLVM 3.7.1 fails on Windows with msys and cygwin

226 views
Skip to first unread message

Michael Louwrens

unread,
Feb 10, 2016, 9:09:50 AM2/10/16
to julia-users

I get the following error when trying to build Julia master on Windows 10 x64 using either msys2 or Cygwin.
llvm[3]: Building Intrinsics.gen.tmp from Intrinsics.td
Makefile:23: recipe for target '/c/julia/deps/build/llvm-3.7.1/build_Release/lib/IR/Release/Intrinsics.gen.tmp' failed
make
[3]: *** [/c/julia/deps/build/llvm-3.7.1/build_Release/lib/IR/Release/Intrinsics.gen.tmp] Segmentation fault
/c/julia/deps/srccache/llvm-3.7.1/Makefile.rules:880: recipe for target 'all' failed
make
[2]: *** [all] Error 1
Makefile:765: recipe for target 'build/llvm-3.7.1/build_Release/Release/lib/libLLVMCodeGen.a' failed
make
[1]: *** [build/llvm-3.7.1/build_Release/Release/lib/libLLVMCodeGen.a] Error 2
Makefile:81: recipe for target 'julia-deps' failed
make
: *** [julia-deps] Error 2

Unsure if this is an isolated case or not.


Also see below is trying to build llvm svn on ubuntu 15.04. It builds fine but ironically fails a copy. Unsure if this is an llvm or Julia issue.
Installing: /home/michaelwl/julia/usr-staging/build/llvm-svn/build_Release+Asserts/home/michaelwl/julia/usr/lib/cmake/llvm/./HandleLLVMStdlib.cmake
cp
: cannot stat ‘/home/michaelwl/julia/usr-staging/llvm-svn/build_Release+Asserts/home/michaelwl/julia/usr/*’: No such file or directory
Makefile:784: recipe for target '/home/michaelwl/julia/usr/lib/libLLVMCodeGen.a' failed
make[1]: *** [/home/michaelwl/julia/usr/lib/libLLVMCodeGen.a] Error 1
Makefile:81: recipe for target 'julia-deps' failed
make: *** [julia-deps] Error 2
michaelwl@ubuntu:~/julia$

Would appreciate any advice to solve these!
Thanks
Michael Louwrens

Tony Kelman

unread,
Feb 10, 2016, 10:54:26 AM2/10/16
to julia-users
The cmake version will be fixed by an open PR shortly.

3.7.1 has been working for me on cygwin, are all your packages fully updated?

Michael Louwrens

unread,
Feb 10, 2016, 1:42:48 PM2/10/16
to julia-users
A clean install or Cygwin functioned.

I had to do a clean install because Cygwin failed after updating. I seem to have used the experimental version of mingw64 on Cygwin which did not agree with compiling intrinsics.

I suspect this newer version may also be in the opensuse mingw that msys2 uses. Not sure which thing exactly is causing the issue but it is telling that both failed at the exact same spot and using Cygwin's older versions (Cur not Exp) of the tools pass that spot perfectly fine.

I am very confused with msys2 and llvm-svn. Somehow it believes it must use MSVC to compile LLVM.

Tony Kelman

unread,
Feb 10, 2016, 8:55:15 PM2/10/16
to julia-users
The cmake build of llvm in deps/Makefile might not be set up properly for msys yet. It may need to use a different cmake generator.

There is a bug in gcc 5 that causes it to miscompile llvm. This was fixed AIUI on gcc trunk which will hopefully become gcc 6 soonish. I'm not sure whether we have a workaround in place. Using a windows clang to build llvm in msys2 may also work but I think only Keno has tested that and he didn't write down many of the exact setup steps anywhere yet.

Reply all
Reply to author
Forward
0 new messages