From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +CRmBCMdemJ0AgEAbAwnHQ (envelope-from ) for ; Tue, 10 May 2022 10:06:59 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cFUxBCMdemJ9DwAAauVa8A (envelope-from ) for ; Tue, 10 May 2022 10:06:59 +0200 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 82D1319C98 for ; Tue, 10 May 2022 10:06:58 +0200 (CEST) Received: from localhost ([::1]:53996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1noKtV-0006a9-JI for larch@yhetil.org; Tue, 10 May 2022 04:06:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1noKoj-0004zJ-KJ for help-guix@gnu.org; Tue, 10 May 2022 04:02:05 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:37491) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1noKoe-0003wZ-Jq for help-guix@gnu.org; Tue, 10 May 2022 04:01:59 -0400 Received: by mail-wm1-x334.google.com with SMTP id o12-20020a1c4d0c000000b00393fbe2973dso865134wmh.2 for ; Tue, 10 May 2022 01:01:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-transfer-encoding; bh=jNoUqTW/aHL1Itu4lD/4MlDk5ROOVYD1hWacpNyEVnU=; b=bMyvqdR8YQFIk8dUIAh0Caib/eo07HSQAgL5tox4/dmas2hA/sTVQZMdmefpj47N9f uDJGb+yxQ/Tmw+JCzXUT+z0vWDCNof3Hk4KFasYp8P8sjpt1nYGJA9ngDNjfHAwEMGyE 3RTR2rhXLSeal1JZEZR/u7Kb+ZC5cz/8lJitOAUkGkvKSAoFCjQiOz9ERt6LAU88PO/t IezqqOP1ookSNuUUVUIeActf57rZpxHtUxYjv+SC44VeQR6eAfuE8UimB/1qA2Cozjo1 dJw3xN0FO51woTiQbOcXpFUR/dhALg6msuarcNT6WXabbKCe4cTL6UwuPNCtYuM18dGn DDnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=jNoUqTW/aHL1Itu4lD/4MlDk5ROOVYD1hWacpNyEVnU=; b=r1EpBMVyrOm4Jg/ipMLnsS5Et/qz8DlLTwxESa+E3SNpgtiK1QvNXqj7Q9SHwzn667 gcu01Giqtfx2zF2RVOOjQOEdTVQU+wN55DnUt/0a9B3winoZcl4xaEEg+6yo0rXU8Ycq 5GPpBIUsQre8/TyqnpMmRBgwdfbXJWPxaYzW5KSPPvBYdKfLSznaj8ihTObvn4CsdjbN Msf9KPPGX/axuznES1yEG+rfs38fwaf3IyaM1xSK5lrIjXYTeLjujHFP5FPQsLipixYQ qhE5Mj6GUJUETDk2eT+Jx9k0PgZhwl9WccHiFj5MnOnQ1AGv3zY3341eBCy0DkKMzYl5 3U2Q== X-Gm-Message-State: AOAM532uomdAtitokbAVGlB9PL5znfw54UX5SGr6r1S5wf71fkKGsIx5 2hALCw+8xI29n32T1qT6OAyxzhzgNpI= X-Google-Smtp-Source: ABdhPJytn6a7xxvsadGHsPt7GENoP1tiinOzLFwhJmI0eNS/Hb/vsJXXKH+ejMeQ794QE3MXxpgIrg== X-Received: by 2002:a05:600c:2102:b0:394:2765:580c with SMTP id u2-20020a05600c210200b003942765580cmr20146700wml.150.1652169714441; Tue, 10 May 2022 01:01:54 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id c2-20020a5d5282000000b0020c5253d8e0sm13354844wrv.44.2022.05.10.01.01.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 May 2022 01:01:53 -0700 (PDT) From: zimoun To: David Arroyo , help-guix@gnu.org Subject: Re: Defining a toolchain with musl libc In-Reply-To: <253ea756-2eb5-44fc-9f83-d27b3d0db005@www.fastmail.com> References: <87h75y4oq9.fsf@gmail.com> <253ea756-2eb5-44fc-9f83-d27b3d0db005@www.fastmail.com> Date: Tue, 10 May 2022 10:00:27 +0200 Message-ID: <865ymdakbo.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x334.google.com 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_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652170018; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=jNoUqTW/aHL1Itu4lD/4MlDk5ROOVYD1hWacpNyEVnU=; b=SrAuedoNoLmtVdCRrBF9Uuq+D7izw59/eCDCw1zg0FZ/bhLvIFQ0sJoLthTmocQRY1F5sU leaPdrdpc+DCb9dDBhTA2EFZ5pvJuHn7D7HmylzxCPttSWMzI0Nngq+wpCnGByBrxQcdMf 0Rp7YgnZQz5GYtGSOST/SZmZYoeFbPHVhadx2So99NkIFXix8Bt6rUB/lPPUf4NztZ6+70 wnClYND3gOEhSXHgL+LK7Oe4RjUcjn95eUnKPK5tNt155/9Mc2SlFgE+sUE2254PeMLU7k nOK6WoD2xaHyodZ5NuAS1l28UIASA/+8tu3KD7G1DeEKf3WU7A8hF5xRmUMhTQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652170018; a=rsa-sha256; cv=none; b=Ppjftc5yjZcsF6NJgMsxOMnDLerFTfhbdV0DnhFQWC79TDkPnWq0NCtuoPBxi2o1lfPKn/ 5QpSUZ+i9Sw7LLpRwopP1KLIpEA0KCLlEKiE/L18CJfMq2mmpGzFKJ9hZWRvd9pi+CgXpy vTLS7KaVVSrBJKQgQW8RwIRn247HJfs680O4XQFIDus7a5Zrw20KXhAeQTk+03t5y92oLX bAIOIg7sQmH2JXLwWiJ7NNyf2JAifqVQPunkOx8XhGF0GTNms9nVAwUIurU+B04Tbh1hSM BCRceE6tL/Xa34nArhofKRBjJzNnjq+1RlPnpY38XEhjgZLnNxpsGMhj/1JlTQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=bMyvqdR8; dmarc=pass (policy=none) header.from=gmail.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" X-Migadu-Spam-Score: -7.80 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=bMyvqdR8; dmarc=pass (policy=none) header.from=gmail.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" X-Migadu-Queue-Id: 82D1319C98 X-Spam-Score: -7.80 X-Migadu-Scanner: scn0.migadu.com X-TUID: rGVbFIQW5FGO Hi, On Mon, 09 May 2022 at 19:54, "David Arroyo" wrote: > That is a nifty tool, I didn't know about the `--path` > option. Unfortunately it didn't seem to work here, I tried the > following from the root of my channel repo: > > $ guix graph --path --type=3Dbag-emerged -L $(pwd) -e glibc > guix graph: error: no path from 'execline-musl-static@2.8.1.0' to 'glibc= @2.33' Is =E2=80=99glibc=E2=80=99 listed by =E2=80=9Cguix size -e '(@ (aqwari pack= ages skaware) execline-musl-static)'=E2=80=9D? >> Note that usually musl comes from a wrapper around gcc, named >> =E2=80=99musl-gcc=E2=80=99. It is specifically disabled by the musl pac= kage: >> >> #:configure-flags >> (list "--disable-gcc-wrapper"))) >> >> I do not know why. Maybe because at the time of commit >> ce728f70e5ef8783a28652e382c2c9f61c7b4c06, it was not necessary or maybe >> because the license of musl is incompatible with the one of GCC. > > Newer versions of GCC actually have an `-mmusl` flag and allow for > target Maybe, try the compile the package using this flag and passing the package musl as native-inputs. > triplets include `-musl-`, which appear to accomplish something > similar. In fact, in a separate project this G-expression worked well > for compiling a single C file with musl, statically:=20 > > https://git.sr.ht/~droyo/guix-channel/tree/640fe1b4eabe9a3aaa4b532c0ed71e= 7abb74dae8/item/aqwari/namespace.scm#L288-299 Cool! > >> Well, I would take this path: rebuild a variant of musl with the wrapper >> and try to make a C toolchain using this wrapper. > > This sounds like a reasonable approach. The only potential issue I see is= this option in mus-gcc's spec file: > > *link: > -dynamic-linker /lib/ld-musl-x86_64.so.1 -nostdlib %{shared:-shared} %{s= tatic:-static} %{rdynamic:-export-dynamic} > > but I'm not producing dynamically linked binaries anyway. While this > is not urgent for me anymore, I'm still interested and I will probably > try this in the next few weeks. Well, from my understanding, we do not have a good story for using the package transformation =E2=80=99with-c-toolchain=E2=80=99 with another comp= iler than GCC and another C library than Glibc. And then, another story of static. For instance, are you able to produce static binary using the regular C toolchain. Exploring 2 problem spaces in the same time makes hard to tackle each individually since they are orthogonal, at first. IMHO. Cheers, simon