Skip to content
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

Upgrade source-build to BB2 for Julia 1.3 #450

Merged
merged 6 commits into from
Dec 12, 2019
Merged

Upgrade source-build to BB2 for Julia 1.3 #450

merged 6 commits into from
Dec 12, 2019

Conversation

Gnimuc
Copy link
Member

@Gnimuc Gnimuc commented Dec 6, 2019

Now, we don't need to compile LLVM/Clang locally when building Julia, it feels insane to turn off USE_BINARYBUILDER and wait for 1h+ to use Cxx.jl. This PR upgrades BuildBootstrap.Makefile to reuse LLVM/Clang binaries from LLVMBuilder. With this PR, building Cxx.jl itself only takes <5min on my machine. :P

BTW, #407 and #434 are also merged into this PR for testing. To test this PR, simply building Julia release-1.3 from source(DO NOT set USE_BINARYBUILDER=0) and dev, checkout, build Cxx in REPL.

close #435, close #437, close #441

cc @musm @goretkin @oschulz @christianpeel @GlenHenshaw @MaximeBouton

@Gnimuc Gnimuc requested a review from Keno December 6, 2019 14:32
@MaximeBouton
Copy link

I will give it a try, what are the chances that we could merge the changes from #425 as well?
All the check boxes are not ticked but it has been working fine for me on windows with julia 1.2.

LLVMBuilder at v6.0.1-7+nowasm
LLVM/Clang binaries from BB2 can be reused, but we do need to download and patch LLVM/Clang's source code for building libcxxffi.
@Gnimuc
Copy link
Member Author

Gnimuc commented Dec 7, 2019

@MaximeBouton I'm going to rebase #425 on the current master branch and release new libcxxffi binaries for Julia 1.3. Source-build for Windows is out of the scope of this PR.

@Gnimuc Gnimuc changed the title RFC: Upgrade source-build to BB2 for Julia 1.3 Upgrade source-build to BB2 for Julia 1.3 Dec 12, 2019
@Gnimuc Gnimuc removed the request for review from Keno December 12, 2019 01:21
@Gnimuc Gnimuc merged commit c5bdd65 into master Dec 12, 2019
@alhirzel
Copy link

alhirzel commented Dec 16, 2019

There are CI failures related to the location of clang_constants.jl and I am also experiencing the following issue when I manually fix the clang_constants.jl path:

   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.3.0 (2019-11-26)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using Cxx
[ Info: Precompiling Cxx [a0b5b9ef-44b7-5148-a2d1-f6db19f3c3d2]
free(): invalid pointer

signal (6): Aborted
in expression starting at /home/ahirzel/prj/asdf/g/dev/Cxx/src/Cxx.jl:178
gsignal at /usr/lib/libc.so.6 (unknown line)
abort at /usr/lib/libc.so.6 (unknown line)
__libc_message at /usr/lib/libc.so.6 (unknown line)
malloc_printerr at /usr/lib/libc.so.6 (unknown line)
_int_free at /usr/lib/libc.so.6 (unknown line)
_ZN4llvm19SmallPtrSetImplBase4GrowEj at /home/ahirzel/prj/dotfiles/scripts/bin/julia-1.3.0/bin/../lib/julia/libLLVM-6.0.so (unknown line)
_ZN4llvm19SmallPtrSetImplBase14insert_imp_bigEPKv at /home/ahirzel/prj/dotfiles/scripts/bin/julia-1.3.0/bin/../lib/julia/libLLVM-6.0.so (unknown line)
_ZN4llvm11LLVMContext9addModuleEPNS_6ModuleE at /home/ahirzel/prj/dotfiles/scripts/bin/julia-1.3.0/bin/../lib/julia/libLLVM-6.0.so (unknown line)
_ZN4llvm6ModuleC1ENS_9StringRefERNS_11LLVMContextE at /home/ahirzel/prj/dotfiles/scripts/bin/julia-1.3.0/bin/../lib/julia/libLLVM-6.0.so (unknown line)
finish_clang_init at /home/ahirzel/prj/asdf/g/dev/Cxx/src/../deps/usr/lib/libcxxffi.so (unknown line)
init_clang_instance at /home/ahirzel/prj/asdf/g/dev/Cxx/src/../deps/usr/lib/libcxxffi.so (unknown line)
#setup_instance#20 at /home/ahirzel/prj/asdf/g/dev/Cxx/src/initialization.jl:38
#setup_instance at ./tuple.jl:0 [inlined]
__init__ at /home/ahirzel/prj/asdf/g/dev/Cxx/src/initialization.jl:427
unknown function (ip: 0x668cc9e97a9b)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2141 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1631 [inlined]
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:328
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:417
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:368 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:778
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:888
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x668ce4005c0f)
unknown function (ip: 0xffffffffffffffff)
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:897
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:814
jl_eval_module_expr at /buildworker/worker/package_linux64/build/src/toplevel.c:181
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:640
jl_eval_module_expr at /buildworker/worker/package_linux64/build/src/toplevel.c:181
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:640
jl_parse_eval_all at /buildworker/worker/package_linux64/build/src/ast.c:873
jl_load at /buildworker/worker/package_linux64/build/src/toplevel.c:878
include at ./boot.jl:328 [inlined]
include_relative at ./loading.jl:1105
include at ./Base.jl:31
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2135 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1631 [inlined]
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:328
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:417
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:368 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:778
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:705
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:888
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x668ce380498f)
unknown function (ip: 0x2)
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:897
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:814
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/toplevel.c:843
eval at ./boot.jl:330 [inlined]
eval at ./client.jl:425
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2135 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
top-level scope at ./none:3
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:808
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:764
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/toplevel.c:843
eval at ./boot.jl:330
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2135 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
exec_options at ./client.jl:263
_start at ./client.jl:460
jfptr__start_2084.clone_1 at /home/ahirzel/prj/dotfiles/scripts/bin/julia-1.3.0/lib/julia/sys.so (unknown line)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2135 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
jl_apply at /buildworker/worker/package_linux64/build/ui/../src/julia.h:1631 [inlined]
true_main at /buildworker/worker/package_linux64/build/ui/repl.c:96
main at /buildworker/worker/package_linux64/build/ui/repl.c:217
__libc_start_main at /usr/lib/libc.so.6 (unknown line)
_start at /home/ahirzel/prj/dotfiles/scripts/bin/julia-1.3.0/bin/julia (unknown line)
Allocations: 798245 (Pool: 798055; Big: 190); GC: 1
ERROR: Failed to precompile Cxx [a0b5b9ef-44b7-5148-a2d1-f6db19f3c3d2] to /home/ahirzel/.julia/compiled/v1.3/Cxx/ESGkI_zT4MM.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1283
 [3] _require(::Base.PkgId) at ./loading.jl:1024
 [4] require(::Base.PkgId) at ./loading.jl:922
 [5] require(::Module, ::Symbol) at ./loading.jl:917

@TsurHerman
Copy link

It happens for me too on 1.3
Cxx seems to be broken

@Gnimuc Gnimuc deleted the srcbuild-1.3 branch December 29, 2019 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants