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

libcxxwrap 0.8.5 for Julia 1.5 #2158

Merged
merged 1 commit into from
Nov 26, 2020

Conversation

fingolfin
Copy link
Member

This is marked as a draft, as it shouldn't be merged immediately; instead, first...

  1. New version: libcxxwrap_julia_jll v0.8.4+0 JuliaRegistries/General#25105 should be merged...
  2. ... and tested, i.e. libcxxwrap 0.8.4 for Julia 1.4 should be verified before we advance further
  3. and I'd also like to test at least the macOS build artifact produced by this PR before merging.

CC @barche

@fingolfin
Copy link
Member Author

Actually, I wonder: right now we do julia_compat = "~$(julia_version.major).$(julia_version.minor)" but perhaps that should be changed to julia_compat = "^$(julia_version.major).$(julia_version.minor)". Rationale: this way, until there is libjulia_jll 1.6, one can use the cxxwrap built for Julia 1.5 in Julia 1.6 (and more generally: that for 1.x in 1.(x+1)), and with some luck, it'll work; in the worst case, it doesn't work, but then one isn't worse off than before.
Oh, and since we increment the JLL version along with the Julia version, even if there letter is an actual Julia 1.6 version, it'll have a higher version and thus Pkg will prefer it over the Julia 1.5 version.

@fingolfin
Copy link
Member Author

Hmm, lots of build failures:

[22:03:22] /opt/x86_64-linux-gnu/bin/../lib/gcc/x86_64-linux-gnu/7.1.0/../../../../x86_64-linux-gnu/bin/ld: warning: libunwind.so.8, needed by /workspace/destdir/lib/libjulia.so, not found (try using -rpath or -rpath-link)
[22:03:22] /workspace/destdir/lib/libjulia.so: undefined reference to `_ULx86_64_step'
[22:03:22] /workspace/destdir/lib/libjulia.so: undefined reference to `_Ux86_64_getcontext'
[22:03:22] /workspace/destdir/lib/libjulia.so: undefined reference to `_U_dyn_register'
[22:03:22] /workspace/destdir/lib/libjulia.so: undefined reference to `_ULx86_64_init_local'
[22:03:22] /workspace/destdir/lib/libjulia.so: undefined reference to `_ULx86_64_local_addr_space'
[22:03:22] /workspace/destdir/lib/libjulia.so: undefined reference to `_ULx86_64_get_reg'
[22:03:22] /workspace/destdir/lib/libjulia.so: undefined reference to `_ULx86_64_get_proc_info_by_ip'
[22:03:22] collect2: error: ld returned 1 exit status
[22:03:22] make[2]: *** [test/CMakeFiles/test_cxxwrap.dir/build.make:106: test/test_cxxwrap] Error 1

Wonder if that indicates a potential issue with libjulia_jll 1.5... sigh

@barche
Copy link
Contributor

barche commented Nov 21, 2020

Damn, this is turning out to be quite the rabbit hole :/

These all seem to be from libunwind.

@fingolfin
Copy link
Member Author

From my perspective, it's been a rabbit hole for several weeks (months?) now already, so I'll call this par for the course :-).

Anyway, yeah, this probably needs to be addressed in libjulia_jll 1.5: I notice that it lacks a dependency on LibUnwind_jll... I am pretty sure we had pretty good reasons to do that, but unfortunately we did not document those reasons via comments sigh.

I'll try to figure it out next week, but now I need to catch some sleep. Perhaps @vchuravy has an idea in the meantime...

@benlorenz
Copy link
Contributor

Since version 1.5 julia uses a shared libunwind on linux + freebsd instead of a static library which explains why this happens for these architectures and not for 1.3 and 1.4. (I am not sure about macos ...)

The build script seems to fall back to it's own downloader for libunwind since neither USE_SYSTEM_LIBUNWIND nor a depencency is specified (maybe because it was easier this way to choose the correct version instead of replicating the logic in the build script again). See ad1f5f9

But that shared library is never installed into $destdir. So either building with libunwind_jll / libosxunwind_jll needs to be fixed or we could just copy that file into $libdir.

@fingolfin
Copy link
Member Author

So if I add BuildDependency("LibUnwind_jll") this builds fine! But I'd prefer to have this fixed in libjulia_jll; the PR for that was merged, now waiting for JuliaRegistries/General#25308 to be merged.

In the meantime, I also modified this PR here to set the julia_compat as I described above (to which nobody reacted, which I hope means people agree, but perhaps they also just didn't read it? @barche ?)

@fingolfin fingolfin closed this Nov 25, 2020
@fingolfin fingolfin reopened this Nov 25, 2020
@fingolfin fingolfin closed this Nov 26, 2020
@fingolfin fingolfin reopened this Nov 26, 2020
@fingolfin
Copy link
Member Author

fingolfin commented Nov 26, 2020

I've tested the macOS build of the artifacts here on my computer; it seems to work well (e.g. Singular.jl test suite passes with it).

So from my POV this is ready for merging @barche @giordano

@@ -59,4 +59,4 @@ dependencies = [

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies;
preferred_gcc_version = v"7", julia_compat = "~$(julia_version.major).$(julia_version.minor)")
preferred_gcc_version = v"7", julia_compat = "^$(julia_version.major).$(julia_version.minor)")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change? Doesn't the caret mean compatible with [1.5, 2.0)? Is this what you want?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, well, if this actually works with julia v1.6 that's good 😄

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it works in Julia 1.6 (at least on a mac, but it should work everywhere)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(famous last words 😝 )

@giordano giordano merged commit 8e1d426 into JuliaPackaging:master Nov 26, 2020
@fingolfin fingolfin deleted the mh/libcxxwrap-julia1.5 branch November 26, 2020 01:20
@barche
Copy link
Contributor

barche commented Nov 26, 2020

It's 18 hours too late, but this is indeed perfect, thanks @fingolfin !

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