From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: Cross-compilation broken on canonical packages. Date: Thu, 02 Jan 2020 19:07:00 +0100 Message-ID: <87blrlu3zv.fsf@gnu.org> References: <878snff7pv.fsf@gmail.com> <877e2zf7kv.fsf@gmail.com> <871rt0ntvy.fsf@gnu.org> <87fthc9vav.fsf@gmail.com> <87y2ut645u.fsf@gnu.org> <87tv5gbz0o.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:40262) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1in4sC-0002y9-8m for guix-devel@gnu.org; Thu, 02 Jan 2020 13:07:05 -0500 In-Reply-To: <87tv5gbz0o.fsf@gmail.com> (Mathieu Othacehe's message of "Tue, 31 Dec 2019 10:55:03 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Mathieu Othacehe Cc: guix-devel@gnu.org Hola! Mathieu Othacehe skribis: >> Two simple solutions here, I think: >> >> 1. Make =E2=80=98packages=E2=80=99 a thunked field. >> >> 2. Stop using =E2=80=98canonical-package=E2=80=99 altogether in =E2=80= =98%base-packages=E2=80=99. >> >> I actually have a preference for #2. We=E2=80=99d need to check what im= pact it >> has on the system closure size, but I suspect it=E2=80=99s going to be m= inimal. >> >> Thoughts? > > Option #2 seems nicer. There are other canonical-package calls when > building services. I have a patch attached that removes all those calls. > > The image produced when running "guix system disk-image bare-bones.tmpl" > increases by: > > * 30MB when removing the canonical-package of %base-packages > * 30MB for all other calls. OK. (It may be slightly more accurate to look at the output of: guix size $(guix system build =E2=80=A6).) > So altogether, that's a 60MB increase on a 1.5GB image (4%). I find it > acceptable, WDYT? It=E2=80=99s more than I thought but I think it=E2=80=99s OK. (Also, how c= ome bare-bones takes 1.5=C2=A0GiB?!) > From a55eb86975c5f1c2783b0af265364821259e3351 Mon Sep 17 00:00:00 2001 > From: Mathieu Othacehe > Date: Tue, 31 Dec 2019 09:56:51 +0100 > Subject: [PATCH] system: Stop using canonical-package. > > Usage of canonical-package outside of thunked fields breaks cross-compila= tion, > see: https://lists.gnu.org/archive/html/guix-devel/2019-12/msg00410.html. > > * gnu/installer.scm (installer-program): Remove canonical-package. > * gnu/services/base.scm (): Ditto, > (%base-services): ditto. > * gnu/services/xorg.scm: Remove useless canonical-package import. > * gnu/system.scm (%base-packages): Remove canonical-package. > * gnu/system/install.scm (%installation-services): Ditto, > (installation-os): ditto. > * gnu/system/locale.scm (single-locale-directory): Ditto, > (%default-locale-libcs): ditto. [...] > --- a/gnu/system/locale.scm > +++ b/gnu/system/locale.scm > @@ -86,7 +86,7 @@ or #f on failure." > #f))) >=20=20 > (define* (single-locale-directory locales > - #:key (libc (canonical-package glibc))) > + #:key (libc glibc)) > "Return a directory containing all of LOCALES for LIBC compiled. >=20=20 > Because locale data formats are incompatible when switching from one lib= c to > @@ -147,7 +147,7 @@ data format changes between libc versions." >=20=20 > (define %default-locale-libcs > ;; The libcs for which we build locales by default. > - (list (canonical-package glibc))) > + (list glibc)) I would leave this bit unchanged if possible, because that way the glibc used would really match that programs are linked against. The rest LGTM, thanks! Ludo=E2=80=99.