From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 18 14:12:01 2022 Received: (at submit) by debbugs.gnu.org; 18 Jan 2022 19:12:01 +0000 Received: from localhost ([127.0.0.1]:51725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n9ttg-0002C9-JX for submit@debbugs.gnu.org; Tue, 18 Jan 2022 14:12:01 -0500 Received: from lists.gnu.org ([209.51.188.17]:37768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n9ttc-0002By-GO for submit@debbugs.gnu.org; Tue, 18 Jan 2022 14:11:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9ttb-0008Dk-Rq for guix-patches@gnu.org; Tue, 18 Jan 2022 14:11:56 -0500 Received: from [2607:f8b0:4864:20::1030] (port=45664 helo=mail-pj1-x1030.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n9ttZ-0006o1-L9 for guix-patches@gnu.org; Tue, 18 Jan 2022 14:11:55 -0500 Received: by mail-pj1-x1030.google.com with SMTP id g9-20020a17090a67c900b001b4f1d71e4fso212027pjm.4 for ; Tue, 18 Jan 2022 11:11:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=F55QbR6sUXlKc2DK5t2UlMkg+SMjigLI/jwmPZJJum4=; b=nmfLh56O424h3MaQ6U+si+t/7bLDrJQkZ6TvMhW2vHGOx0bGys170QI+5RXidbDGFl JRosU3zkcDH8yMYQ3raKPfpeJ5zn3pqGoIOgbNg+6/d+p0lYKec3Luh0OUXWVr+gA28X 5h/bw36GEzQefo1o8zoJiLGWxhFvj4DcMr8TFWMi/+MRTql3Vq30FUI96RFvCQqE/U+s nBpq8p9mqz7EGpo821SftPE7EDeKNVa+TuETuy1ZE/BaMjnzJPz0YZ21sdva0xnFqL8y ePLTkm7s7TTM3i2/Xnbvs1PpgGSQ5e7IEm2/L3LVKNoAcjC0PMoYeHOQCaohWbE64Xzz MnEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=F55QbR6sUXlKc2DK5t2UlMkg+SMjigLI/jwmPZJJum4=; b=wwFaDmMkt77TL3EmvE2XqEntBNc5osWLETwkO3jd2YcXJb4ajyObpI63ZGAZrN+YRS mxa7Ep2JA+M+zrQTBZD76ek5/HRSpxG8TZIRL6izqc/EX+VvFOoxC+SVeaYD47W1pzYX tgiuXvA0HI/MdQ9rtnbYVb9awrxNXgC9//PsxSulyskFprKmeStfESqlo9OgUHVLA8hP OCeBnynkZ82Z03POzOIg4fOMtM3sSFRMkrgAdeKYHLRnJxKky19TzmHw47ItdX8UqvxR C7qB3Xln6e+aQ9J6dblkveFkg7orhowWrE+aGF9bizoUoPNgFwiJt8T90fd8oz3Gqf7H qasA== X-Gm-Message-State: AOAM530cd87JIbFEhH14uvAnpFZnSbekPY0YUtQ+QogZFzQ/MWxH8UiZ R1fsIViTgWs8vj7hYirshIJoTp5KpNj2ng== X-Google-Smtp-Source: ABdhPJyvAtZnqFGG69kzC8a+DFVdxOvGAAcknoD2pi99fQz7Mc1GuQUroVwQct/0bnOERrJ1ozsXMg== X-Received: by 2002:a17:902:b202:b0:149:9a8a:f93b with SMTP id t2-20020a170902b20200b001499a8af93bmr27699795plr.127.1642533111239; Tue, 18 Jan 2022 11:11:51 -0800 (PST) Received: from localhost.localdomain (122-61-174-236-fibre.sparkbb.co.nz. [122.61.174.236]) by smtp.googlemail.com with ESMTPSA id r11sm19144246pff.81.2022.01.18.11.11.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jan 2022 11:11:50 -0800 (PST) From: Calum Irwin To: guix-patches@gnu.org Subject: [PATCH] gnu: zig: Update to 0.9.0 Date: Wed, 19 Jan 2022 08:11:25 +0000 Message-Id: <20220119081125.2487-1-calumirwin1@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::1030 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=calumirwin1@gmail.com; helo=mail-pj1-x1030.google.com X-Spam_score_int: 21 X-Spam_score: 2.1 X-Spam_bar: ++ X-Spam_report: (2.1 / 5.0 requ) BAYES_00=-1.9, DATE_IN_FUTURE_12_24=3.199, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 4.1 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * gnu/packages/patches/zig-disable-libc-note-test.patch: Move patch changes to new file. * gnu/packages/patches/zig-use-system-paths.patch: Update line numbers. * gnu/packages/zig.scm: Update to 0.9.0 [...] Content analysis details: (4.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (calumirwin1[at]gmail.com) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (calumirwin1[at]gmail.com) 2.5 DATE_IN_FUTURE_12_24 Date: is 12 to 24 hours after Received: date 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.51.188.17 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 1.3 SPOOFED_FREEMAIL No description available. 1.5 SPOOF_GMAIL_MID From Gmail but it doesn't seem to be... X-Debbugs-Envelope-To: submit Cc: Calum Irwin 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: 0.4 (/) * gnu/packages/patches/zig-disable-libc-note-test.patch: Move patch changes to new file. * gnu/packages/patches/zig-use-system-paths.patch: Update line numbers. * gnu/packages/zig.scm: Update to 0.9.0 --- .../patches/zig-disable-libc-note-test.patch | 32 +-- .../patches/zig-use-system-paths.patch | 261 +++++++++--------- gnu/packages/zig.scm | 11 +- 3 files changed, 152 insertions(+), 152 deletions(-) diff --git a/gnu/packages/patches/zig-disable-libc-note-test.patch b/gnu/packages/patches/zig-disable-libc-note-test.patch index 4d76139efb..b2c57cb571 100644 --- a/gnu/packages/patches/zig-disable-libc-note-test.patch +++ b/gnu/packages/patches/zig-disable-libc-note-test.patch @@ -1,14 +1,12 @@ -This test fails with "error.CompilationIncorrectlySucceeded". - diff --git a/test/compile_errors.zig b/test/compile_errors.zig -index fd1255c..20d5548 100644 +index b1eaa0302..621f9db0a 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig -@@ -2751,15 +2751,15 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { +@@ -2943,15 +2943,15 @@ pub fn addCases(ctx: *TestContext) !void { "tmp.zig:3:5: error: dependency on libc must be explicitly specified in the build command", }); - -- cases.addTest("libc headers note", + +- ctx.testErrStage1("libc headers note", - \\const c = @cImport(@cInclude("stdio.h")); - \\export fn entry() void { - \\ _ = c.printf("hello, world!\n"); @@ -17,15 +15,15 @@ index fd1255c..20d5548 100644 - "tmp.zig:1:11: error: C import failed", - "tmp.zig:1:11: note: libc headers not available; compilation does not link against libc", - }); -+// cases.addTest("libc headers note", -+// \\const c = @cImport(@cInclude("stdio.h")); -+// \\export fn entry() void { -+// \\ _ = c.printf("hello, world!\n"); -+// \\} -+// , &[_][]const u8{ -+// "tmp.zig:1:11: error: C import failed", -+// "tmp.zig:1:11: note: libc headers not available; compilation does not link against libc", -+// }); ++ // ctx.testErrStage1("libc headers note", ++ // \\const c = @cImport(@cInclude("stdio.h")); ++ // \\export fn entry() void { ++ // \\ _ = c.printf("hello, world!\n"); ++ // \\} ++ // , &[_][]const u8{ ++ // "tmp.zig:1:11: error: C import failed", ++ // "tmp.zig:1:11: note: libc headers not available; compilation does not link against libc", ++ // }); } - - cases.addTest("comptime vector overflow shows the index", + + ctx.testErrStage1("comptime vector overflow shows the index", diff --git a/gnu/packages/patches/zig-use-system-paths.patch b/gnu/packages/patches/zig-use-system-paths.patch index 33b7da1e0d..0a3cbb0e92 100644 --- a/gnu/packages/patches/zig-use-system-paths.patch +++ b/gnu/packages/patches/zig-use-system-paths.patch @@ -1,143 +1,144 @@ -This patch replaces the OS-specific detection mechanism by one that solely -relies on environment variables. This has the benefit that said environment -variables can be used as search paths in Guix. - -Index: zig-0.8.1/lib/std/zig/system.zig -=================================================================== ---- zig-0.8.1.orig/lib/std/zig/system.zig -+++ zig-0.8.1/lib/std/zig/system.zig -@@ -39,101 +39,57 @@ pub const NativePaths = struct { - }; - errdefer self.deinit(); - -- var is_nix = false; -- if (process.getEnvVarOwned(allocator, "NIX_CFLAGS_COMPILE")) |nix_cflags_compile| { -- defer allocator.free(nix_cflags_compile); +diff --git a/lib/std/zig/system/NativePaths.zig b/lib/std/zig/system/NativePaths.zig +index 8e3e46e48..1ed9d3206 100644 +--- a/lib/std/zig/system/NativePaths.zig ++++ b/lib/std/zig/system/NativePaths.zig +@@ -26,73 +26,42 @@ pub fn detect(allocator: Allocator, native_info: NativeTargetInfo) !NativePaths + }; + errdefer self.deinit(); + +- var is_nix = false; +- if (process.getEnvVarOwned(allocator, "NIX_CFLAGS_COMPILE")) |nix_cflags_compile| { +- defer allocator.free(nix_cflags_compile); - -- is_nix = true; -- var it = mem.tokenize(nix_cflags_compile, " "); -+ // TODO: Support cross-compile paths? -+ if (process.getEnvVarOwned(allocator, "C_INCLUDE_PATH")) |c_include_path| { -+ defer allocator.free(c_include_path); -+ var it = mem.tokenize(c_include_path, ":"); - while (true) { -- const word = it.next() orelse break; -- if (mem.eql(u8, word, "-isystem")) { -- const include_path = it.next() orelse { -- try self.addWarning("Expected argument after -isystem in NIX_CFLAGS_COMPILE"); -- break; -- }; -- try self.addIncludeDir(include_path); -- } else { -- if (mem.startsWith(u8, word, "-frandom-seed=")) { -- continue; -- } -- try self.addWarningFmt("Unrecognized C flag from NIX_CFLAGS_COMPILE: {s}", .{word}); +- is_nix = true; +- var it = mem.tokenize(u8, nix_cflags_compile, " "); ++ // TODO: Support cross-compile paths? ++ if (process.getEnvVarOwned(allocator, "C_INCLUDE_PATH")) |c_include_path| { ++ defer allocator.free(c_include_path); ++ var it = mem.tokenize(u8, c_include_path, ":"); + while (true) { +- const word = it.next() orelse break; +- if (mem.eql(u8, word, "-isystem")) { +- const include_path = it.next() orelse { +- try self.addWarning("Expected argument after -isystem in NIX_CFLAGS_COMPILE"); +- break; +- }; +- try self.addIncludeDir(include_path); +- } else { +- if (mem.startsWith(u8, word, "-frandom-seed=")) { +- continue; - } -+ const dir = it.next() orelse break; -+ try self.addIncludeDir(dir); - } - } else |err| switch (err) { - error.InvalidUtf8 => {}, - error.EnvironmentVariableNotFound => {}, - error.OutOfMemory => |e| return e, +- try self.addWarningFmt("Unrecognized C flag from NIX_CFLAGS_COMPILE: {s}", .{word}); +- } ++ const dir = it.next() orelse break; ++ try self.addIncludeDir(dir); } -- if (process.getEnvVarOwned(allocator, "NIX_LDFLAGS")) |nix_ldflags| { -- defer allocator.free(nix_ldflags); - -- is_nix = true; -- var it = mem.tokenize(nix_ldflags, " "); -+ if (process.getEnvVarOwned(allocator, "CPLUS_INCLUDE_PATH")) |cplus_include_path| { -+ defer allocator.free(cplus_include_path); -+ var it = mem.tokenize(cplus_include_path, ":"); - while (true) { -- const word = it.next() orelse break; -- if (mem.eql(u8, word, "-rpath")) { -- const rpath = it.next() orelse { -- try self.addWarning("Expected argument after -rpath in NIX_LDFLAGS"); -- break; -- }; -- try self.addRPath(rpath); -- } else if (word.len > 2 and word[0] == '-' and word[1] == 'L') { -- const lib_path = word[2..]; -- try self.addLibDir(lib_path); -- } else { -- try self.addWarningFmt("Unrecognized C flag from NIX_LDFLAGS: {s}", .{word}); + } else |err| switch (err) { + error.InvalidUtf8 => {}, + error.EnvironmentVariableNotFound => {}, + error.OutOfMemory => |e| return e, + } +- if (process.getEnvVarOwned(allocator, "NIX_LDFLAGS")) |nix_ldflags| { +- defer allocator.free(nix_ldflags); +- +- is_nix = true; +- var it = mem.tokenize(u8, nix_ldflags, " "); ++ if (process.getEnvVarOwned(allocator, "CPLUS_INCLUDE_PATH")) |cplus_include_path| { ++ defer allocator.free(cplus_include_path); ++ var it = mem.tokenize(u8, cplus_include_path, ":"); + while (true) { +- const word = it.next() orelse break; +- if (mem.eql(u8, word, "-rpath")) { +- const rpath = it.next() orelse { +- try self.addWarning("Expected argument after -rpath in NIX_LDFLAGS"); - break; -- } -+ const dir = it.next() orelse break; -+ try self.addIncludeDir(dir); - } - } else |err| switch (err) { - error.InvalidUtf8 => {}, - error.EnvironmentVariableNotFound => {}, - error.OutOfMemory => |e| return e, +- }; +- try self.addRPath(rpath); +- } else if (word.len > 2 and word[0] == '-' and word[1] == 'L') { +- const lib_path = word[2..]; +- try self.addLibDir(lib_path); +- } else { +- try self.addWarningFmt("Unrecognized C flag from NIX_LDFLAGS: {s}", .{word}); +- break; +- } ++ const dir = it.next() orelse break; ++ try self.addIncludeDir(dir); } -- if (is_nix) { -- return self; -- } + } else |err| switch (err) { + error.InvalidUtf8 => {}, + error.EnvironmentVariableNotFound => {}, + error.OutOfMemory => |e| return e, + } +- if (is_nix) { +- return self; +- } - -- if (comptime Target.current.isDarwin()) { -- try self.addIncludeDir("/usr/include"); -- try self.addIncludeDir("/usr/local/include"); - -- try self.addLibDir("/usr/lib"); -- try self.addLibDir("/usr/local/lib"); +- if (comptime builtin.target.isDarwin()) { +- try self.addIncludeDir("/usr/include"); +- try self.addIncludeDir("/usr/local/include"); - -- try self.addFrameworkDir("/Library/Frameworks"); -- try self.addFrameworkDir("/System/Library/Frameworks"); +- try self.addLibDir("/usr/lib"); +- try self.addLibDir("/usr/local/lib"); - -- return self; -+ if (process.getEnvVarOwned(allocator, "LIBRARY_PATH")) |library_path| { -+ defer allocator.free(library_path); -+ var it = mem.tokenize(library_path, ":"); -+ while (true) { -+ const dir = it.next() orelse break; -+ try self.addLibDir(dir); -+ } -+ } else |err| switch (err) { -+ error.InvalidUtf8 => {}, -+ error.EnvironmentVariableNotFound => {}, -+ error.OutOfMemory => |e| return e, - } - -- if (native_target.os.tag != .windows) { -- const triple = try native_target.linuxTriple(allocator); -- const qual = native_target.cpu.arch.ptrBitWidth(); +- try self.addFrameworkDir("/Library/Frameworks"); +- try self.addFrameworkDir("/System/Library/Frameworks"); - -- // TODO: $ ld --verbose | grep SEARCH_DIR -- // the output contains some paths that end with lib64, maybe include them too? -- // TODO: what is the best possible order of things? -- // TODO: some of these are suspect and should only be added on some systems. audit needed. +- return self; ++ if (process.getEnvVarOwned(allocator, "LIBRARY_PATH")) |library_path| { ++ defer allocator.free(library_path); ++ var it = mem.tokenize(u8, library_path, ":"); ++ while (true) { ++ const dir = it.next() orelse break; ++ try self.addLibDir(dir); ++ } ++ } else |err| switch (err) { ++ error.InvalidUtf8 => {}, ++ error.EnvironmentVariableNotFound => {}, ++ error.OutOfMemory => |e| return e, + } + + if (comptime native_target.os.tag == .solaris) { +@@ -106,32 +75,17 @@ pub fn detect(allocator: Allocator, native_info: NativeTargetInfo) !NativePaths + return self; + } + +- if (native_target.os.tag != .windows) { +- const triple = try native_target.linuxTriple(allocator); +- const qual = native_target.cpu.arch.ptrBitWidth(); - -- try self.addIncludeDir("/usr/local/include"); -- try self.addLibDirFmt("/usr/local/lib{d}", .{qual}); -- try self.addLibDir("/usr/local/lib"); +- // TODO: $ ld --verbose | grep SEARCH_DIR +- // the output contains some paths that end with lib64, maybe include them too? +- // TODO: what is the best possible order of things? +- // TODO: some of these are suspect and should only be added on some systems. audit needed. - -- try self.addIncludeDirFmt("/usr/include/{s}", .{triple}); -- try self.addLibDirFmt("/usr/lib/{s}", .{triple}); +- try self.addIncludeDir("/usr/local/include"); +- try self.addLibDirFmt("/usr/local/lib{d}", .{qual}); +- try self.addLibDir("/usr/local/lib"); - -- try self.addIncludeDir("/usr/include"); -- try self.addLibDirFmt("/lib{d}", .{qual}); -- try self.addLibDir("/lib"); -- try self.addLibDirFmt("/usr/lib{d}", .{qual}); -- try self.addLibDir("/usr/lib"); +- try self.addIncludeDirFmt("/usr/include/{s}", .{triple}); +- try self.addLibDirFmt("/usr/lib/{s}", .{triple}); - -- // example: on a 64-bit debian-based linux distro, with zlib installed from apt: -- // zlib.h is in /usr/include (added above) -- // libz.so.1 is in /lib/x86_64-linux-gnu (added here) -- try self.addLibDirFmt("/lib/{s}", .{triple}); -+ if (process.getEnvVarOwned(allocator, "DYLD_FRAMEWORK_PATH")) |dyld_framework_path| { -+ defer allocator.free(dyld_framework_path); -+ var it = mem.tokenize(dyld_framework_path, ":"); -+ while (true) { -+ const dir = it.next() orelse break; -+ try self.addFrameworkDir(dir); -+ } -+ } else |err| switch (err) { -+ error.InvalidUtf8 => {}, -+ error.EnvironmentVariableNotFound => {}, -+ error.OutOfMemory => |e| return e, - } - - return self; +- try self.addIncludeDir("/usr/include"); +- try self.addLibDirFmt("/lib{d}", .{qual}); +- try self.addLibDir("/lib"); +- try self.addLibDirFmt("/usr/lib{d}", .{qual}); +- try self.addLibDir("/usr/lib"); +- +- // example: on a 64-bit debian-based linux distro, with zlib installed from apt: +- // zlib.h is in /usr/include (added above) +- // libz.so.1 is in /lib/x86_64-linux-gnu (added here) +- try self.addLibDirFmt("/lib/{s}", .{triple}); ++ if (process.getEnvVarOwned(allocator, "DYLD_FRAMEWORK_PATH")) |dyld_framework_path| { ++ defer allocator.free(dyld_framework_path); ++ var it = mem.tokenize(u8, dyld_framework_path, ":"); ++ while (true) { ++ const dir = it.next() orelse break; ++ try self.addFrameworkDir(dir); ++ } ++ } else |err| switch (err) { ++ error.InvalidUtf8 => {}, ++ error.EnvironmentVariableNotFound => {}, ++ error.OutOfMemory => |e| return e, + } + + return self; diff --git a/gnu/packages/zig.scm b/gnu/packages/zig.scm index 9cd869389b..b3de72226b 100644 --- a/gnu/packages/zig.scm +++ b/gnu/packages/zig.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Liliana Marie Prikler ;;; Copyright © 2021 Sarah Morgensen +;;; Copyright © 2021 Calum Irwin ;;; ;;; This file is part of GNU Guix. ;;; @@ -28,7 +29,7 @@ (define-module (gnu packages zig) (define-public zig (package (name "zig") - (version "0.8.1") + (version "0.9.0") (source (origin (method git-fetch) @@ -37,18 +38,18 @@ (define-public zig (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "147qx7xgj0r353wh5ragzn6kmm1vrf31i8038z3zqwjnqqgqxi6c")) + (base32 "1zdz5s434c48z3y0c8l9wm2z1gxa7yyzd53zmr68lwj6mcl7by8x")) (patches (search-patches "zig-disable-libc-note-test.patch" "zig-use-system-paths.patch")))) (build-system cmake-build-system) (inputs - (list clang-12 ; Clang propagates llvm. - lld-12)) + (list clang-13 ; Clang propagates llvm. + lld)) ;; Zig compiles fine with GCC, but also needs native LLVM libraries. (native-inputs - (list llvm-12)) + (list llvm-13)) (arguments `(#:configure-flags (list ,@(if (%current-target-system) -- 2.34.1 From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 18 14:32:34 2022 Received: (at 53350) by debbugs.gnu.org; 18 Jan 2022 19:32:34 +0000 Received: from localhost ([127.0.0.1]:51761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n9uDZ-0002mm-TU for submit@debbugs.gnu.org; Tue, 18 Jan 2022 14:32:34 -0500 Received: from mail-yb1-f173.google.com ([209.85.219.173]:42902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n9uDY-0002mY-5E for 53350@debbugs.gnu.org; Tue, 18 Jan 2022 14:32:32 -0500 Received: by mail-yb1-f173.google.com with SMTP id m6so6439ybc.9 for <53350@debbugs.gnu.org>; Tue, 18 Jan 2022 11:32:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=0tZWZ8otOUppPWjhfk3rxFY9EYJ/s2YNlrufetFuV6o=; b=UCDWVR3KbMypgyFlbbq6g4d1nsBNpVEWjcjBj+1d4bxpQPNr47vpWKjrfAPFjEMGtv RdRzG8dXPlLXoey5vtIiz8dK8EKE2ZJpEuzBqlDkIejjTLROWCTkUNb7T7hTtgWPm7o3 93FOj56Bvfx4Ts4fb4a6GRE0RjQqDlRxsXqlsSRNvz41r7wu87AKnS+ZegBbLzSC+mJ8 pUkNrVa44OVG1n5kfz9P8uSvZ2PbpBKsLyGxsHTqwG2tQuilduoTH06WiduLo/JG8jXv 9tAvUUZCUf3vUeSKtlBVsTzD7bdjjPgwG8VXkjph8luRbMZqtvdBev2zDm/rZyvKueJ0 Yh8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=0tZWZ8otOUppPWjhfk3rxFY9EYJ/s2YNlrufetFuV6o=; b=YrdY14SkHcA6soiNyAhECUTc/2rYbQYDhrz0I5RR1VKWA9vyEi+aZYiGTDQCCix3tG fnI3h021zxUi6YRLbaVPcnNA2MNfuUwQvXw0x0X+bIT5XZqVFg/RzdKLsLg6Fka1NOpu QS2gbGAZyr/lHeNBpEvr0M//oJ+4RfYy9grJHdtqTEZRI9MpakDpQGqd7InBl3pu+hWw wJmhFZeutV7UmmVLrq8Tvd93cWlbmSVwvZ6Uu0pP2c/lU4BzLzsF+PzbkKdfLoG/pDIC tbGggn2de5PlNgiTQliuOhPj4yAqo3KvguoC++mBFnr+Krj0cYjYF4KbONUwAHmlp3Oj VoBw== X-Gm-Message-State: AOAM530Aw+RMwRypMdnzV+RLxP/IOgtt3uO7hTfq08ZyE2czRMPgtiZJ +CvXCYYtWE1kJ5q88D7X4iHr82JS7Kzi2RQbHMb0jIyM2KU= X-Google-Smtp-Source: ABdhPJxLrDdns+p1BH9FFTMQ8yiTnmgtp3yrflczEjRUP8ap758dj4lyUI4iXDb2g+aScSnmsAMcGWu2GLFfLqrRTBY= X-Received: by 2002:a5b:c5:: with SMTP id d5mr20406371ybp.674.1642534346457; Tue, 18 Jan 2022 11:32:26 -0800 (PST) MIME-Version: 1.0 From: Calum Irwin Date: Wed, 19 Jan 2022 08:32:14 +0000 Message-ID: Subject: breaking change To: 53350@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 2.7 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: By the way, the upgrade from 0.8 to 0.9 includes breaking changes in the core lib. I figured this isn't an issue since zig isn't used to build any other packages and it's still a pre-1.0 language. Content analysis details: (2.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (calumirwin1[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (calumirwin1[at]gmail.com) 2.5 DATE_IN_FUTURE_12_24 Date: is 12 to 24 hours after Received: date -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.219.173 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.219.173 listed in wl.mailspike.net] X-Debbugs-Envelope-To: 53350 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.7 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: By the way, the upgrade from 0.8 to 0.9 includes breaking changes in the core lib. I figured this isn't an issue since zig isn't used to build any other packages and it's still a pre-1.0 language. Content analysis details: (1.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.219.173 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.219.173 listed in list.dnswl.org] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (calumirwin1[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (calumirwin1[at]gmail.com) 2.5 DATE_IN_FUTURE_12_24 Date: is 12 to 24 hours after Received: date -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager By the way, the upgrade from 0.8 to 0.9 includes breaking changes in the core lib. I figured this isn't an issue since zig isn't used to build any other packages and it's still a pre-1.0 language. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 20 01:49:39 2022 Received: (at 53350) by debbugs.gnu.org; 20 Jan 2022 06:49:39 +0000 Received: from localhost ([127.0.0.1]:56104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nARGM-0003e4-Kj for submit@debbugs.gnu.org; Thu, 20 Jan 2022 01:49:39 -0500 Received: from mout01.posteo.de ([185.67.36.65]:54407) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nARGK-0003dq-0S for 53350@debbugs.gnu.org; Thu, 20 Jan 2022 01:49:37 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id DF81E240028 for <53350@debbugs.gnu.org>; Thu, 20 Jan 2022 07:49:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1642661369; bh=vlYkEzTrGrftitCNVq/JF5rcF45/GFvhM8j6l/EZt4U=; h=From:To:Cc:Subject:Date:From; b=rp+VCYTpDU4tRIWfkJZrOAdq9wZaXMr9p1at5xZHHl5fNg+wJJvX7iCHB0030Pnki vm0t+1gv99kBIGDviFy47sAme4FM1HxX3c2WV8AeGVbTUja4h3VH8cTC7818OGTn5K Sw97nyPvN/O5z1svpLbXhWMIFhpv4Y/C1h6ymoOkkjiX/EXiKlKqOpghFxYvDePGDW 2oOujya8fe4hToomOpbttspeUXGhAeKtNsp9vo1yBZY2GovMM56xxxpbK0puByD101 7CyoHQSE9a97MNnYpyGLz1ANscJ3VL3PsvefkxkHzy0GM2PnM2I+NP095RgaxQC/lS KEH2O6TWgyqWQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4JfY5h4qQsz6tmG; Thu, 20 Jan 2022 07:49:28 +0100 (CET) References: <20220119081125.2487-1-calumirwin1@gmail.com> From: pukkamustard To: Calum Irwin Subject: Re: [bug#53350] [PATCH] gnu: zig: Update to 0.9.0 Date: Thu, 20 Jan 2022 06:45:38 +0000 In-reply-to: <20220119081125.2487-1-calumirwin1@gmail.com> Message-ID: <86h79yucjs.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 53350 Cc: 53350@debbugs.gnu.org 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: -3.3 (---) Hi, I can't comment on the changes to the *.patch changes but I can confirm that it builds and seems to be working fine. Thanks! -pukkamustard Calum Irwin writes: > * gnu/packages/patches/zig-disable-libc-note-test.patch: Move patch chang= es to new file. > * gnu/packages/patches/zig-use-system-paths.patch: Update line numbers. > * gnu/packages/zig.scm: Update to 0.9.0 > --- > .../patches/zig-disable-libc-note-test.patch | 32 +-- > .../patches/zig-use-system-paths.patch | 261 +++++++++--------- > gnu/packages/zig.scm | 11 +- > 3 files changed, 152 insertions(+), 152 deletions(-) > > diff --git a/gnu/packages/patches/zig-disable-libc-note-test.patch b/gnu/= packages/patches/zig-disable-libc-note-test.patch > index 4d76139efb..b2c57cb571 100644 > --- a/gnu/packages/patches/zig-disable-libc-note-test.patch > +++ b/gnu/packages/patches/zig-disable-libc-note-test.patch > @@ -1,14 +1,12 @@ > -This test fails with "error.CompilationIncorrectlySucceeded". > - > diff --git a/test/compile_errors.zig b/test/compile_errors.zig > -index fd1255c..20d5548 100644 > +index b1eaa0302..621f9db0a 100644 > --- a/test/compile_errors.zig > +++ b/test/compile_errors.zig > -@@ -2751,15 +2751,15 @@ pub fn addCases(cases: *tests.CompileErrorContex= t) void { > +@@ -2943,15 +2943,15 @@ pub fn addCases(ctx: *TestContext) !void { > "tmp.zig:3:5: error: dependency on libc must be explicitly = specified in the build command", > }); > - > -- cases.addTest("libc headers note", > +=20 > +- ctx.testErrStage1("libc headers note", > - \\const c =3D @cImport(@cInclude("stdio.h")); > - \\export fn entry() void { > - \\ _ =3D c.printf("hello, world!\n"); > @@ -17,15 +15,15 @@ index fd1255c..20d5548 100644 > - "tmp.zig:1:11: error: C import failed", > - "tmp.zig:1:11: note: libc headers not available; compilatio= n does not link against libc", > - }); > -+// cases.addTest("libc headers note", > -+// \\const c =3D @cImport(@cInclude("stdio.h")); > -+// \\export fn entry() void { > -+// \\ _ =3D c.printf("hello, world!\n"); > -+// \\} > -+// , &[_][]const u8{ > -+// "tmp.zig:1:11: error: C import failed", > -+// "tmp.zig:1:11: note: libc headers not available; compilat= ion does not link against libc", > -+// }); > ++ // ctx.testErrStage1("libc headers note", > ++ // \\const c =3D @cImport(@cInclude("stdio.h")); > ++ // \\export fn entry() void { > ++ // \\ _ =3D c.printf("hello, world!\n"); > ++ // \\} > ++ // , &[_][]const u8{ > ++ // "tmp.zig:1:11: error: C import failed", > ++ // "tmp.zig:1:11: note: libc headers not available; compila= tion does not link against libc", > ++ // }); > } > - > - cases.addTest("comptime vector overflow shows the index", > +=20 > + ctx.testErrStage1("comptime vector overflow shows the index", > diff --git a/gnu/packages/patches/zig-use-system-paths.patch b/gnu/packag= es/patches/zig-use-system-paths.patch > index 33b7da1e0d..0a3cbb0e92 100644 > --- a/gnu/packages/patches/zig-use-system-paths.patch > +++ b/gnu/packages/patches/zig-use-system-paths.patch > @@ -1,143 +1,144 @@ > -This patch replaces the OS-specific detection mechanism by one that sole= ly > -relies on environment variables. This has the benefit that said environ= ment > -variables can be used as search paths in Guix. > - > -Index: zig-0.8.1/lib/std/zig/system.zig > -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > ---- zig-0.8.1.orig/lib/std/zig/system.zig > -+++ zig-0.8.1/lib/std/zig/system.zig > -@@ -39,101 +39,57 @@ pub const NativePaths =3D struct { > - }; > - errdefer self.deinit(); > - > -- var is_nix =3D false; > -- if (process.getEnvVarOwned(allocator, "NIX_CFLAGS_COMPILE")) |n= ix_cflags_compile| { > -- defer allocator.free(nix_cflags_compile); > +diff --git a/lib/std/zig/system/NativePaths.zig b/lib/std/zig/system/Nat= ivePaths.zig > +index 8e3e46e48..1ed9d3206 100644 > +--- a/lib/std/zig/system/NativePaths.zig > ++++ b/lib/std/zig/system/NativePaths.zig > +@@ -26,73 +26,42 @@ pub fn detect(allocator: Allocator, native_info: Nat= iveTargetInfo) !NativePaths > + }; > + errdefer self.deinit(); > +=20 > +- var is_nix =3D false; > +- if (process.getEnvVarOwned(allocator, "NIX_CFLAGS_COMPILE")) |nix_c= flags_compile| { > +- defer allocator.free(nix_cflags_compile); > - > -- is_nix =3D true; > -- var it =3D mem.tokenize(nix_cflags_compile, " "); > -+ // TODO: Support cross-compile paths? > -+ if (process.getEnvVarOwned(allocator, "C_INCLUDE_PATH")) |c_inc= lude_path| { > -+ defer allocator.free(c_include_path); > -+ var it =3D mem.tokenize(c_include_path, ":"); > - while (true) { > -- const word =3D it.next() orelse break; > -- if (mem.eql(u8, word, "-isystem")) { > -- const include_path =3D it.next() orelse { > -- try self.addWarning("Expected argument after -i= system in NIX_CFLAGS_COMPILE"); > -- break; > -- }; > -- try self.addIncludeDir(include_path); > -- } else { > -- if (mem.startsWith(u8, word, "-frandom-seed=3D")) { > -- continue; > -- } > -- try self.addWarningFmt("Unrecognized C flag from NI= X_CFLAGS_COMPILE: {s}", .{word}); > +- is_nix =3D true; > +- var it =3D mem.tokenize(u8, nix_cflags_compile, " "); > ++ // TODO: Support cross-compile paths? > ++ if (process.getEnvVarOwned(allocator, "C_INCLUDE_PATH")) |c_include= _path| { > ++ defer allocator.free(c_include_path); > ++ var it =3D mem.tokenize(u8, c_include_path, ":"); > + while (true) { > +- const word =3D it.next() orelse break; > +- if (mem.eql(u8, word, "-isystem")) { > +- const include_path =3D it.next() orelse { > +- try self.addWarning("Expected argument after -isyst= em in NIX_CFLAGS_COMPILE"); > +- break; > +- }; > +- try self.addIncludeDir(include_path); > +- } else { > +- if (mem.startsWith(u8, word, "-frandom-seed=3D")) { > +- continue; > - } > -+ const dir =3D it.next() orelse break; > -+ try self.addIncludeDir(dir); > - } > - } else |err| switch (err) { > - error.InvalidUtf8 =3D> {}, > - error.EnvironmentVariableNotFound =3D> {}, > - error.OutOfMemory =3D> |e| return e, > +- try self.addWarningFmt("Unrecognized C flag from NIX_CF= LAGS_COMPILE: {s}", .{word}); > +- } > ++ const dir =3D it.next() orelse break; > ++ try self.addIncludeDir(dir); > } > -- if (process.getEnvVarOwned(allocator, "NIX_LDFLAGS")) |nix_ldfl= ags| { > -- defer allocator.free(nix_ldflags); > - > -- is_nix =3D true; > -- var it =3D mem.tokenize(nix_ldflags, " "); > -+ if (process.getEnvVarOwned(allocator, "CPLUS_INCLUDE_PATH")) |c= plus_include_path| { > -+ defer allocator.free(cplus_include_path); > -+ var it =3D mem.tokenize(cplus_include_path, ":"); > - while (true) { > -- const word =3D it.next() orelse break; > -- if (mem.eql(u8, word, "-rpath")) { > -- const rpath =3D it.next() orelse { > -- try self.addWarning("Expected argument after -r= path in NIX_LDFLAGS"); > -- break; > -- }; > -- try self.addRPath(rpath); > -- } else if (word.len > 2 and word[0] =3D=3D '-' and word= [1] =3D=3D 'L') { > -- const lib_path =3D word[2..]; > -- try self.addLibDir(lib_path); > -- } else { > -- try self.addWarningFmt("Unrecognized C flag from NI= X_LDFLAGS: {s}", .{word}); > + } else |err| switch (err) { > + error.InvalidUtf8 =3D> {}, > + error.EnvironmentVariableNotFound =3D> {}, > + error.OutOfMemory =3D> |e| return e, > + } > +- if (process.getEnvVarOwned(allocator, "NIX_LDFLAGS")) |nix_ldflags|= { > +- defer allocator.free(nix_ldflags); > +- > +- is_nix =3D true; > +- var it =3D mem.tokenize(u8, nix_ldflags, " "); > ++ if (process.getEnvVarOwned(allocator, "CPLUS_INCLUDE_PATH")) |cplus= _include_path| { > ++ defer allocator.free(cplus_include_path); > ++ var it =3D mem.tokenize(u8, cplus_include_path, ":"); > + while (true) { > +- const word =3D it.next() orelse break; > +- if (mem.eql(u8, word, "-rpath")) { > +- const rpath =3D it.next() orelse { > +- try self.addWarning("Expected argument after -rpath= in NIX_LDFLAGS"); > - break; > -- } > -+ const dir =3D it.next() orelse break; > -+ try self.addIncludeDir(dir); > - } > - } else |err| switch (err) { > - error.InvalidUtf8 =3D> {}, > - error.EnvironmentVariableNotFound =3D> {}, > - error.OutOfMemory =3D> |e| return e, > +- }; > +- try self.addRPath(rpath); > +- } else if (word.len > 2 and word[0] =3D=3D '-' and word[1] = =3D=3D 'L') { > +- const lib_path =3D word[2..]; > +- try self.addLibDir(lib_path); > +- } else { > +- try self.addWarningFmt("Unrecognized C flag from NIX_LD= FLAGS: {s}", .{word}); > +- break; > +- } > ++ const dir =3D it.next() orelse break; > ++ try self.addIncludeDir(dir); > } > -- if (is_nix) { > -- return self; > -- } > + } else |err| switch (err) { > + error.InvalidUtf8 =3D> {}, > + error.EnvironmentVariableNotFound =3D> {}, > + error.OutOfMemory =3D> |e| return e, > + } > +- if (is_nix) { > +- return self; > +- } > - > -- if (comptime Target.current.isDarwin()) { > -- try self.addIncludeDir("/usr/include"); > -- try self.addIncludeDir("/usr/local/include"); > - > -- try self.addLibDir("/usr/lib"); > -- try self.addLibDir("/usr/local/lib"); > +- if (comptime builtin.target.isDarwin()) { > +- try self.addIncludeDir("/usr/include"); > +- try self.addIncludeDir("/usr/local/include"); > - > -- try self.addFrameworkDir("/Library/Frameworks"); > -- try self.addFrameworkDir("/System/Library/Frameworks"); > +- try self.addLibDir("/usr/lib"); > +- try self.addLibDir("/usr/local/lib"); > - > -- return self; > -+ if (process.getEnvVarOwned(allocator, "LIBRARY_PATH")) |library= _path| { > -+ defer allocator.free(library_path); > -+ var it =3D mem.tokenize(library_path, ":"); > -+ while (true) { > -+ const dir =3D it.next() orelse break; > -+ try self.addLibDir(dir); > -+ } > -+ } else |err| switch (err) { > -+ error.InvalidUtf8 =3D> {}, > -+ error.EnvironmentVariableNotFound =3D> {}, > -+ error.OutOfMemory =3D> |e| return e, > - } > - > -- if (native_target.os.tag !=3D .windows) { > -- const triple =3D try native_target.linuxTriple(allocator); > -- const qual =3D native_target.cpu.arch.ptrBitWidth(); > +- try self.addFrameworkDir("/Library/Frameworks"); > +- try self.addFrameworkDir("/System/Library/Frameworks"); > - > -- // TODO: $ ld --verbose | grep SEARCH_DIR > -- // the output contains some paths that end with lib64, mayb= e include them too? > -- // TODO: what is the best possible order of things? > -- // TODO: some of these are suspect and should only be added= on some systems. audit needed. > +- return self; > ++ if (process.getEnvVarOwned(allocator, "LIBRARY_PATH")) |library_pat= h| { > ++ defer allocator.free(library_path); > ++ var it =3D mem.tokenize(u8, library_path, ":"); > ++ while (true) { > ++ const dir =3D it.next() orelse break; > ++ try self.addLibDir(dir); > ++ } > ++ } else |err| switch (err) { > ++ error.InvalidUtf8 =3D> {}, > ++ error.EnvironmentVariableNotFound =3D> {}, > ++ error.OutOfMemory =3D> |e| return e, > + } > +=20 > + if (comptime native_target.os.tag =3D=3D .solaris) { > +@@ -106,32 +75,17 @@ pub fn detect(allocator: Allocator, native_info: Na= tiveTargetInfo) !NativePaths > + return self; > + } > +=20 > +- if (native_target.os.tag !=3D .windows) { > +- const triple =3D try native_target.linuxTriple(allocator); > +- const qual =3D native_target.cpu.arch.ptrBitWidth(); > - > -- try self.addIncludeDir("/usr/local/include"); > -- try self.addLibDirFmt("/usr/local/lib{d}", .{qual}); > -- try self.addLibDir("/usr/local/lib"); > +- // TODO: $ ld --verbose | grep SEARCH_DIR > +- // the output contains some paths that end with lib64, maybe in= clude them too? > +- // TODO: what is the best possible order of things? > +- // TODO: some of these are suspect and should only be added on = some systems. audit needed. > - > -- try self.addIncludeDirFmt("/usr/include/{s}", .{triple}); > -- try self.addLibDirFmt("/usr/lib/{s}", .{triple}); > +- try self.addIncludeDir("/usr/local/include"); > +- try self.addLibDirFmt("/usr/local/lib{d}", .{qual}); > +- try self.addLibDir("/usr/local/lib"); > - > -- try self.addIncludeDir("/usr/include"); > -- try self.addLibDirFmt("/lib{d}", .{qual}); > -- try self.addLibDir("/lib"); > -- try self.addLibDirFmt("/usr/lib{d}", .{qual}); > -- try self.addLibDir("/usr/lib"); > +- try self.addIncludeDirFmt("/usr/include/{s}", .{triple}); > +- try self.addLibDirFmt("/usr/lib/{s}", .{triple}); > - > -- // example: on a 64-bit debian-based linux distro, with zli= b installed from apt: > -- // zlib.h is in /usr/include (added above) > -- // libz.so.1 is in /lib/x86_64-linux-gnu (added here) > -- try self.addLibDirFmt("/lib/{s}", .{triple}); > -+ if (process.getEnvVarOwned(allocator, "DYLD_FRAMEWORK_PATH")) |= dyld_framework_path| { > -+ defer allocator.free(dyld_framework_path); > -+ var it =3D mem.tokenize(dyld_framework_path, ":"); > -+ while (true) { > -+ const dir =3D it.next() orelse break; > -+ try self.addFrameworkDir(dir); > -+ } > -+ } else |err| switch (err) { > -+ error.InvalidUtf8 =3D> {}, > -+ error.EnvironmentVariableNotFound =3D> {}, > -+ error.OutOfMemory =3D> |e| return e, > - } > - > - return self; > +- try self.addIncludeDir("/usr/include"); > +- try self.addLibDirFmt("/lib{d}", .{qual}); > +- try self.addLibDir("/lib"); > +- try self.addLibDirFmt("/usr/lib{d}", .{qual}); > +- try self.addLibDir("/usr/lib"); > +- > +- // example: on a 64-bit debian-based linux distro, with zlib in= stalled from apt: > +- // zlib.h is in /usr/include (added above) > +- // libz.so.1 is in /lib/x86_64-linux-gnu (added here) > +- try self.addLibDirFmt("/lib/{s}", .{triple}); > ++ if (process.getEnvVarOwned(allocator, "DYLD_FRAMEWORK_PATH")) |dyld= _framework_path| { > ++ defer allocator.free(dyld_framework_path); > ++ var it =3D mem.tokenize(u8, dyld_framework_path, ":"); > ++ while (true) { > ++ const dir =3D it.next() orelse break; > ++ try self.addFrameworkDir(dir); > ++ } > ++ } else |err| switch (err) { > ++ error.InvalidUtf8 =3D> {}, > ++ error.EnvironmentVariableNotFound =3D> {}, > ++ error.OutOfMemory =3D> |e| return e, > + } > +=20 > + return self; > diff --git a/gnu/packages/zig.scm b/gnu/packages/zig.scm > index 9cd869389b..b3de72226b 100644 > --- a/gnu/packages/zig.scm > +++ b/gnu/packages/zig.scm > @@ -1,6 +1,7 @@ > ;;; GNU Guix --- Functional package management for GNU > ;;; Copyright =C2=A9 2021 Liliana Marie Prikler > ;;; Copyright =C2=A9 2021 Sarah Morgensen > +;;; Copyright =C2=A9 2021 Calum Irwin > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -28,7 +29,7 @@ (define-module (gnu packages zig) > (define-public zig > (package > (name "zig") > - (version "0.8.1") > + (version "0.9.0") > (source > (origin > (method git-fetch) > @@ -37,18 +38,18 @@ (define-public zig > (commit version))) > (file-name (git-file-name name version)) > (sha256 > - (base32 "147qx7xgj0r353wh5ragzn6kmm1vrf31i8038z3zqwjnqqgqxi6c")) > + (base32 "1zdz5s434c48z3y0c8l9wm2z1gxa7yyzd53zmr68lwj6mcl7by8x")) > (patches > (search-patches > "zig-disable-libc-note-test.patch" > "zig-use-system-paths.patch")))) > (build-system cmake-build-system) > (inputs > - (list clang-12 ; Clang propagates llvm. > - lld-12)) > + (list clang-13 ; Clang propagates llvm. > + lld)) > ;; Zig compiles fine with GCC, but also needs native LLVM libraries. > (native-inputs > - (list llvm-12)) > + (list llvm-13)) > (arguments > `(#:configure-flags > (list ,@(if (%current-target-system) From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 24 04:33:04 2022 Received: (at 53350) by debbugs.gnu.org; 24 Jan 2022 09:33:04 +0000 Received: from localhost ([127.0.0.1]:42096 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBvii-00086C-C5 for submit@debbugs.gnu.org; Mon, 24 Jan 2022 04:33:04 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:42142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBvig-00085e-QM for 53350@debbugs.gnu.org; Mon, 24 Jan 2022 04:33:03 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id CD8D82FE; Mon, 24 Jan 2022 10:32:56 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9zvXZ26gNBw0; Mon, 24 Jan 2022 10:32:56 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 1D91B2F; Mon, 24 Jan 2022 10:32:56 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Calum Irwin Subject: Re: bug#53350: [PATCH] gnu: zig: Update to 0.9.0 References: <20220119081125.2487-1-calumirwin1@gmail.com> Date: Mon, 24 Jan 2022 10:32:55 +0100 In-Reply-To: <20220119081125.2487-1-calumirwin1@gmail.com> (Calum Irwin's message of "Wed, 19 Jan 2022 08:11:25 +0000") Message-ID: <87k0epwkag.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: CD8D82FE X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 53350 Cc: 53350@debbugs.gnu.org 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: -0.0 (/) Hi Calum, Calum Irwin skribis: > * gnu/packages/patches/zig-disable-libc-note-test.patch: Move patch chang= es to new file. > * gnu/packages/patches/zig-use-system-paths.patch: Update line numbers. > * gnu/packages/zig.scm: Update to 0.9.0 For some reason I can=E2=80=99t seem to apply it: --8<---------------cut here---------------start------------->8--- $ git am --show-current-patch=3Ddiff|patch -p1 patching file gnu/packages/patches/zig-disable-libc-note-test.patch Hunk #1 FAILED at 1. 1 out of 1 hunk FAILED -- saving rejects to file gnu/packages/patches/zig-d= isable-libc-note-test.patch.rej patching file gnu/packages/patches/zig-use-system-paths.patch patch: **** malformed patch at line 314: - return self; --8<---------------cut here---------------end--------------->8--- Could you take a look and resend? > --- a/gnu/packages/patches/zig-disable-libc-note-test.patch > +++ b/gnu/packages/patches/zig-disable-libc-note-test.patch > @@ -1,14 +1,12 @@ > -This test fails with "error.CompilationIncorrectlySucceeded". > - [...] > --- a/gnu/packages/patches/zig-use-system-paths.patch > +++ b/gnu/packages/patches/zig-use-system-paths.patch > @@ -1,143 +1,144 @@ > -This patch replaces the OS-specific detection mechanism by one that sole= ly > -relies on environment variables. This has the benefit that said environ= ment > -variables can be used as search paths in Guix. Also, please preserve those comments at the top of patches. Thanks in advance, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 24 09:03:33 2022 Received: (at 53350-done) by debbugs.gnu.org; 24 Jan 2022 14:03:33 +0000 Received: from localhost ([127.0.0.1]:42607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBzwT-0003Eq-6n for submit@debbugs.gnu.org; Mon, 24 Jan 2022 09:03:33 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:48674) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBzwP-0003Eb-4P for 53350-done@debbugs.gnu.org; Mon, 24 Jan 2022 09:03:31 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 77B062D9; Mon, 24 Jan 2022 15:03:22 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mqcFeBJXP3BS; Mon, 24 Jan 2022 15:03:21 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 140D22F; Mon, 24 Jan 2022 15:03:21 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Calum Irwin Subject: Re: bug#53350: [PATCH] gnu: zig: Update to 0.9.0 References: <20220119081125.2487-1-calumirwin1@gmail.com> <87k0epwkag.fsf@gnu.org> Date: Mon, 24 Jan 2022 15:03:20 +0100 In-Reply-To: <87k0epwkag.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Mon, 24 Jan 2022 10:32:55 +0100") Message-ID: <87ilu9ut7b.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 77B062D9 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 53350-done Cc: 53350-done@debbugs.gnu.org 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: -0.0 (/) Hello, Ludovic Court=C3=A8s skribis: > Hi Calum, > > Calum Irwin skribis: > >> * gnu/packages/patches/zig-disable-libc-note-test.patch: Move patch chan= ges to new file. >> * gnu/packages/patches/zig-use-system-paths.patch: Update line numbers. >> * gnu/packages/zig.scm: Update to 0.9.0 > > For some reason I can=E2=80=99t seem to apply it: Following Ricardo=E2=80=99s advice on IRC, I was able to apply it with: wget -qO- https://issues.guix.gnu.org/issue/53350/raw/0 \ | git am --patch-format=3Dmbox -s Not sure what=E2=80=99s wrong with my Gnus setup=E2=80=A6 > Also, please preserve those comments at the top of patches. I=E2=80=99ve restored them. Applied, thanks! Ludo=E2=80=99. From unknown Sun Jun 22 11:40:48 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 22 Feb 2022 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator