Package: guix-patches;
Reported by: Zhu Zihao <all_but_last <at> 163.com>
Date: Sun, 9 Oct 2022 15:02:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 58394 in the body.
You can then email your comments to 58394 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
guix-patches <at> gnu.org
:bug#58394
; Package guix-patches
.
(Sun, 09 Oct 2022 15:02:02 GMT) Full text and rfc822 format available.Zhu Zihao <all_but_last <at> 163.com>
:guix-patches <at> gnu.org
.
(Sun, 09 Oct 2022 15:02:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Zhu Zihao <all_but_last <at> 163.com> To: guix-patches <guix-patches <at> gnu.org> Subject: [PATCH]: gnu: libcxx: Update to 14.0.6. Date: Sun, 09 Oct 2022 22:59:58 +0800
[Message part 1 (text/plain, inline)]
[signature.asc (application/pgp-signature, inline)]
[0001-gnu-libcxx-Use-G-expressions.patch (text/x-patch, inline)]
From 41b6beb2ee5770f791984fb7411a69ba77544681 Mon Sep 17 00:00:00 2001 From: Zhu Zihao <all_but_last <at> 163.com> 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. --- gnu/packages/llvm.scm | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 49eb25db1f..00918bfb90 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -25,6 +25,7 @@ ;;; Copyright © 2022 Greg Hogan <code <at> greghogan.com> ;;; Copyright © 2022 John Kehayias <john.kehayias <at> protonmail.com> ;;; Copyright © 2022 Clément Lassieur <clement <at> lassieur.org> +;;; Copyright © 2022 Zhu Zihao <all_but_last <at> 163.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -1540,22 +1541,23 @@ (define-public libcxx "0d2bj5i6mk4caq7skd5nsdmz8c2m5w5anximl5wz3x32p08zz089")))) (build-system cmake-build-system) (arguments - `(#:phases - (modify-phases (@ (guix build cmake-build-system) %standard-phases) - (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH - (lambda* (#:key inputs #:allow-other-keys) - (let ((gcc (assoc-ref inputs "gcc"))) - ;; Hide GCC's C++ headers so that they do not interfere with - ;; the ones we are attempting to build. - (setenv "CPLUS_INCLUDE_PATH" - (string-join (delete (string-append gcc "/include/c++") - (string-split (getenv "CPLUS_INCLUDE_PATH") - #\:)) - ":")) - (format #t - "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" - (getenv "CPLUS_INCLUDE_PATH")) - #t)))))) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH + (lambda* (#:key inputs #:allow-other-keys) + (let ((gcc (assoc-ref inputs "gcc"))) + ;; Hide GCC's C++ headers so that they do not interfere with + ;; the ones we are attempting to build. + (setenv "CPLUS_INCLUDE_PATH" + (string-join (delete (string-append gcc "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") + #\:)) + ":")) + (format #t + "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" + (getenv "CPLUS_INCLUDE_PATH")) + #t)))))) (native-inputs (list clang llvm)) (home-page "https://libcxx.llvm.org") @@ -1578,6 +1580,11 @@ (define-public libcxx-6 (sha256 (base32 "0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n")))) + (arguments + (substitute-keyword-arguments (package-arguments libcxx) + ((#:phases p) + #~(modify-phases #$p + (delete 'enter-subdirectory))))) (native-inputs (list clang-6 llvm-6)))) -- 2.37.3
[0002-gnu-libcxx-Update-to-14.0.6.patch (text/x-patch, inline)]
From b70e093e1ce01de0f607d70911e1539462c17a40 Mon Sep 17 00:00:00 2001 From: Zhu Zihao <all_but_last <at> 163.com> 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. --- gnu/packages/llvm.scm | 47 +++++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 00918bfb90..ad0cb088be 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -1531,19 +1531,27 @@ (define-public lldb (define-public libcxx (package (name "libcxx") - (version "9.0.1") - (source - (origin - (method url-fetch) - (uri (llvm-uri "libcxx" version)) - (sha256 - (base32 - "0d2bj5i6mk4caq7skd5nsdmz8c2m5w5anximl5wz3x32p08zz089")))) + (version "14.0.6") + (source (llvm-monorepo version)) (build-system cmake-build-system) (arguments (list + #:tests? #f + #:configure-flags + #~(list "-DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi" + "-DCMAKE_C_COMPILER=clang" + "-DCMAKE_CXX_COMPILER=clang++" + ;; libc++.so is actually a GNU ld style linker script, however, + ;; CMake still tries to fix the RUNPATH of it during the install + ;; step. This argument tells CMake to use the install directory + ;; as RUNPATH and don't attempt to patch it. + ;; See also: https://gitlab.kitware.com/cmake/cmake/-/issues/22963 + "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE") #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'enter-subdirectory + (lambda _ + (chdir "runtimes"))) (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH (lambda* (#:key inputs #:allow-other-keys) (let ((gcc (assoc-ref inputs "gcc"))) @@ -1559,7 +1567,7 @@ (define-public libcxx (getenv "CPLUS_INCLUDE_PATH")) #t)))))) (native-inputs - (list clang llvm)) + (list clang llvm python)) (home-page "https://libcxx.llvm.org") (synopsis "C++ standard library") (description @@ -1581,10 +1589,23 @@ (define-public libcxx-6 (base32 "0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n")))) (arguments - (substitute-keyword-arguments (package-arguments libcxx) - ((#:phases p) - #~(modify-phases #$p - (delete 'enter-subdirectory))))) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH + (lambda* (#:key inputs #:allow-other-keys) + (let ((gcc (assoc-ref inputs "gcc"))) + ;; Hide GCC's C++ headers so that they do not interfere with + ;; the ones we are attempting to build. + (setenv "CPLUS_INCLUDE_PATH" + (string-join (delete (string-append gcc "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") + #\:)) + ":")) + (format #t + "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" + (getenv "CPLUS_INCLUDE_PATH")) + #t)))))) (native-inputs (list clang-6 llvm-6)))) -- 2.37.3
[Message part 5 (text/plain, inline)]
-- Retrieve my PGP public key: gpg --recv-keys B3EBC086AB0EBC0F45E0B4D433DB374BCEE4D9DC Zihao
guix-patches <at> gnu.org
:bug#58394
; Package guix-patches
.
(Sun, 23 Oct 2022 10:38:01 GMT) Full text and rfc822 format available.Message #8 received at 58394 <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludo <at> gnu.org> To: Zhu Zihao <all_but_last <at> 163.com> Cc: 58394 <at> debbugs.gnu.org Subject: Re: bug#58394: [PATCH]: gnu: libcxx: Update to 14.0.6. Date: Sun, 23 Oct 2022 12:37:16 +0200
[Message part 1 (text/plain, inline)]
Hi, Zhu Zihao <all_but_last <at> 163.com> skribis: >>From 41b6beb2ee5770f791984fb7411a69ba77544681 Mon Sep 17 00:00:00 2001 > From: Zhu Zihao <all_but_last <at> 163.com> > 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 <all_but_last <at> 163.com> > 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:
[Message part 2 (text/x-patch, inline)]
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
[Message part 3 (text/plain, inline)]
Then I tried to test with: ./pre-inst-env guix build libcxx <at> 6 libcxxabi <at> 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’.
guix-patches <at> gnu.org
:bug#58394
; Package guix-patches
.
(Thu, 27 Oct 2022 08:35:02 GMT) Full text and rfc822 format available.Message #11 received at 58394 <at> debbugs.gnu.org (full text, mbox):
From: Zhu Zihao <all_but_last <at> 163.com> To: Ludovic Courtès <ludo <at> gnu.org> Cc: 58394 <at> debbugs.gnu.org, Zhu Zihao <all_but_last <at> 163.com> Subject: [PATCH 1/4] gnu: libcxx: Use G-expressions. Date: Thu, 27 Oct 2022 16:33:27 +0800
* gnu/packages/llvm.scm (libcxx)[arguments]: Use G-expressions. (libcxx-6)[arguments]: Use G-expressions. --- gnu/packages/llvm.scm | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 49eb25db1f..00918bfb90 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -25,6 +25,7 @@ ;;; Copyright © 2022 Greg Hogan <code <at> greghogan.com> ;;; Copyright © 2022 John Kehayias <john.kehayias <at> protonmail.com> ;;; Copyright © 2022 Clément Lassieur <clement <at> lassieur.org> +;;; Copyright © 2022 Zhu Zihao <all_but_last <at> 163.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -1540,22 +1541,23 @@ (define-public libcxx "0d2bj5i6mk4caq7skd5nsdmz8c2m5w5anximl5wz3x32p08zz089")))) (build-system cmake-build-system) (arguments - `(#:phases - (modify-phases (@ (guix build cmake-build-system) %standard-phases) - (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH - (lambda* (#:key inputs #:allow-other-keys) - (let ((gcc (assoc-ref inputs "gcc"))) - ;; Hide GCC's C++ headers so that they do not interfere with - ;; the ones we are attempting to build. - (setenv "CPLUS_INCLUDE_PATH" - (string-join (delete (string-append gcc "/include/c++") - (string-split (getenv "CPLUS_INCLUDE_PATH") - #\:)) - ":")) - (format #t - "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" - (getenv "CPLUS_INCLUDE_PATH")) - #t)))))) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH + (lambda* (#:key inputs #:allow-other-keys) + (let ((gcc (assoc-ref inputs "gcc"))) + ;; Hide GCC's C++ headers so that they do not interfere with + ;; the ones we are attempting to build. + (setenv "CPLUS_INCLUDE_PATH" + (string-join (delete (string-append gcc "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") + #\:)) + ":")) + (format #t + "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" + (getenv "CPLUS_INCLUDE_PATH")) + #t)))))) (native-inputs (list clang llvm)) (home-page "https://libcxx.llvm.org") @@ -1578,6 +1580,11 @@ (define-public libcxx-6 (sha256 (base32 "0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n")))) + (arguments + (substitute-keyword-arguments (package-arguments libcxx) + ((#:phases p) + #~(modify-phases #$p + (delete 'enter-subdirectory))))) (native-inputs (list clang-6 llvm-6)))) -- 2.38.0
guix-patches <at> gnu.org
:bug#58394
; Package guix-patches
.
(Thu, 27 Oct 2022 08:35:03 GMT) Full text and rfc822 format available.Message #14 received at 58394 <at> debbugs.gnu.org (full text, mbox):
From: Zhu Zihao <all_but_last <at> 163.com> To: Ludovic Courtès <ludo <at> gnu.org> Cc: 58394 <at> debbugs.gnu.org, Zhu Zihao <all_but_last <at> 163.com> Subject: [PATCH 4/4] gnu: libcxx+libcxxabi: Use G-expressions. Date: Thu, 27 Oct 2022 16:33:30 +0800
* gnu/packages/llvm.scm (libcxx+libcxxabi-6)[arguments]: Use G-expressions. <#:configure-flags>: Use "this-package-native-input". --- gnu/packages/llvm.scm | 44 ++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 17c51ea6bb..324149116b 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -1677,27 +1677,29 @@ (define-public libcxx+libcxxabi-6 (name "libcxx+libcxxabi") (version (package-version libcxx-6)) (arguments - `(#:configure-flags - (list "-DLIBCXX_CXX_ABI=libcxxabi" - (string-append "-DLIBCXX_CXX_ABI_INCLUDE_PATHS=" - (assoc-ref %build-inputs "libcxxabi") - "/include")) - #:phases - (modify-phases (@ (guix build cmake-build-system) %standard-phases) - (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH - (lambda* (#:key inputs #:allow-other-keys) - (let ((gcc (assoc-ref inputs "gcc"))) - ;; Hide GCC's C++ headers so that they do not interfere with - ;; the ones we are attempting to build. - (setenv "CPLUS_INCLUDE_PATH" - (string-join - (delete (string-append gcc "/include/c++") - (string-split (getenv "CPLUS_INCLUDE_PATH") - #\:)) - ":")) - (format #true - "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" - (getenv "CPLUS_INCLUDE_PATH")))))))) + (list + #:configure-flags + #~(list "-DLIBCXX_CXX_ABI=libcxxabi" + (string-append "-DLIBCXX_CXX_ABI_INCLUDE_PATHS=" + #$(this-package-native-input "libcxxabi") + "/include")) + #:phases + #~(modify-phases (@ (guix build cmake-build-system) %standard-phases) + (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH + (lambda* (#:key inputs #:allow-other-keys) + (let ((gcc (assoc-ref inputs "gcc"))) + ;; Hide GCC's C++ headers so that they do not interfere with + ;; the ones we are attempting to build. + (setenv "CPLUS_INCLUDE_PATH" + (string-join + (delete (string-append gcc "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") + #\:)) + ":")) + (format + #true + "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" + (getenv "CPLUS_INCLUDE_PATH")))))))) (native-inputs (list clang-6 llvm-6 libcxxabi-6)))) -- 2.38.0
guix-patches <at> gnu.org
:bug#58394
; Package guix-patches
.
(Thu, 27 Oct 2022 08:35:03 GMT) Full text and rfc822 format available.Message #17 received at 58394 <at> debbugs.gnu.org (full text, mbox):
From: Zhu Zihao <all_but_last <at> 163.com> To: Ludovic Courtès <ludo <at> gnu.org> Cc: 58394 <at> debbugs.gnu.org, Zhu Zihao <all_but_last <at> 163.com> Subject: [PATCH 3/4] gnu: libcxxabi: Use G-expressions. Date: Thu, 27 Oct 2022 16:33:29 +0800
* gnu/packages/llvm.scm (libcxxabi-6)[arguments]: Use G-expressions. <#:configure-flags>: Use "this-package-native-input". --- gnu/packages/llvm.scm | 69 +++++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 32 deletions(-) diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 405ff0b0d8..17c51ea6bb 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -1625,38 +1625,43 @@ (define-public libcxxabi-6 "0ki6796b5z08kh3a3rbysr5wwb2dkl6wal5dzd03i4li5xfkvx1g")))) (build-system cmake-build-system) (arguments - `(#:configure-flags - (list (string-append "-DLIBCXXABI_LIBCXX_INCLUDES=" - (assoc-ref %build-inputs "libcxx") - "/include") - "-DCMAKE_C_COMPILER=clang" - "-DCMAKE_CXX_COMPILER=clang++") - #:phases - (modify-phases (@ (guix build cmake-build-system) %standard-phases) - (add-after 'unpack 'chdir - (lambda _ (chdir "libcxxabi"))) - (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH - (lambda* (#:key inputs #:allow-other-keys) - (let ((gcc (assoc-ref inputs "gcc"))) - ;; Hide GCC's C++ headers so that they do not interfere with - ;; the ones we are attempting to build. - (setenv "CPLUS_INCLUDE_PATH" - (string-join - (cons (string-append - (assoc-ref inputs "libcxx") "/include/c++/v1") - (delete (string-append gcc "/include/c++") - (string-split (getenv "CPLUS_INCLUDE_PATH") - #\:))) - ":")) - (format #true - "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" - (getenv "CPLUS_INCLUDE_PATH"))))) - (add-after 'install 'install-headers - (lambda* (#:key outputs #:allow-other-keys) - (let ((include-dir (string-append - (assoc-ref outputs "out") "/include"))) - (install-file "../libcxxabi/include/__cxxabi_config.h" include-dir) - (install-file "../libcxxabi/include/cxxabi.h" include-dir))))))) + (list + #:configure-flags + #~(list (string-append "-DLIBCXXABI_LIBCXX_INCLUDES=" + #$(this-package-native-input "libcxx") + "/include") + "-DCMAKE_C_COMPILER=clang" + "-DCMAKE_CXX_COMPILER=clang++") + #:phases + #~(modify-phases (@ (guix build cmake-build-system) %standard-phases) + (add-after 'unpack 'chdir + (lambda _ (chdir "libcxxabi"))) + (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH + (lambda* (#:key inputs #:allow-other-keys) + (let ((gcc (assoc-ref inputs "gcc"))) + ;; Hide GCC's C++ headers so that they do not interfere with + ;; the ones we are attempting to build. + (setenv "CPLUS_INCLUDE_PATH" + (string-join + (cons (string-append + (assoc-ref inputs "libcxx") "/include/c++/v1") + (delete (string-append gcc "/include/c++") + (string-split + (getenv "CPLUS_INCLUDE_PATH") + #\:))) + ":")) + (format + #true + "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" + (getenv "CPLUS_INCLUDE_PATH"))))) + (add-after 'install 'install-headers + (lambda* (#:key outputs #:allow-other-keys) + (let ((include-dir (string-append + (assoc-ref outputs "out") "/include"))) + (install-file "../libcxxabi/include/__cxxabi_config.h" + include-dir) + (install-file "../libcxxabi/include/cxxabi.h" + include-dir))))))) (native-inputs (list clang-6 llvm-6 libcxx-6)) (home-page "https://libcxxabi.llvm.org") -- 2.38.0
guix-patches <at> gnu.org
:bug#58394
; Package guix-patches
.
(Thu, 27 Oct 2022 08:35:03 GMT) Full text and rfc822 format available.Message #20 received at 58394 <at> debbugs.gnu.org (full text, mbox):
From: Zhu Zihao <all_but_last <at> 163.com> To: Ludovic Courtès <ludo <at> gnu.org> Cc: 58394 <at> debbugs.gnu.org, Zhu Zihao <all_but_last <at> 163.com> Subject: [PATCH 2/4] gnu: libcxx: Update to 14.0.6. Date: Thu, 27 Oct 2022 16:33:28 +0800
* 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. --- gnu/packages/llvm.scm | 81 +++++++++++++++++++++++++++---------------- 1 file changed, 51 insertions(+), 30 deletions(-) diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 00918bfb90..405ff0b0d8 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -1531,15 +1531,63 @@ (define-public lldb (define-public libcxx (package (name "libcxx") - (version "9.0.1") + (version "14.0.6") + (source (llvm-monorepo version)) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f + #:configure-flags + #~(list "-DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi" + "-DCMAKE_C_COMPILER=clang" + "-DCMAKE_CXX_COMPILER=clang++" + ;; libc++.so is actually a GNU ld style linker script, however, + ;; CMake still tries to fix the RUNPATH of it during the install + ;; step. This argument tells CMake to use the install directory + ;; as RUNPATH and don't attempt to patch it. + ;; See also: https://gitlab.kitware.com/cmake/cmake/-/issues/22963 + "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'enter-subdirectory + (lambda _ + (chdir "runtimes"))) + (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH + (lambda* (#:key inputs #:allow-other-keys) + (let ((gcc (assoc-ref inputs "gcc"))) + ;; Hide GCC's C++ headers so that they do not interfere with + ;; the ones we are attempting to build. + (setenv "CPLUS_INCLUDE_PATH" + (string-join (delete (string-append gcc "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") + #\:)) + ":")) + (format #t + "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" + (getenv "CPLUS_INCLUDE_PATH")) + #t)))))) + (native-inputs + (list clang llvm python)) + (home-page "https://libcxx.llvm.org") + (synopsis "C++ standard library") + (description + "This package provides an implementation of the C++ standard library for +use with Clang, targeting C++11, C++14 and above.") + (properties `((release-monitoring-url . ,%llvm-release-monitoring-url))) + (license license:expat))) + +;; Libcxx files specifically used by PySide2. +(define-public libcxx-6 + (package + (inherit libcxx) + (version (package-version llvm-6)) (source (origin (method url-fetch) (uri (llvm-uri "libcxx" version)) (sha256 (base32 - "0d2bj5i6mk4caq7skd5nsdmz8c2m5w5anximl5wz3x32p08zz089")))) - (build-system cmake-build-system) + "0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n")))) (arguments (list #:phases @@ -1558,33 +1606,6 @@ (define-public libcxx "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" (getenv "CPLUS_INCLUDE_PATH")) #t)))))) - (native-inputs - (list clang llvm)) - (home-page "https://libcxx.llvm.org") - (synopsis "C++ standard library") - (description - "This package provides an implementation of the C++ standard library for -use with Clang, targeting C++11, C++14 and above.") - (properties `((release-monitoring-url . ,%llvm-release-monitoring-url))) - (license license:expat))) - -;; Libcxx files specifically used by PySide2. -(define-public libcxx-6 - (package - (inherit libcxx) - (version (package-version llvm-6)) - (source - (origin - (inherit (package-source libcxx)) - (uri (llvm-uri "libcxx" version)) - (sha256 - (base32 - "0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n")))) - (arguments - (substitute-keyword-arguments (package-arguments libcxx) - ((#:phases p) - #~(modify-phases #$p - (delete 'enter-subdirectory))))) (native-inputs (list clang-6 llvm-6)))) -- 2.38.0
guix-patches <at> gnu.org
:bug#58394
; Package guix-patches
.
(Thu, 27 Oct 2022 08:38:02 GMT) Full text and rfc822 format available.Message #23 received at 58394 <at> debbugs.gnu.org (full text, mbox):
From: Zhu Zihao <all_but_last <at> 163.com> To: Ludovic Courtès <ludo <at> gnu.org> Cc: 58394 <at> debbugs.gnu.org Subject: Re: bug#58394: [PATCH]: gnu: libcxx: Update to 14.0.6. Date: Thu, 27 Oct 2022 16:36:09 +0800
[Message part 1 (text/plain, inline)]
I sent the new patches, please check it :). Ludovic Courtès <ludo <at> gnu.org> writes: > Also please use ‘git send-email’ to send the patches; that will allow > https://qa.guix.gnu.org to pick’em up! > > Thanks, > Ludo’. -- Retrieve my PGP public key: gpg --recv-keys B3EBC086AB0EBC0F45E0B4D433DB374BCEE4D9DC Zihao
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#58394
; Package guix-patches
.
(Wed, 02 Nov 2022 13:53:02 GMT) Full text and rfc822 format available.Message #26 received at 58394 <at> debbugs.gnu.org (full text, mbox):
From: Zhu Zihao <all_but_last <at> 163.com> To: Ludovic Courtès <ludo <at> gnu.org> Cc: 58394 <at> debbugs.gnu.org Subject: Re: bug#58394: [PATCH]: gnu: libcxx: Update to 14.0.6. Date: Wed, 02 Nov 2022 21:52:03 +0800
[Message part 1 (text/plain, inline)]
Any progress on this? Zhu Zihao <all_but_last <at> 163.com> writes: > [[PGP Signed Part:Undecided]] > > I sent the new patches, please check it :). > > Ludovic Courtès <ludo <at> gnu.org> writes: > >> Also please use ‘git send-email’ to send the patches; that will allow >> https://qa.guix.gnu.org to pick’em up! >> >> Thanks, >> Ludo’. -- Retrieve my PGP public key: gpg --recv-keys B3EBC086AB0EBC0F45E0B4D433DB374BCEE4D9DC Zihao
[signature.asc (application/pgp-signature, inline)]
Ludovic Courtès <ludo <at> gnu.org>
:Zhu Zihao <all_but_last <at> 163.com>
:Message #31 received at 58394-done <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludo <at> gnu.org> To: Zhu Zihao <all_but_last <at> 163.com> Cc: 58394-done <at> debbugs.gnu.org Subject: Re: [PATCH 1/4] gnu: libcxx: Use G-expressions. Date: Sun, 06 Nov 2022 00:38:11 +0100
Hi, Finally applied, thanks! a60dc46c2b gnu: libcxx+libcxxabi: Use G-expressions. 1bb3a3ea4e gnu: libcxxabi: Use G-expressions. 8501932f36 gnu: libcxx: Update to 14.0.6. 86af794215 gnu: libcxx: Use G-expressions. Ludo’.
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Sun, 04 Dec 2022 12:24:09 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.