From: "Philip McGrath" <philip@philipmcgrath.com>
To: "Antoine Poinsot" <darosior@protonmail.com>,
"Guix Help" <help-guix@gnu.org>
Subject: Re: Bootstrappable Release Build of Rust Application
Date: Wed, 17 Apr 2024 11:17:28 -0400 [thread overview]
Message-ID: <e9affdd0-a0d6-4660-b10c-bdc84251e542@app.fastmail.com> (raw)
In-Reply-To: <l35UMCOJPQtly2iOjSkmvZunmzRIFpesb7Jyq7JpoeZb78Dl1FW3u_HU0I5BI_pfqtXB9Kbl9sihkQj0OiTxTQV8nvMoFV4XiG_La6Z0Crk=@protonmail.com>
Hi,
On Wed, Apr 17, 2024, at 6:28 AM, Antoine Poinsot wrote:
> Good morning all,
>
> I've been working on using Guix for the reproducible builds of my Rust
> software. My main question is about linking my program against an older
> glibc version (or better yet, statically linking it against musl).
>
> [...]
>
> Now this links against glibc 2.35. I need to target ideally 2.29 or at
> most 2.31. That's what i'm seeking help for. I've tried the obvious:
> ```
> guix build -f test2.scm --with-input=glibc=glibc@2.29
> ```
>
My knowledge in this area is very shallow, but I also have wanted to link against old glibc versions, for somewhat similar purposes. The best I've got so far is at [1], in which I successfully use `make-gcc-toolchain` to use `gcc` with `glibc-2.31` and define a helper function `package-with-old-stable-libc` to supply it to `package-with-c-toolchain`. I use that in [2] to compile the library I'm interested in against the old glibc version. While this is the best solution I've found so far, I'm still not entirely happy with it! While the code I'm pointing you to isn't too bad, other parts of the overall setup are overly complex (in fairness, largely to also build for Apple platforms), and I haven't managed to build against Glibc 2.23 to fix [3]. But hopefully some of this might be useful, or, better yet, someone might suggest a better solution!
Philip
[1]: https://github.com/libgit2-racket/native-libs/blob/bd400daed8d4e38db6fc472d4ec82b99a884303c/guix/old-stable-libc.scm
[2]: https://github.com/libgit2-racket/native-libs/blob/bd400daed8d4e38db6fc472d4ec82b99a884303c/guix/extracted/non-apple.scm
[3]: https://github.com/libgit2-racket/libgit2/issues/2
next prev parent reply other threads:[~2024-04-17 15:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-17 10:28 Bootstrappable Release Build of Rust Application Antoine Poinsot
2024-04-17 15:17 ` Philip McGrath [this message]
2024-04-18 8:07 ` Antoine Poinsot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e9affdd0-a0d6-4660-b10c-bdc84251e542@app.fastmail.com \
--to=philip@philipmcgrath.com \
--cc=darosior@protonmail.com \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.