From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id aITiFxQMIWaEOgEAe85BDQ:P1 (envelope-from ) for ; Thu, 18 Apr 2024 14:03:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id aITiFxQMIWaEOgEAe85BDQ (envelope-from ) for ; Thu, 18 Apr 2024 14:03:32 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail3 header.b=Psa40fD7; dmarc=pass (policy=quarantine) header.from=protonmail.com; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1713441812; a=rsa-sha256; cv=none; b=q+zqMn+5XN1jHhnJHxZcDKEKqGiD6SSqXDvXKDUtLrNd7GZ7oKjTJB5QlBeVk570LYv7Zc Xa1WNmvrq6kckljiXl6Xpg2pzCezxD17XsVVtsZ9FQR5YPsU5EjfbWy1xwoDtkHZcwx8IQ /rFzXuAXF2MCuCD2yp01XnzNj7JLCUTZHayLwpj8e22fgK7Wkt+BikHO8c94g2pt3/dsPR RXJH3NrYKdDD3FSSUcMWYgV+iQaahaf86G1kGsVXD4aYjg71N1FG7K3kmk9cC3aUxE08BB jrYUQmmjNduhl2oLHKQ6QL4OaTPI5fsIhCBT+PpFp+lL6rx6cjXPI6SOJp/gPw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail3 header.b=Psa40fD7; dmarc=pass (policy=quarantine) header.from=protonmail.com; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1713441812; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=zszSRRIYoLB8kixBWaZ3DvEOimozj5SR3H3OOssWo5g=; b=YW7eebPBOog11P4+SfF84ANn8ogM6ChBJ2mlfmGof/9RkxR9T1FQ9CBn2jjKtQCjA+f6q4 YO8uVdSdNPfZtAtyaAQSqRSEcOrqAsLNPwyAGO7z8EtFVt+Y5OgN9zoNzIJm9bw9rX+9DN kFdIbihNvkA1+Q401XAY4gEOiasGYx/3gZzLM2QwCNihAq9elVwra03USZTiduxn6YsAFn zM/w4Avlz2oToiAwGErKv55Uro0Vq7KD7dNWInAp3S9bk6adoCngf7RcGzwyq0ZB7iaxWC dZ7ZpMxYy03rnd7StNjy3YXlSRzVrCX/f4a6hO1fbptLb3sscZBjpMfWAI80kw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0F0AA71105 for ; Thu, 18 Apr 2024 14:03:31 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rxQTq-0005NS-Q1; Thu, 18 Apr 2024 08:03:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rxMoQ-0008Do-Qt for help-guix@gnu.org; Thu, 18 Apr 2024 04:08:07 -0400 Received: from mail-40132.protonmail.ch ([185.70.40.132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rxMoO-0004vl-9d for help-guix@gnu.org; Thu, 18 Apr 2024 04:08:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1713427679; x=1713686879; bh=zszSRRIYoLB8kixBWaZ3DvEOimozj5SR3H3OOssWo5g=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=Psa40fD7d70Mcdkb+VQpu9oAtuG7uaNHzYVyCSKluo3eB1ty2vRvsFMWvL5ztjXyy gdr+DhSh+7B8oRhQ9DSpVE+KcCLeT5XfT4GeGCpJ3r6N05IdD98HYfSnwK4dCG50k8 jZTzUCiJ/NJuDf859blODf96GriywuqigF2HoGnaMr2YqOUO729Tp70xoSLkmdF/Fk 2/NTrkLSswiIt+OmWESxoXRafKPD23ofbG1zH3udooT1IU2fuuSBYYHZv6ZjGoUmdG +NGOqx4x/mMwIEDkUql9kR7S6ngIysJdOHggRq2n/YzApZUoVS+AKQ6AcBozddWHNb o9OSeZm27HBpg== Date: Thu, 18 Apr 2024 08:07:47 +0000 To: Philip McGrath From: Antoine Poinsot Cc: Guix Help Subject: Re: Bootstrappable Release Build of Rust Application Message-ID: In-Reply-To: References: Feedback-ID: 7060259:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.132; envelope-from=darosior@protonmail.com; helo=mail-40132.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 18 Apr 2024 08:02:57 -0400 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -9.78 X-Migadu-Queue-Id: 0F0AA71105 X-Migadu-Spam-Score: -9.78 X-Migadu-Scanner: mx10.migadu.com X-TUID: ay3GG1eIcfg4 Thanks for sharing. Unfortunately the very same `make-gcc-toolchain` keeps failing to compile f= or me, even with the same gcc and glibc versions as you: ``` In file included from ../include/pthread.h:1, = = = = = =20 from ../sysdeps/nptl/thread_db.h:25, = = = = = =20 from ../nptl/descr.h:32, = = = = = =20 from ../sysdeps/x86_64/nptl/tls.h:130, = = = = = =20 from ../include/link.h:51, = = = = = =20 from ../include/dlfcn.h:4, = = = = = =20 from ../sysdeps/generic/ldsodefs.h:32, = = = = = =20 from ../sysdeps/x86/ldsodefs.h:64, = = = = = =20 from ../sysdeps/gnu/ldsodefs.h:46, = = = = = =20 from ../sysdeps/unix/sysv/linux/ldsodefs.h:25, = = = = = =20 from :2: = = = = = =20 ../sysdeps/nptl/pthread.h:719:47: error: argument 1 of type =E2=80=98struct= __jmp_buf_tag *=E2=80=99 declared as a pointer [-Werror=3Darray-parameter= =3D] = = = =20 719 | extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask= ) __THROWNL; = = = = =20 | ~~~~~~~~~~~~~~~~~~~~~~^~~~~ ``` Code is basically the same as yours: ``` (define gcc-toolchain-2.31 (make-gcc-toolchain gcc glibc-2.31)) (package-with-c-toolchain rust-liana_gui-5.0.0 `(("gcc-toolchain" ,gcc-tool= chain-2.31))) ``` On Wednesday, April 17th, 2024 at 5:17 PM, Philip McGrath wrote: > Hi, >=20 > On Wed, Apr 17, 2024, at 6:28 AM, Antoine Poinsot wrote: >=20 > > Good morning all, > >=20 > > 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). > >=20 > > [...] > >=20 > > 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=3Dglibc=3Dglibc@2.29` >=20 >=20 > 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 g= ot so far is at [1], in which I successfully use `make-gcc-toolchain` to us= e `gcc` with `glibc-2.31` and define a helper function `package-with-old-st= able-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 t= he 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 m= ight suggest a better solution! >=20 > Philip >=20 > [1]: https://github.com/libgit2-racket/native-libs/blob/bd400daed8d4e38db= 6fc472d4ec82b99a884303c/guix/old-stable-libc.scm > [2]: https://github.com/libgit2-racket/native-libs/blob/bd400daed8d4e38db= 6fc472d4ec82b99a884303c/guix/extracted/non-apple.scm > [3]: https://github.com/libgit2-racket/libgit2/issues/2