Skip to content

Conversation

@fingolfin
Copy link
Member

No description provided.

@fingolfin
Copy link
Member Author

CC @barche @thofma @benlorenz

@fingolfin
Copy link
Member Author

Argh, of course this fails because Julia 1.7.0-beta2 has buggy C headers, to be fixed via JuliaLang/julia#41382 in beta3 (by backporting JuliaLang/julia#41308)

So to continue, we first need to add a patch for libjulia with at least that fix backported, then rebuild that again. sigh

@barche
Copy link
Contributor

barche commented Jul 3, 2021

Could it be enough to apply the patch here, or does it affect the libjulia binary as well?

@fingolfin
Copy link
Member Author

fingolfin commented Jul 3, 2021

It would be enough but then every single Jll package using libjulia would need it. That makes no sense to me. Let's just merge #3264 (after I fixed it)

@fingolfin
Copy link
Member Author

OK, seems we should have at least one more tweak in libjulia_jll (namely turn libuv back into a dependency, instead of just a builddep).

Anyway, I worked around that by adding libuv as a builddep here; next I run into compiler errors in the cxxwrap C++ codebase:

  • jl_get_ptls_states still exist but is not declared in julia.h anymore. Instead, use jl_current_task->ptls
  • jl_new_datatype gained a new argument, fattrs (one can simply pass jl_emptysvec for that)

I've added a patch to resolve both, also submitted as JuliaInterop/libcxxwrap-julia#86

Now it dies in the linker:

undefined reference to `jl_get_pgcstack'

@benlorenz
Copy link
Contributor

Now it dies in the linker:

undefined reference to `jl_get_pgcstack'

So we probably need a patch for libjulia_jll (+ backport) of JuliaLang/julia#41320
At least with a local build of 1.7 this seems to help.

@fingolfin
Copy link
Member Author

@benlorenz thanks for pointing that one out. It doesn't seem to be in JuliaLang/julia#41382 though -- I guess that'd we should ask for that, then. Will do

@fingolfin
Copy link
Member Author

Note that even if we apply JuliaLang/julia#41320 the resulting binaries won't work there.

@barche
Copy link
Contributor

barche commented Jul 4, 2021

Same error when building libcxxwrap locally against the julia1.7 beta2 binariy.

@fingolfin
Copy link
Member Author

Yeah, beta2 is just broken in several ways for anybody trying to link against its C ABI. We gotta hope beta3 will be better

@giordano
Copy link
Member

giordano commented Jul 4, 2021

% nm libjulia.v1.7.0.x86_64-linux-gnu-cxx11-julia_version+1.7.0/lib/libjulia.so | grep jl_get_pgcstack
% nm libjulia.v1.7.0.x86_64-linux-gnu-cxx11-julia_version+1.7.0/lib/libjulia-internal.so | grep jl_get_pgcstack
0000000000107fb0 T jl_get_pgcstack
0000000000498a48 d jl_get_pgcstack_cb
0000000000107e20 t jl_get_pgcstack_fallback
0000000000107e60 t jl_get_pgcstack_init

@fingolfin
Copy link
Member Author

Yeah the symbol exists, it just is not exported; on master this was fixed in JuliaLang/julia#41320 but that one is not even scheduled for backporting yet :-(

@giordano
Copy link
Member

giordano commented Jul 4, 2021

but that one is not even scheduled for backporting yet :-(

image

@fingolfin
Copy link
Member Author

Ah, great! Thanks @vchuravy

@giordano
Copy link
Member

giordano commented Jul 5, 2021

Issue JuliaLang/julia#41464 is probably going to track something relevant for you as well

@fingolfin
Copy link
Member Author

With the new patched libjulia_jll this now builds. I also dropped the patches and instead switched to a newer commit of the libcxxwrap-julia git repository which already has those patches applied.

Seems to build now! yay

@fingolfin
Copy link
Member Author

@giordano OK to merge?

@giordano giordano merged commit 1b6909d into JuliaPackaging:master Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants