unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: Sarah Morgensen <iskarian@mgsn.dev>
Cc: 47006@debbugs.gnu.org, "András Vöröskői" <voroskoi@gmail.com>,
	maximedevos@telenet.be, efraim@flashner.co.il
Subject: [bug#47006] [WIP PATCH v2 2/2] gnu: Add zig.
Date: Sun, 12 Sep 2021 09:32:15 +0200	[thread overview]
Message-ID: <93454096d15aed82b9bf4b1401a0fddcb156f2b7.camel@gmail.com> (raw)
In-Reply-To: <865yv6mmk2.fsf@mgsn.dev>

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 <voroskoi@gmail.com> 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





  reply	other threads:[~2021-09-12  7:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <a1922b0a2ec237d217af54ed3ff7065e360d994c.camel@gmail.com>
2021-09-09  1:43 ` [bug#50449] [PATCH] Add zig Andrew Patterson
2021-09-09 13:32 ` [bug#47006] [PATCH 1/2] gnu: lld: Update to 12.0.0 Liliana Prikler
2021-09-09 13:32 ` [bug#47006] [PATCH 2/2] gnu: Add zig Liliana Prikler
2021-09-09 16:31   ` [bug#50449] " Sarah Morgensen
2021-09-09 18:18     ` Liliana Marie Prikler
2021-09-09 18:49       ` [bug#47006] [bug#50449] " Sarah Morgensen
2021-09-09 13:32         ` [bug#47006] [WIP PATCH v2 " Liliana Prikler
     [not found]           ` <0f6c5b692df8d06a0d7adddc9e5abf93894a366f.1631226695.git.liliana.prikler@gmail.com>
2021-09-11  9:52             ` iskarian
2021-09-11 19:24           ` Sarah Morgensen
2021-09-11 20:01             ` [bug#39480] " Liliana Marie Prikler
2021-09-12  4:42               ` Sarah Morgensen
2021-09-12  7:32                 ` Liliana Marie Prikler [this message]
2021-09-12  7:39                   ` Liliana Marie Prikler
2021-09-12 22:40                   ` Sarah Morgensen
2021-09-14 16:17                     ` Liliana Marie Prikler
2021-09-24  0:17                       ` [bug#50449] " Sarah Morgensen
2021-09-09 13:32                         ` [bug#50449] [PATCH v5] " Liliana Prikler
2021-10-31  8:06                           ` [bug#47006] " Liliana Marie Prikler

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=93454096d15aed82b9bf4b1401a0fddcb156f2b7.camel@gmail.com \
    --to=liliana.prikler@gmail.com \
    --cc=47006@debbugs.gnu.org \
    --cc=efraim@flashner.co.il \
    --cc=iskarian@mgsn.dev \
    --cc=maximedevos@telenet.be \
    --cc=voroskoi@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).