Skip to content

[Jerbie] New package, v0.1.0 - #14413

Open
ParthsarthiSingh-glang wants to merge 6 commits into
JuliaPackaging:masterfrom
ParthsarthiSingh-glang:jerbie-jll
Open

[Jerbie] New package, v0.1.0#14413
ParthsarthiSingh-glang wants to merge 6 commits into
JuliaPackaging:masterfrom
ParthsarthiSingh-glang:jerbie-jll

Conversation

@ParthsarthiSingh-glang

Copy link
Copy Markdown

No description provided.

@ParthsarthiSingh-glang ParthsarthiSingh-glang changed the title Jerbie_jll v0.1.0 [Jerbie] New package, v0.1.0 Aug 14, 2026
Comment thread J/Jerbie/build_tarballs.jl Outdated
# cross-compiling (can't run a Darwin binary on the Linux BB sandbox). Fetch
# the real, unmodified crate fresh and apply a minimal diff (preprocess-only
# instead of execute) rather than vendoring a modified copy in this repo.
git clone https://gitlab.com/tspiteri/gmp-mpfr-sys.git "$WORKSPACE/gmp-mpfr-sys-fixed"

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 should be in the list of "sources"

Comment thread J/Jerbie/build_tarballs.jl Outdated
Comment on lines +5 to +12
# Copyright © 2017-2026 Trevor Spiteri
#
# Copying and distribution of this file, with or without
# modification, are permitted in any medium without royalty provided
# the copyright notice and this notice are preserved. This file is
# offered as-is, without any warranty.
#
# We also install a copy of gmp-mpfr-sys's LGPL license alongside Jerbie's.

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.

Why is this here? If the license is bundled with the jll, this here can go. If not that should be changed

@AayushSabharwal AayushSabharwal Aug 14, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The license bundled with the jll is of gmp-mpfr-sys. This is the license that is specifically on the build script of that package which is patched here. It is not the same as the license used for the source code.

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.

If I understand this correctly, then this license MUST also end up in the jll.
(other Yggy maintainers, please correct me)

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.

Agreed that this makes little sense here.

@ParthsarthiSingh-glang ParthsarthiSingh-glang Aug 21, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

solved in the lastest commit : pull/14413/changes/369eda08a820d037b43faa829c4d774ced4e5418

Comment thread J/Jerbie/build_tarballs.jl Outdated
Comment on lines +34 to +37
cat >> Cargo.toml <<EOF
[patch.crates-io]
gmp-mpfr-sys = { path = "$WORKSPACE/gmp-mpfr-sys-fixed" }
EOF

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.

please instead use a patch file

Comment thread J/Jerbie/build_tarballs.jl Outdated
Comment on lines +5 to +12
# Copyright © 2017-2026 Trevor Spiteri
#
# Copying and distribution of this file, with or without
# modification, are permitted in any medium without royalty provided
# the copyright notice and this notice are preserved. This file is
# offered as-is, without any warranty.
#
# We also install a copy of gmp-mpfr-sys's LGPL license alongside Jerbie's.

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.

Agreed that this makes little sense here.

Comment on lines +26 to +33
# gmp-mpfr-sys's use-system-libs system-lib detection normally compiles AND
# executes a test binary to read off preprocessor macros, which fails when
# cross-compiling (can't run a Darwin binary on the Linux BB sandbox). Apply
# a minimal diff (preprocess-only instead of execute) to the fetched source.
patch -d "$WORKSPACE/srcdir/gmp-mpfr-sys-fixed/gmp-mpfr-sys" -p1 < gmp-mpfr-sys-cross-compile-fix.diff

patch -p1 < gmp-mpfr-sys-cargo-patch.diff

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.

I don't quite understand what's going on here. But if the point is to build an executable for the host, rather than for the target, you can more simply do that (which I believe involves calling /opt/bin/${MACH_TYPE}/rustc or something like that) instead of patching anything.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Building it for the host instead isn't equivalent: the probe needs to read the target's GMP_jll (GMP_LIMB_BITS is 32 on armv6l/armv7l vs 64 on the x86_64 host), so a host-compiled probe would link against the wrong GMP and give wrong ABI values into the generated bindings.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

To clarify, the build script for gmp-mpfr-sys ordinarily also compiles gmp/mpfr/mpc. However, their cross compilation here doesn't work for apple-aarch64-darwin. We can make it use system binaries for gmp/mpfr/etc with a flag, but that causes it to try and compile a C script that prints out the versions of those binaries. With cross compilation enabled, the build script compiles the binaries for the target while running them on the host. This patches that behavior.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

is this question answered ?

@ParthsarthiSingh-glang

Copy link
Copy Markdown
Author

@giordano @lgoettgens , bumping .

@giordano

Copy link
Copy Markdown
Member

Before bumping it'd be good to address all questions raised already 🙂

Comment thread J/Jerbie/build_tarballs.jl Outdated
Co-authored-by: Christopher Rackauckas <accounts@chrisrackauckas.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants