-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix source build for Julia 1.4 #465
Conversation
LLVM has no plan to support ObjC1 in the future, so this distinction is eliminated.
Not sure whether it is right to use `clang::CodeGen::AggValueSlot::DoesNotOverlap` here or not, the doc says it can help compiler to do optimizations.
`getNewMemBuffer` for `llvm::MemoryBuffer` was removed in 322475.
Honestly, I don't know why this works.
I'm having precompiling error on 1.4. julia> using Cxx
[ Info: Precompiling Cxx [a0b5b9ef-44b7-5148-a2d1-f6db19f3c3d2]
ERROR: LoadError: LoadError: AssertionError: isdir(cxxclangdir)
Stacktrace:
[1] collectClangHeaders!(::Array{Tuple{String,Int32},1}) at /home/lizz/.julia/packages/Cxx/7Ms5P/src/initialization.jl:
380
[2] collectAllHeaders!(::Array{Tuple{String,Int32},1}, ::Bool) at /home/lizz/.julia/packages/Cxx/7Ms5P/src/initializati
on.jl:390
[3] collectAllHeaders(::Bool) at /home/lizz/.julia/packages/Cxx/7Ms5P/src/initialization.jl:393
[4] top-level scope at /home/lizz/.julia/packages/Cxx/7Ms5P/src/initialization.jl:423
[5] include(::Module, ::String) at ./Base.jl:377
[6] include(::String) at /home/lizz/.julia/packages/Cxx/7Ms5P/src/Cxx.jl:144
[7] top-level scope at /home/lizz/.julia/packages/Cxx/7Ms5P/src/Cxx.jl:170
[8] include(::Module, ::String) at ./Base.jl:377
[9] top-level scope at none:2
[10] eval at ./boot.jl:331 [inlined]
[11] eval(::Expr) at ./client.jl:449
[12] top-level scope at ./none:3
in expression starting at /home/lizz/.julia/packages/Cxx/7Ms5P/src/initialization.jl:423
in expression starting at /home/lizz/.julia/packages/Cxx/7Ms5P/src/Cxx.jl:170
ERROR: Failed to precompile Cxx [a0b5b9ef-44b7-5148-a2d1-f6db19f3c3d2] to /home/lizz/.julia/compiled/v1.4/Cxx/ESGkI_BmH2
D.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1272
[3] _require(::Base.PkgId) at ./loading.jl:1029
[4] require(::Base.PkgId) at ./loading.jl:927
[5] require(::Module, ::Symbol) at ./loading.jl:922 The build step is okay. |
@innerlee it looks like Cxx failed to detect your system-headers. You could try to print some of those variables around the error site to see why it cannot do that. |
Could you give some instructions on how to do it? I'm not very familiar with cpp |
The following error occurred in the Julia side, if you're working in REPL, simply typing
|
Thanks! Like magic haha. I'm around somewhere like The 3rd error site: if JLOptions().use_compiled_modules != 0
if (0 == ccall(:jl_generating_output, Cint, ())) || (JLOptions().incremental != 0)
# spawn off a new incremental pre-compile task for recursive `require` calls
# or if the require search declared it was pre-compiled before (and therefore is e$
cachefile = compilecache(pkg, path) <------------------- THIS LINE
if isa(cachefile, Exception)
if precompilableerror(cachefile)
verbosity = isinteractive() ? CoreLogging.Info : CoreLogging.Debug
@logmsg verbosity "Skipping precompilation since __precompile__(false). Im$
else
@warn "The call to compilecache failed to create a usable precompiled cach$
end
# fall-through to loading the file locally
else
m = _require_from_serialized(cachefile)
if isa(m, Exception)
@warn "The call to compilecache failed to create a usable precompiled cach$
else
return
end
end
end
end Which variable should I print then? I tried to put some println before that line, but nothing got printed. |
Could you run this and check what you got? If the BTW, Cxx is still not fully functional with this PR. I'm trying to get a clue how to fix those underlying Clang-related errors, but making nearly no progress, so I would recommend using Julia 1.3.x for now if you'd like to use Cxx.jl. |
Okay, I will wait for this pr then. I was trying to play with some basic cpp codes, and using this cxx repl as a live notebook. Anyway, printing debug is always a choice for me :D |
Misc. update for LLVM 8.
Now the package can be built successfully, but I got these errors when using the package:
Hi @Keno, could you give it a review?