Skip to content

LibGit2: New version 1.9.2#12728

Merged
giordano merged 3 commits into
JuliaPackaging:masterfrom
eschnett:eschnett/LibGit2-1.9.2
Dec 11, 2025
Merged

LibGit2: New version 1.9.2#12728
giordano merged 3 commits into
JuliaPackaging:masterfrom
eschnett:eschnett/LibGit2-1.9.2

Conversation

@eschnett
Copy link
Copy Markdown
Contributor

@eschnett eschnett commented Dec 7, 2025

No description provided.

@giordano
Copy link
Copy Markdown
Member

giordano commented Dec 7, 2025

Why is LLVMCompilerRT_jll being installed on a non-msan build? That's wrong.

Comment thread L/LibGit2/build_tarballs.jl Outdated
]

llvm_version = v"13.0.1"
llvm_version = v"13.0.1+0"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is not the right way to do, PackageSpec in v1.12 prefers taking strings as versions rather than a version number, there are loads of PRs doing that, see #12627 and just search for the error message. But #12728 (comment) should be resolved first, that's unrelated to the the PackageSpec stuff

@eschnett
Copy link
Copy Markdown
Contributor Author

eschnett commented Dec 7, 2025

There is

    BuildDependency(PackageSpec(name="LLVMCompilerRT_jll", uuid="4e17d02c-6bf5-513e-be62-445f41c75a11", version=llvm_version);
                    platforms=filter(p -> sanitize(p)=="memory", platforms)),

I do not understand why this installs LLVMCompilerRT_jll on a non-msan build.

@eschnett
Copy link
Copy Markdown
Contributor Author

eschnett commented Dec 7, 2025

Maybe it's just the check that is happening for all targets?

@giordano
Copy link
Copy Markdown
Member

giordano commented Dec 7, 2025

Maybe it's just the check that is happening for all targets?

No, it's not otherwise all platforms would have failed.

@eschnett
Copy link
Copy Markdown
Contributor Author

eschnett commented Dec 7, 2025

I do not understand why the non-msan x86_64 build installs LLVMCompilerRT_jll, and I do not know how to fix it. My best guess is that the BuildDependency platform filter ignores the sanity attribute. That is, the platform list here is [x86_64-linux-gnu-sanitize+memory], and this platform somehow matches when x86_64-linux-gnu is built. I do not know where this check happens, though.

@eschnett
Copy link
Copy Markdown
Contributor Author

eschnett commented Dec 7, 2025

Yes, that is the reason:

julia> p1 = Platform("x86_64", "linux"; libc="gnu")
julia> p2 = Platform("x86_64", "linux"; libc="gnu", sanitize="memory")
julia> platforms_match(p1, p2)
true

julia> platforms_match(p2, p1)
true

That's also documented for platforms_match:

"Return true if a and b are matching platforms, where matching is determined by
comparing all keys contained within the platform objects, and if both objects contain
entries
for that key, they must match."

(emphasis mine).

@eschnett
Copy link
Copy Markdown
Contributor Author

eschnett commented Dec 8, 2025

Is there anything else to do? The pattern platforms=filter(p -> sanitize(p)=="memory", platforms) is commonly used for memory sanitizer builds. If there is a bug then it's not here in LibGit2.

@giordano
Copy link
Copy Markdown
Member

giordano commented Dec 8, 2025

Is there anything else to do?

Use platforms_match_with_sanitize instead of platforms_match at https://github.com/JuliaPackaging/BinaryBuilderBase.jl/blob/081355e1f093ab4548ec92d41fb7d85e29b061c3/src/Dependencies.jl#L272 (with tests).

If there is a bug then it's not here in LibGit2.

Of course, but it's an issue regardless.

@eschnett
Copy link
Copy Markdown
Contributor Author

eschnett commented Dec 8, 2025

@eschnett
Copy link
Copy Markdown
Contributor Author

Ping?

@giordano
Copy link
Copy Markdown
Member

You need to rebuild this.

@eschnett eschnett marked this pull request as draft December 11, 2025 17:29
@eschnett eschnett marked this pull request as ready for review December 11, 2025 17:29
@eschnett
Copy link
Copy Markdown
Contributor Author

I see this message in the build log:

ERROR: could not load library "/cache/build/yggy-amdci7-5/julialang/yggdrasil/L/LibGit2/build/x86_64-linux-gnu-sanitize+memory/z8XyFtMJ/x86_64-linux-gnu-libgfortran3-cxx11-sanitize+memory/destdir/lib/libgit2.so.1.9.2"
/cache/build/yggy-amdci7-5/julialang/yggdrasil/L/LibGit2/build/x86_64-linux-gnu-sanitize+memory/z8XyFtMJ/x86_64-linux-gnu-libgfortran3-cxx11-sanitize+memory/destdir/lib/libssh2.so.1: undefined symbol: __msan_memset
┌ Warning: lib/libgit2.so.1.9.2 cannot be dlopen()'ed
└ @ BinaryBuilder.Auditor /cache/julia-buildkite-plugin/depots/e2fd9734-29d8-45cd-b0eb-59f7104f3131/packages/BinaryBuilder/EZ7Lf/src/Auditor.jl:222

Is this expected or a problem?

@giordano
Copy link
Copy Markdown
Member

Non-msan julia build can't dlopen msan libraries.

@giordano giordano merged commit 650736f into JuliaPackaging:master Dec 11, 2025
23 checks passed
@eschnett eschnett deleted the eschnett/LibGit2-1.9.2 branch December 28, 2025 19:50
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.

3 participants