JuliaInterop / Cxx.jl

The Julia C++ Interface
Other
758 stars 108 forks source link

Windows support #62

Open SimonDanisch opened 9 years ago

SimonDanisch commented 9 years ago

Hi, I don't read anywhere, if windows is supported or not. I tried to build julia and ran into this:

which: no python in (/usr/local/bin:/usr/bin:/opt/bin:/mingw/bin:/python:/home/Sim/julia/usr/lib:/home/Sim/julia/usr/lib/julia:/c/Program Files/7-zip:/home/Sim/julia/usr/lib:/home/Sim/julia/usr/lib/julia:/c/Program Files/7-zip)
/bin/sh: line 3: ../configure: No such file or directory
Makefile:504: recipe for target 'llvm-svn/build_Release+Asserts/config.status' failed
make[2]: *** [llvm-svn/build_Release+Asserts/config.status] Error 127
Makefile:101: recipe for target 'julia-release' failed
make[1]: *** [julia-release] Error 2
Makefile:49: recipe for target 'release' failed
make: *** [release] Error 2

The llvm-svn folder is mostly empty...

Best, Simon

SimonDanisch commented 9 years ago

After some more make cleanall and the like, it seems to build llvm... Also I'm using make instead of make -j4. I'll see if it finishes this time.

SimonDanisch commented 9 years ago

Hmpf...

/usr/bin/rm: cannot remove ‘/home/Sim/julia/deps/llvm-svn/build_Release+Asserts/           tools/lldb/source/Release+Asserts/lldb.d.tmp’: No such file or directory
/home/Sim/julia/deps/llvm-svn/Makefile.rules:1514: recipe for target '/home/Sim/           julia/deps/llvm-svn/build_Release+Asserts/tools/lldb/source/Release+Asserts/lldb           .o' failed
make[6]: *** [/home/Sim/julia/deps/llvm-svn/build_Release+Asserts/tools/lldb/sou           rce/Release+Asserts/lldb.o] Error 1
/home/Sim/julia/deps/llvm-svn/Makefile.rules:873: recipe for target 'all' failed
make[5]: *** [all] Error 1
/home/Sim/julia/deps/llvm-svn/Makefile.rules:958: recipe for target 'all' failed
make[4]: *** [all] Error 1
/home/Sim/julia/deps/llvm-svn/Makefile.rules:873: recipe for target 'all' failed
make[3]: *** [all] Error 1
Makefile:511: recipe for target 'llvm-svn/build_Release+Asserts/Release+Asserts/           lib/libLLVMCodeGen.a' failed
make[2]: *** [llvm-svn/build_Release+Asserts/Release+Asserts/lib/libLLVMCodeGen.           a] Error 2
Makefile:101: recipe for target 'julia-release' failed
make[1]: *** [julia-release] Error 2
Makefile:49: recipe for target 'release' failed
make: *** [release] Error 2
SimonDanisch commented 9 years ago

Full error:

llvm[7]: ======= Finished Linking Release+Asserts Unit test libclang (without symbols)
llvm[6]: Compiling lldb.cpp for Release+Asserts build
In file included from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/lldb.cpp:86:0:
C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/Host/windows/windows.h:14:0: warning: "_WIN32_WINNT" redefined [enabled by default]
 #define _WIN32_WINNT _WIN32_WINNT_VISTA
 ^
In file included from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\x86_64-w64-mingw32\include\vadefs.h:9:0,
                 from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\x86_64-w64-mingw32\include\_mingw_stdarg.h:14,
                 from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\x86_64-w64-mingw32\include\stdarg.h:140,
                 from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.1\include\stdarg.h:1,
                 from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/Host/windows/win32.h:13,
                 from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-private.h:16,
                 from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/lldb.cpp:12:
c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\x86_64-w64-mingw32\include\_mingw.h:229:0: note: this is the location of the previous definition
 #define _WIN32_WINNT 0x502
 ^
In file included from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/lldb.cpp:86:0:
C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/Host/windows/windows.h:17:0: warning: "NOMINMAX" redefined [enabled by default]
 #define NOMINMAX
 ^
In file included from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.1\include\c++\x86_64-w64-mingw32\bits\c++config.h:420:0,
                 from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.1\include\c++\utility:68,
                 from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.1\include\c++\algorithm:60,
                 from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/Utility/SharingPtr.h:13,
                 from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-forward.h:15,
                 from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-types.h:14,
                 from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-defines.h:13,
                 from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-public.h:13,
                 from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-private.h:23,
                 from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/lldb.cpp:12:
c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.1\include\c++\x86_64-w64-mingw32\bits\os_defines.h:45:0: note: this is the location of the previous definition
 #define NOMINMAX 1
 ^
In file included from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-private.h:16:0,
                 from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/lldb.cpp:12:
C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/Host/windows/win32.h:79:8: error: redefinition of 'struct timespec'
 struct timespec
        ^
In file included from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\x86_64-w64-mingw32\include\time.h:277:0,
                 from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/Host/windows/win32.h:14,
                 from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-private.h:16,
                 from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/lldb.cpp:12:
c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\x86_64-w64-mingw32\include\sys\timeb.h:90:8: error: previous definition of 'struct timespec'
 struct timespec {
        ^
In file included from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-private.h:16:0,
                 from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/lldb.cpp:12:
C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/Host/windows/win32.h: In function 'int vasprintf(char**, const char*, char*)':
C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/Host/windows/win32.h:17:5: error: previous declaration of 'int vasprintf(char**, const char*, va_list)' with 'C++' linkage
 int vasprintf(char **ret, const char *fmt, va_list ap);
     ^
In file included from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.1\include\c++\cstdio:42:0,
                 from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.1\include\c++\random:39,
                 from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
                 from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.1\include\c++\algorithm:62,
                 from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/Utility/SharingPtr.h:13,
                 from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-forward.h:15,
                 from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-types.h:14,
                 from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-defines.h:13,
                 from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-public.h:13,
                 from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-private.h:23,
                 from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/lldb.cpp:12:
c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\x86_64-w64-mingw32\include\stdio.h:213:81: error: conflicts with new declaration with 'C' linkage
 int vasprintf(char **__ret, const char *__format, __builtin_va_list __local_argv)
                                                                                 ^
/usr/bin/rm: cannot remove ‘/home/Sim/julia/deps/llvm-svn/build_Release+Asserts/tools/lldb/source/Release+Asserts/lldb.d.tmp’: No such file or directory
/home/Sim/julia/deps/llvm-svn/Makefile.rules:1514: recipe for target '/home/Sim/julia/deps/llvm-svn/build_Release+Asserts/tools/lldb/source/Release+Asserts/lldb.o' failed
make[6]: *** [/home/Sim/julia/deps/llvm-svn/build_Release+Asserts/tools/lldb/source/Release+Asserts/lldb.o] Error 1
/home/Sim/julia/deps/llvm-svn/Makefile.rules:873: recipe for target 'all' failed
make[5]: *** [all] Error 1
/home/Sim/julia/deps/llvm-svn/Makefile.rules:958: recipe for target 'all' failed
make[4]: *** [all] Error 1
/home/Sim/julia/deps/llvm-svn/Makefile.rules:873: recipe for target 'all' failed
make[3]: *** [all] Error 1
Makefile:511: recipe for target 'llvm-svn/build_Release+Asserts/Release+Asserts/lib/libLLVMCodeGen.a' failed
make[2]: *** [llvm-svn/build_Release+Asserts/Release+Asserts/lib/libLLVMCodeGen.a] Error 2
Makefile:101: recipe for target 'julia-release' failed
make[1]: *** [julia-release] Error 2
Makefile:49: recipe for target 'release' failed
make: *** [release] Error 2
ihnorton commented 9 years ago

I built 3.6 on windows a few days ago but julia wouldn't start. Haven't drbugged yet. Anyway this is a julia issue first... see the llvm 3.5 support issue. On Jan 7, 2015 7:03 AM, "Sdanisch" notifications@github.com wrote:

Full error:

llvm[7]: ======= Finished Linking Release+Asserts Unit test libclang (without symbols) llvm[6]: Compiling lldb.cpp for Release+Asserts build In file included from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/lldb.cpp:86:0: C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/Host/windows/windows.h:14:0: warning: "_WIN32_WINNT" redefined [enabled by default]

define _WIN32_WINNT _WIN32_WINNT_VISTA

^ In file included from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\x86_64-w64-mingw32\include\vadefs.h:9:0, from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\x86_64-w64-mingw32\include_mingw_stdarg.h:14, from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\x86_64-w64-mingw32\include\stdarg.h:140, from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.1\include\stdarg.h:1, from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/Host/windows/win32.h:13, from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-private.h:16, from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/lldb.cpp:12: c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\x86_64-w64-mingw32\include_mingw.h:229:0: note: this is the location of the previous definition

define _WIN32_WINNT 0x502

^ In file included from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/lldb.cpp:86:0: C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/Host/windows/windows.h:17:0: warning: "NOMINMAX" redefined [enabled by default]

define NOMINMAX

^ In file included from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.1\include\c++\x86_64-w64-mingw32\bits\c++config.h:420:0, from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.1\include\c++\utility:68, from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.1\include\c++\algorithm:60, from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/Utility/SharingPtr.h:13, from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-forward.h:15, from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-types.h:14, from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-defines.h:13, from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-public.h:13, from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-private.h:23, from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/lldb.cpp:12: c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.1\include\c++\x86_64-w64-mingw32\bits\os_defines.h:45:0: note: this is the location of the previous definition

define NOMINMAX 1

^ In file included from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-private.h:16:0, from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/lldb.cpp:12: C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/Host/windows/win32.h:79:8: error: redefinition of 'struct timespec' struct timespec ^ In file included from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\x86_64-w64-mingw32\include\time.h:277:0, from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/Host/windows/win32.h:14, from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-private.h:16, from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/lldb.cpp:12: c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\x8664-w64-mingw32\include\sys\timeb.h:90:8: error: previous definition of 'struct timespec' struct timespec { ^ In file included from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-private.h:16:0, from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/lldb.cpp:12: C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/Host/windows/win32.h: In function 'int vasprintf(char**, const char, char)': C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/Host/windows/win32.h:17:5: error: previous declaration of 'int vasprintf(char**, const char, va_list)' with 'C++' linkage int vasprintf(char _ret, const char _fmt, va_list ap); ^ In file included from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.1\include\c++\cstdio:42:0, from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.1\include\c++\random:39, from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.1\include\c++\bits\stl_algo.h:65, from c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.1\include\c++\algorithm:62, from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/Utility/SharingPtr.h:13, from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-forward.h:15, from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-types.h:14, from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-defines.h:13, from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-public.h:13, from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/../include/lldb/lldb-private.h:23, from C:/mingw-builds/msys64/home/Sim/julia/deps/llvm-svn/tools/lldb/source/lldb.cpp:12: c:\mingw-builds\x64-4.8.1-win32-seh-rev5\mingw64\x86_64-w64-mingw32\include\stdio.h:213:81: error: conflicts with new declaration with 'C' linkage int vasprintf(char ret, const char format, builtin_va_list local_argv) ^ /usr/bin/rm: cannot remove ‘/home/Sim/julia/deps/llvm-svn/build_Release+Asserts/tools/lldb/source/Release+Asserts/lldb.d.tmp’: No such file or directory /home/Sim/julia/deps/llvm-svn/Makefile.rules:1514: recipe for target '/home/Sim/julia/deps/llvm-svn/buildRelease+Asserts/tools/lldb/source/Release+Asserts/lldb.o' failed make[6]: ** [/home/Sim/julia/deps/llvm-svn/build_Release+Asserts/tools/lldb/source/Release+Asserts/lldb.o] Error 1 /home/Sim/julia/deps/llvm-svn/Makefile.rules:873: recipe for target 'all' failed make[5]: * [all] Error 1 /home/Sim/julia/deps/llvm-svn/Makefile.rules:958: recipe for target 'all' failed make[4]: * [all] Error 1 /home/Sim/julia/deps/llvm-svn/Makefile.rules:873: recipe for target 'all' failed make[3]: * [all] Error 1 Makefile:511: recipe for target 'llvm-svn/build_Release+Asserts/Release+Asserts/lib/libLLVMCodeGen.a' failed make[2]: * [llvm-svn/build_Release+Asserts/Release+Asserts/lib/libLLVMCodeGen.a] Error 2 Makefile:101: recipe for target 'julia-release' failed make[1]: * [julia-release] Error 2 Makefile:49: recipe for target 'release' failed make: * [release] Error 2

— Reply to this email directly or view it on GitHub https://github.com/Keno/Cxx.jl/issues/62#issuecomment-69013250.

SimonDanisch commented 9 years ago

What issue are you talking about? So are you suggesting, that something in Julia needs to be fixed? This whole build system is a big mystery to me ;) I don't really know what else to try, last thing I tried was to build with override LLDB_VER=release_33

SimonDanisch commented 9 years ago

I tried a few more things and everything ends up in the same error. Any ideas or hints? Should I open an issue over at Julia?

sjkelly commented 9 years ago

I think the umbrella issue is this: https://github.com/JuliaLang/julia/issues/9336

We were just looking into the status of Cxx on Windows today. It might be good to see if you can build and other wise vanilla Julia expect for LLVM 3.5 and see if that works.

LLVM, Julia, and Cxx are all really fast moving targets. I tend to stay with one 0.4 build for a week or so until Cxx is updated or there is some feature/bugfix I want. Even then, I tar my julia build incase something goes wrong, so I can atleast still work.

vtjnash commented 9 years ago

lldb works on windows?

SimonDanisch commented 9 years ago

I don't think so.. I already tried deactivating it, as I thought it isn't really needed, but I think I got other errors... http://blog.llvm.org/2015/01/lldb-is-coming-to-windows.html

SimonDanisch commented 9 years ago

that's the error I get when I deactivate LLDB:

llvm[4]: Installing cmake modules: LLVMExports.cmake
    CC src/jltypes.o
    CC src/gf.o
    CC src/ast.o
    CC src/builtins.o
    CC src/module.o
    CC src/codegen.o
    CC src/disasm.o
    CC src/debuginfo.o
debuginfo.cpp: In function 'void jl_getDylibFunctionInfo(const char**, size_t*, const char**, size_t, int*, int)':
debuginfo.cpp:628:38: error: 'std::remove_reference<llvm::object::OwningBinary<llvm::object::ObjectFile> >::type' has no member named 'release'
                 obj = errorobj.get().release();
                                      ^
Makefile:62: recipe for target 'debuginfo.o' failed
make[1]: *** [debuginfo.o] Error 1
Makefile:73: recipe for target 'julia-src-release' failed
make: *** [julia-src-release] Error 2
SimonDanisch commented 9 years ago

Is this related!?

I can successfully compile 3.0.17 using the mingw-64 compiler without
issues. I haven't tried 3.0.22 yet. I do all of my work under MSys. I
try to avoid cygwin; see below.

configure (and configure.ac) look for vasprintf. The scripts do not look
for asprintf, specifically. Two reasons why you might have problems:

a) cygwin: The mingw-64 toolchain may be picking up a header from
cygwin. This header's declarations for asprintf and vasprintf differ
from what gnutls' replacement thinks it should be.

b) You didn't specify "--host=x86_64-w64-mingw32" as an argument to
configure.

Both (a) and (b) are related -- if you didn't give "--host" to
configure, then it is possible for toolchains to pick up headers they're
not supposed to find. You might also need to unset your settings for CC
and CFLAGS as well.

Hope this helps you get a little farther.

-scooter

From http://lists.gnu.org/archive/html/gnutls-devel/2012-08/msg00023.html Where would I specify this?

ihnorton commented 9 years ago

I tried building julia + llvm-svn with the Cxx.jl Make.user. Aside from the LLDB includes issue above (which is tractable) the bigger issue is that currently Cxx.jl needs to have access to a shared LLVM library. However, building a shared LLVM on Windows is not supported. I guess the work-around there may be to link in the C++ helper code inside libjulia?

Keno commented 9 years ago

That's false, but you might need this

ihnorton commented 9 years ago

I see. Indeed it (Julia) does build with that patch, and https://github.com/JuliaLang/julia/commit/fc3df9640990430e55c67f28a4917a5bd84f30b4.

ihnorton commented 9 years ago

Can you get another reviewer for that patch, or just commit it? (would be nice to get it backported to 3.6.1 too)

Keno commented 9 years ago

Yes, I'll get it in somehow.

ihnorton commented 9 years ago

With a few minor patches, I got most of the way through building lldb against llvm-svn in the cygwin mingw-w64 cross-compiler setup. However, the remaining (large) issue is the several usages of std::call_once and family. Those are not currently supported by mingw-w64 with the win32 thread model. (discussion on llvm-dev)

ihnorton commented 9 years ago

Breadcrumb for future: https://github.com/meganz/mingw-std-threads might be useful for the mingw-w64/C++11 threads question (though does not provide std::call_once).