Subject: [bug#58394] [PATCH]: gnu: libcxx: Update to 14.0.6.

From: Ludovic Courtès <[email-masked]>
Date: Sun, 23 Oct 2022 12:37:16 +0200

Hi,

Zhu Zihao <[email-masked]> skribis:

>>>From 41b6beb2ee5770f791984fb7411a69ba77544681 Mon Sep 17 00:00:00 2001
> From: Zhu Zihao <[email-masked]>
> Date: Fri, 7 Oct 2022 11:14:26 +0800
> Subject: [PATCH 1/2] gnu: libcxx: Use G-expressions.
>
> * gnu/packages/llvm.scm (libcxx)[arguments]: Use G-expressions.
> (libcxx-6)[arguments]: Use G-expressions.

[...]

>>>From b70e093e1ce01de0f607d70911e1539462c17a40 Mon Sep 17 00:00:00 2001
> From: Zhu Zihao <[email-masked]>
> Date: Sat, 8 Oct 2022 16:26:44 +0800
> Subject: [PATCH 2/2] gnu: libcxx: Update to 14.0.6.
>
> * gnu/packages/llvm.scm(libcxx)[source]: Use "llvm-monorepo".
> [arguments]<#:configure-flags>: Use clang & clang++, skip RPATH_CHANGE in CMake.
> <#:phases>: Add phase "enter-subdirectory".
> [native-inputs]: Add Python 3 for lit.
>
> (libcxx-6)[arguments]: Don't inherit from libcxx.

I tried it and noticed a first issue:

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index ad0cb088be..a6b6a3ce8f 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -1584,6 +1584,7 @@ (define-public libcxx-6
     (source
      (origin
        (inherit (package-source libcxx))
+       (method url-fetch)
        (uri (llvm-uri "libcxx" version))
        (sha256
         (base32

Then I tried to test with:

  ./pre-inst-env guix build libcxx@6 libcxxabi@6 libcxx irods-client-icommands

and hit the following failure (patches don’t apply):

--8<---------------cut here---------------start------------->8---
@ build-started /gnu/store/hxdgg65dx1xwgggg80kdj7iq9akv55k4-llvm-project-14.0.6-checkout.drv - x86_64-linux /var/log/guix/drvs/hx//dgg65dx1xwgggg80kdj7iq9akv55k4-llvm-project-14.0.6-checkout.drv.gz 18728
[…]
source is at 'llvm-project-14.0.6-checkout'
applying '/gnu/store/kpcav1kq3h7rbp1fx5y1ng60zkgh4cv7-clang-14.0-libc-search-path.patch'...
Backtrace:
           5 (primitive-load "/gnu/store/xyq3zyx8d952avv29d18s3dgxni…")
In ice-9/eval.scm:
    619:8  4 (_ #(#(#<directory (guile-user) 7fffeffcfc80> "llv…") #))
In ice-9/boot-9.scm:
    142:2  3 (dynamic-wind #<procedure 7fffeff6b7a0 at ice-9/eval.s…> …)
In ice-9/eval.scm:
    619:8  2 (_ #(#(#<directory (guile-user) 7fffeffcfc80>)))
In srfi/srfi-1.scm:
    634:9  1 (for-each #<procedure apply-patch (a)> ("/gnu/store/kp…"))
In guix/build/utils.scm:
    762:6  0 (invoke "/gnu/store/z39hnrwds1dgcbpfgj8dnv2cngjb2xbl-p…" …)

guix/build/utils.scm:762:6: In procedure invoke:
ERROR:
  1. &invoke-error:
      program: "/gnu/store/z39hnrwds1dgcbpfgj8dnv2cngjb2xbl-patch-2.7.6/bin/patch"
      arguments: ("--force" "--no-backup-if-mismatch" "-p1" "--input" "/gnu/store/kpcav1kq3h7rbp1fx5y1ng60zkgh4cv7-clang-14.0-libc-search-path.patch")
      exit-status: 1
      term-signal: #f
      stop-signal: #f
builder for `/gnu/store/hxdgg65dx1xwgggg80kdj7iq9akv55k4-llvm-project-14.0.6-checkout.drv' failed with exit code 1
@ build-failed /gnu/store/hxdgg65dx1xwgggg80kdj7iq9akv55k4-llvm-project-14.0.6-checkout.drv - 1 builder for `/gnu/store/hxdgg65dx1xwgggg80kdj7iq9akv55k4-llvm-project-14.0.6-checkout.drv' failed with exit code 1
--8<---------------cut here---------------end--------------->8---

Could you take a look?

Also please use ‘git send-email’ to send the patches; that will allow
https://qa.guix.gnu.org to pick’em up!

Thanks,
Ludo’.