From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 12 03:32:28 2021 Received: (at 47006) by debbugs.gnu.org; 12 Sep 2021 07:32:28 +0000 Received: from localhost ([127.0.0.1]:41926 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPJyW-00043M-CN for submit@debbugs.gnu.org; Sun, 12 Sep 2021 03:32:28 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:34508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPJyT-000432-QN for 47006@debbugs.gnu.org; Sun, 12 Sep 2021 03:32:26 -0400 Received: by mail-wr1-f65.google.com with SMTP id m9so9430064wrb.1 for <47006@debbugs.gnu.org>; Sun, 12 Sep 2021 00:32:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=ephzIrDJR515+R0Oj3fzZhytpZ9LMG1HondTGOMdivU=; b=NN9j2+SxxeEQxKpC1k4IRcDayCSdSVfYyuqbHgpRFBL8ESEPVzqQmzTx5sxw+TvNQn DeMOY4r2xjxI950XkcCoGZr2MoawU/nPIhYzmqpwyfmk1X+syNLgIyL9rG9V13A/V6Gt tTdOj/RVtDszEqoagTHzpS1eRkCi7t4G1waVqUwXdb+B8LXXT7YWJCiO3PRUnYSPy+hI I20hv3Pib34TsUH77y+aq5Wn2IRWPKYbkITMyVky6jt+0A4y9u8kSbJ0oYtqjnmvE/7d ge+N/HuwlMy+Ydiy5uYsTCNp+WKT4ucvN4Ew+dOmC/o+Uh00SUwUp88giEGlOovHDP+j xdMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=ephzIrDJR515+R0Oj3fzZhytpZ9LMG1HondTGOMdivU=; b=z4NYSjJrr7i+EsHu+X43hQ1ya2N+Fg0GUli1gBhzuKCDoLaQZ/RXK1n1lUXWXp9wLV ywc1d6a6zfaItKFExAURnvWzuly1gbHPZKUvk9Mh6NkGQUEllBcxk1xXqzRkGDChatny ms08Y39EMuVtpvjq2XwdU55jrCLDhzd5oDixSi3Y0pTslSV6OzZRGQFNKnSW6RCbVbx1 rgRQK2vO6SOgA20x0NVkfwgddy65qv2fdSU/rFYqfWH7b6nO3aeKXzLENlz+7jdQ69wr l7RNPg891wcY6m4H5Kar3J4lyOxdV+Zmzf37cUU8wKwJBpj67+NRMAaLytil5Onkgxi1 5cYA== X-Gm-Message-State: AOAM532zO3O6ugVhHJM1uEJP72RCTdxVpe+PEdbMqbq7MWdSEY9bZ/C8 DtXYUr+Z+P1SP2KWiKGOoQ4= X-Google-Smtp-Source: ABdhPJx9MtUbHhkmyCC7lLvdUPN1DIURUqrCBaiNbdxXrMmIiq4nByRAqERbSQLgZnTrEVpIM90ITQ== X-Received: by 2002:adf:80e5:: with SMTP id 92mr6332785wrl.300.1631431939609; Sun, 12 Sep 2021 00:32:19 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id d8sm3993232wrv.20.2021.09.12.00.32.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Sep 2021 00:32:18 -0700 (PDT) Message-ID: <93454096d15aed82b9bf4b1401a0fddcb156f2b7.camel@gmail.com> Subject: Re: [bug#47006] [WIP PATCH v2 2/2] gnu: Add zig. From: Liliana Marie Prikler To: Sarah Morgensen Date: Sun, 12 Sep 2021 09:32:15 +0200 In-Reply-To: <865yv6mmk2.fsf@mgsn.dev> References: <0f6c5b692df8d06a0d7adddc9e5abf93894a366f.1631226695.git.liliana.prikler@gmail.com> <86wnnmnceg.fsf@mgsn.dev> <865yv6mmk2.fsf@mgsn.dev> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47006 Cc: 47006@debbugs.gnu.org, =?UTF-8?Q?Andr=C3=A1s_V=C3=B6r=C3=B6sk=C5=91i?= , maximedevos@telenet.be, efraim@flashner.co.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Am Samstag, den 11.09.2021, 21:42 -0700 schrieb Sarah Morgensen: > Hi, > > I finally got a chance to run some tests. I've attached a patch > below > that works. As András pointed out, > > András Vöröskői writes: > > > Hi, > > > > So zig testing result is the following: > > -Dskip-libc does not work, my best result is with -Dskip-non- > > native. > > > > -Dskip-non-native fails with "libc headers note" test from > > `compile_errors.zig` (I had to comment it around line 2750) and std > > library tests also fails instantaneously. > > > > So I suggest the following test command for now: `zig build > > -Dskip-non-native test-toolchain` with a patch to disable that > > failing > > test. This will test everything except the std library and docs. > > 'test-toolchain' is probably a good choice because it skips standard > library tests, which I found out can take a lot of memory > (>7.5GB)! I also disabled stage 2 tests since stage 2 is > experimental and isn't actually installed. So far, so good. > Now that I have an output: > > --8<---------------cut here---------------start------------->8--- > $ ./pre-inst-env guix size zig > store > item total s > elf > /gnu/store/kwjw55f4syys5gg8a9lr6bk6a3jdqw0i-zig- > 0.8.1 576.6 177.4 30.8% > /gnu/store/rmc131fpy2hv408a1awd2wm7kiwyf7d7-llvm- > 12.0.0 234.1 162.7 28.2% > /gnu/store/rn75fm7adgx3pw5j8pg3bczfqq1y17lk-gcc- > 7.5.0 178.5 107.3 18.6% > /gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc- > 2.31 38.4 36.7 6.4% > /gnu/store/f0ca0lf64bw08srv1bj7gkg6ag0sbdb2-gcc-7.5.0- > lib 71.0 32.6 5.7% > /gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc-7.5.0- > lib 71.0 32.6 5.7% > /gnu/store/nzfhh1rm85lx2p5plbx45qqj82pcv5hp-clang-runtime- > 12.0.0 95.9 24.9 4.3% > /gnu/store/mmhimfwmmidf09jw1plw3aw1g1zn2nkh-bash-static- > 5.0.16 1.6 1.6 0.3% > /gnu/store/g2s5jfkfd4k973wb58476b1bbv9zpm6m-zlib- > 1.2.11 38.6 0.2 0.0% > /gnu/store/rykm237xkmq7rl1p0nwass01p090p88x-zlib- > 1.2.11 71.2 0.2 0.0% > /gnu/store/bw15z9kh9c65ycc2vbhl2izwfwfva7p1-libffi- > 3.3 71.2 0.2 0.0% > total: 576.6 MiB > --8<---------------cut here---------------end--------------->8--- > > It looks like we're retaining references to the main gcc-7.5.0 > output, but only to its "include/c++" directory, as a single > reference in the zig binary. I expect this would cause issues if > another GCC version were later used with Zig. Where does that include/c++ come from? Could it be related to the libc header thing we talked about in IRC? I don't see any substitution for that going on either. > We're retaining double direct references to gcc-7.5.0-lib, and double > indirect references to zlib-1.2.11. This seems to come from clang. > (Wow, clang is big. Maybe it should have a separate "lib" > output? Zig, for example, only needs libclang to build, not the > binaries.) > > Other than those items, it looks good! According to `guix refresh', there's only two dependents of Clang 12, but since we'd have to rebuild all clangs, that might go into core- updates territory. We might also want to check with an expert on X/Mesa, since that seems to be one of our biggest clang dependents. > + (patches > + (search-patches > + "zig-disable-libc-note-test.patch" Is this test really necessary to skip that test? If not, let's try to use the command line for that. > + ;; XXX: Remove the following patch when updating LLVM to > 12.0.1. > + "zig-disable-MIPS-tests.patch" There's a patch for LLVM 12.0.1 waiting in the ML and we could potentially bump lld to 12.0.1 regardless. (Can LLVM components be mix-matched like that?) > + "zig-fix-cross-native-execution.patch" IIUC this is weaker than "-Dskip-non-native". Is there a reason to include specifically these non-native tests? > + "zig-use-explicit-paths.patch")))) > + (native-search-paths > + (list > + (search-path-specification > + (variable "ZIG_INCLUDE_DIRS") > + ;; XXX: It doesn't seem as though Zig can distinguish between > C and C++ > + ;; include paths, so provide both. > + (files '("include/c++" "include"))) > + (search-path-specification > + ;; TODO: Might be confused with "ZIG_LIB_DIR"... Maybe use > + ;; "ZIG_INCLUDE_PATH" and "ZIG_LIBRARY_PATH"? > + (variable "ZIG_LIB_DIRS") > + (files '("lib" "lib64"))))) You can rewrite "zig-use-explicit-paths.patch" in-place with Emacs' query-replace and/or sed (or even just manually, there are no lines to add or remove) if you disagree with my environment variable naming choice. Just make sure you don't accidentally break diff by deleting trailing space. Regards