Unless something has changed in the past month, the biggest issue with the recommended Make.user options is that LLDB uses some C++11 features that are not supported by GCC on Windows (call_once and some other mutex-related stuff).https://github.com/Keno/Cxx.jl/issues/62#issuecomment-93184018However, I'm not sure if LLDB is strictly necessary for the Clang-only functionality (I do remember some linking errors without it, but that was a number of months ago).
V:/julia/deps/llvm-svn/tools/lldb/source/API/SBValue.cpp:1663:38: warning: unknown conversion type character 'l' in format [-Wformat=]
addr.GetOffset());
^
V:/julia/deps/llvm-svn/tools/lldb/source/API/SBValue.cpp:1663:38: warning: too many arguments for format [-Wformat-extra-args]
llvm[6]: Building Release+Asserts Archive Library liblldbAPI.a
/v/julia/deps/llvm-svn/Makefile.rules:880: recipe for target 'all' failed
make[4]: *** [all] Error 1
CC src/codegen.o
codegen.cpp: In function 'llvm::Value* emit_expr(jl_value_t*, jl_codectx_t*, bool, bool, jl_sym_t**)':
codegen.cpp:3229:59: error: no matching function for call to 'llvm::IRBuilder<>::CreateCall(llvm::Value*)'
builder.CreateCall(prepare_call(resetstkoflw_func));
^
codegen.cpp:3229:59: note: candidates are:
In file included from codegen.cpp:55:0:
V:/julia/usr/include/llvm/IR/IRBuilder.h:1468:13: note: llvm::CallInst* llvm::IRBuilder<preserveNames, T, Inserter>::CreateCall(llvm::Value*, llvm::ArrayRef<llvm::Value*>, const llvm::Twine&) [with bool preserveNames = true; T = llvm::ConstantFolder; Inserter = llvm::IRBuilderDefaultInserter<true>]
CallInst *CreateCall(Value *Callee, ArrayRef<Value *> Args,
^
V:/julia/usr/include/llvm/IR/IRBuilder.h:1468:13: note: candidate expects 3 arguments, 1 provided
V:/julia/usr/include/llvm/IR/IRBuilder.h:1473:13: note: llvm::CallInst* llvm::IRBuilder<preserveNames, T, Inserter>::CreateCall(llvm::FunctionType*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, const llvm::Twine&) [with bool preserveNames = true; T = llvm::ConstantFolder; Inserter = llvm::IRBuilderDefaultInserter<true>]
CallInst *CreateCall(llvm::FunctionType *FTy, Value *Callee,
^
V:/julia/usr/include/llvm/IR/IRBuilder.h:1473:13: note: candidate expects 4 arguments, 1 provided
V:/julia/usr/include/llvm/IR/IRBuilder.h:1478:13: note: llvm::CallInst* llvm::IRBuilder<preserveNames, T, Inserter>::CreateCall(llvm::Function*, llvm::ArrayRef<llvm::Value*>, const llvm::Twine&) [with bool preserveNames = true; T = llvm::ConstantFolder; Inserter = llvm::IRBuilderDefaultInserter<true>]
CallInst *CreateCall(Function *Callee, ArrayRef<Value *> Args,
^
V:/julia/usr/include/llvm/IR/IRBuilder.h:1478:13: note: candidate expects 3 arguments, 1 provided
(.text+0x23): undefined reference to `__imp_CoUninitialize'
Fixed. Regarding the other one you mentioned:
(.text+0x23): undefined reference to `__imp_CoUninitialize'Maybe you tried/corrected this already, but for future reference the issue here is that the LLVM shared library version apparently (now?) needs to link to ole32. I was able to work around this by running `make VERBOSE=1` and then copying and re-running the last (failing) g++ command string `-lole32` added at the end. I guess we could try to get a patch in, but it's going to be continual whack-a-mole because LLVM does not support this build configuration.
if( NOT MSVC )
if( MINGW )
set(system_libs ${system_libs} imagehlp psapi shell32 ole32)
elseif( CMAKE_HOST_UNIX )
But still regarding my issue, was I wrong to assume that "#ifdef LLVM37" condition (line 3204) should also apply to Windows (currently it applies only to NO-WINDOWS)?
I did however find that the problem is due to a miss linkage to ole32 but got lost with where to fix when I found that the llvm-svn/lib/Support/CmakeList.txt has
But still regarding my issue, was I wrong to assume that "#ifdef LLVM37" condition (line 3204) should also apply to Windows (currently it applies only to NO-WINDOWS)?It intentionally does not apply to Windows because the call arguments there are different on Windows.
I did however find that the problem is due to a miss linkage to ole32 but got lost with where to fix when I found that the llvm-svn/lib/Support/CmakeList.txt hasLong-term we will be better off (at least re: LLVM) when we switch to CMake because LLVM people are more actively supporting that build system.
From worker 4: * linalg3 /bin/sh: line 1: 5292 Segmentation fault /v/julia/usr/bin/julia.exe --check-bounds=yes --startup-file=no ./runtests.jl all
Makefile:9: recipe for target 'all' failed
I don't think anybody has ever tried. It shouldn't be too hard to make work, but will definitely require some modifications to Cxx.jl.
julia> Pkg.build("Cxx")
INFO: Building Cxx
Tuning for julia installation at: V:\julia\usr\bin
=====================================================[ ERROR: Cxx ]=====================================================
LoadError: could not spawn `make -f BuildBootstrap.Makefile 'JULIA_HOME=V:\julia\usr\bin'`: no such file or directory (E
NOENT)
while loading C:\j\.julia\v0.4\Cxx\deps\build.jl, in expression starting on line 16
julia> Pkg.build("Cxx")
ERROR: failed process: Process(`git '--work-tree=C:\j\.julia\v0.4\Cxx' '--git-dir=C:\j\.julia\v0.4\Cxx\.git' update-index -q --really-refresh`, ProcessExited(128)) [128]
in run at <invalid>
in success at .\pkg\git.jl:32
Oh, right, and that one is probably because Pkg doesn't work properly with a posix-style git in msys or cygwin, it only works with a mingw-style git like the one we bundle. So it's lose-lose until Cxx.jl converts to cmake, or Julia switches to libgit2 (which is coming along well but probably won'y be quite ready in time for 0.4), or we fix this git bug. The git bug might not be too hard to fix, what do you get when you run that git '--work-tree=C:\j\.julia\v0.4\Cxx' '--git-dir=C:\j\.julia\v0.4\Cxx\.git' update-index -q --really-refresh command manually in MSYS2 bash?
~> cd .julia/v0.4/Cxx/deps/
~/.julia/v0.4/Cxx/deps> make -f BuildBootstrap.Makefile JULIA_HOME=$JULIA_HOME
BuildBootstrap.Makefile:2: /../../deps/Versions.make: No such file or directory
BuildBootstrap.Makefile:3: /../../Make.inc: No such file or directory
julia> Pkg.build("Cxx")
INFO: Building Cxx
Tuning for julia installation at: V:\julia\usr\
bin
CC /c/j/.julia/v0.4/Cxx/deps/build/bootstrap.o
../src/bootstrap.cpp:1:0: warning: -fPIC ignored for target (all code is position independent)
#undef B0 //rom termios
^
LINK /c/j/.julia/v0.4/Cxx/deps/usr/lib/libcxxffi.dll
Not building debug library because corresponding julia DEBUG library does not exist.
To build, simply run the build again once the library at
V:/julia/usr/bin/../../usr/lib/libjulia-debug.dll
has been built.