Re: Wrong type argument: package-input-rewriting/spec with inferior
On Tue, Mar 7, 2023 at 10:56 AM Ludovic Courtès wrote: > > But then again, I wonder why you end up rebuilding glibc. For example, > this would only rebuild LLVM and everything above: > > --8<---cut here---start->8--- > $ guix build clang --with-c-toolchain=llvm=gcc-toolchain@12 -n > substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% > substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... > 100.0% > substitute: updating substitutes from 'https://guix.bordeaux.inria.fr'... > 100.0% > The following derivations would be built: > /gnu/store/hrpn8c11x52b9yax44x0spya90q6c3z0-clang-15.0.7.drv > /gnu/store/f95nrszbdj72wbb22irvq230nm6ci07h-clang-runtime-15.0.7.drv > /gnu/store/kxbjlkv9yjyg149aj6zc0w0sdgpdwhzn-llvm-15.0.7.drv > 109.4 MB would be downloaded: > /gnu/store/66sfk0k8419xvl7kg7r631z9yf9cpy3f-llvm-project-15.0.7-checkout > > /gnu/store/i291yk8ka6hamma955zgr2jh6cn21ybf-clang-tools-extra-15.0.7.src.tar.xz > /gnu/store/gm15qsiiy3jz3ainp6nv082m7lh9nx4p-rhash-1.4.2 > /gnu/store/j65q3aw414010gdfvmsynwpzfb2jyyd3-cmake-minimal-3.21.4 > /gnu/store/1yq0yi6hjbfhw578c4973454iwxc248n-module-import-compiled > --8<---cut here---end--->8--- That build fails for me, and looks to be the same error as from last year [0][1] (not sure why the mail server threads are not updated across months). [0] https://lists.gnu.org/archive/html/guix-devel/2022-02/msg00359.html [1] https://lists.gnu.org/archive/html/guix-devel/2022-03/msg00043.html --8<---cut here---start->8--- $ guix describe Generation 4 Mar 06 2023 17:59:09 (current) guix a0d22c4 repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: a0d22c41989e529859c813fb64a78250bde76991 $ guix build clang --with-c-toolchain=llvm=gcc-toolchain@12 --verbosity=1 The following derivations will be built: /gnu/store/gwj14wybh4q4x8lpdy8cr57sp3v4x1nd-clang-15.0.7.drv /gnu/store/4f7cwjhfwnkqbmxmfpi7z3gvag9axidl-clang-runtime-15.0.7.drv /gnu/store/fl1m72g5zw1scrmvrhq0yrm44z70ia59-llvm-15.0.7.drv building /gnu/store/fl1m72g5zw1scrmvrhq0yrm44z70ia59-llvm-15.0.7.drv... building /gnu/store/4f7cwjhfwnkqbmxmfpi7z3gvag9axidl-clang-runtime-15.0.7.drv... building /gnu/store/gwj14wybh4q4x8lpdy8cr57sp3v4x1nd-clang-15.0.7.drv... \builder for `/gnu/store/gwj14wybh4q4x8lpdy8cr57sp3v4x1nd-clang-15.0.7.drv' failed with exit code 1 build of /gnu/store/gwj14wybh4q4x8lpdy8cr57sp3v4x1nd-clang-15.0.7.drv failed View build log at '/var/log/guix/drvs/gw/j14wybh4q4x8lpdy8cr57sp3v4x1nd-clang-15.0.7.drv.gz'. guix build: error: build of `/gnu/store/gwj14wybh4q4x8lpdy8cr57sp3v4x1nd-clang-15.0.7.drv' failed $ zcat /var/log/guix/drvs/gw/j14wybh4q4x8lpdy8cr57sp3v4x1nd-clang-15.0.7.drv.gz Backtrace: 14 (primitive-load "/gnu/store/vshmhk54i0jgg6xbglbiklw2d1c?") In ice-9/eval.scm: 214:21 13 (_ #f) 217:50 12 (lp (# ?)) 217:50 11 (lp (# ?)) 217:50 10 (lp (# ?)) 217:50 9 (lp (# ?)) 217:50 8 (lp (# ?)) 217:50 7 (lp (# ?)) 217:50 6 (lp (# ?)) 217:50 5 (lp (# ?)) 217:50 4 (lp (# ?)) 217:50 3 (lp (# ?)) 217:33 2 (lp (# ?)) 213:45 1 (_ #f) In unknown file: 0 (string-append "-DC_INCLUDE_DIRS=" #f "/include") ERROR: In procedure string-append: In procedure string-append: Wrong type (expecting string): #f --8<---cut here---end--->8---
Re: Wrong type argument: package-input-rewriting/spec with inferior
Hi Greg, Greg Hogan skribis: > Having failed a year ago to build the latest gcc and latest clang > together using "with-c-toolchain", Is there a bug report on this? I’m curious what might be wrong; ‘with-c-toolchain’ should be the tool of choice for this use case. [...] > On master I modify the manifest to create an inferior for glibc@2.35 > from core-updates, but receive the following error when attempting to > use the inferior as a package. A similar question went unanswered on > StackOverflow last year > (https://unix.stackexchange.com/questions/699148/how-to-use-an-inferior-when-input-rewriting-in-guix). [...] > ice-9/boot-9.scm:1685:16: In procedure raise-exception: > In procedure package-properties: Wrong type argument: > # As you found, package input rewriting doesn’t work with inferior packages. However it’s a case where it may be easier to provide a glibc@2.35 package on ‘master’ and to use that. But then again, I wonder why you end up rebuilding glibc. For example, this would only rebuild LLVM and everything above: --8<---cut here---start->8--- $ guix build clang --with-c-toolchain=llvm=gcc-toolchain@12 -n substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0% substitute: updating substitutes from 'https://guix.bordeaux.inria.fr'... 100.0% The following derivations would be built: /gnu/store/hrpn8c11x52b9yax44x0spya90q6c3z0-clang-15.0.7.drv /gnu/store/f95nrszbdj72wbb22irvq230nm6ci07h-clang-runtime-15.0.7.drv /gnu/store/kxbjlkv9yjyg149aj6zc0w0sdgpdwhzn-llvm-15.0.7.drv 109.4 MB would be downloaded: /gnu/store/66sfk0k8419xvl7kg7r631z9yf9cpy3f-llvm-project-15.0.7-checkout /gnu/store/i291yk8ka6hamma955zgr2jh6cn21ybf-clang-tools-extra-15.0.7.src.tar.xz /gnu/store/gm15qsiiy3jz3ainp6nv082m7lh9nx4p-rhash-1.4.2 /gnu/store/j65q3aw414010gdfvmsynwpzfb2jyyd3-cmake-minimal-3.21.4 /gnu/store/1yq0yi6hjbfhw578c4973454iwxc248n-module-import-compiled --8<---cut here---end--->8--- Maybe I’m overlooking something though. HTH, Ludo’.
Re: Wrong type argument: package-input-rewriting/spec with inferior
On Thu, Feb 23, 2023 at 1:30 PM Greg Hogan wrote: > > Having failed a year ago to build the latest gcc and latest clang > together using "with-c-toolchain", the following succeeds using > "package-input-rewriting/spec". > > My current issue is that glibc@2.33 on master fails to build with > gcc@12 ("cc1: all warnings being treated as errors") and my attempts > to pull a glibc@2.35 inferior from core-updates are failing. Based on the comment below from the logs it must not be currently possible to do this, so I will use gcc@11 and wait for the core-updates merge to use gcc@12. I have tried copying the glibc-2.35 definition from core-updates into my manifest but get an out of memory error, so it may be that rewriting glibc is too much even if possible using an inferior. Mesa from core-updates builds succesfully while using an inferior, but inferior packages can't be used with input-rewriting... https://logs.guix.gnu.org/guix/2022-11-04.log#211936
Wrong type argument: package-input-rewriting/spec with inferior
Having failed a year ago to build the latest gcc and latest clang together using "with-c-toolchain", the following succeeds using "package-input-rewriting/spec". My current issue is that glibc@2.33 on master fails to build with gcc@12 ("cc1: all warnings being treated as errors") and my attempts to pull a glibc@2.35 inferior from core-updates are failing. On core-updates I can containerize and use gcc-toolchain@12 and clang-toolchain@15 with the following manifest. Both gcc and clang successfully compile a test file. --8<---cut here---start->8--- $ cat core-updates.scm (use-modules (guix packages) (gnu packages gcc) (gnu packages llvm)) (define with-gcc12 (package-input-rewriting/spec `(("gcc" . ,(const gcc-12) (define clang-with-gcc-12 (with-gcc12 clang-toolchain-15)) (concatenate-manifests (list (specifications->manifest '("gcc-toolchain@12")) (packages->manifest `(,clang-with-gcc-12 --8<---cut here---end--->8--- On master I modify the manifest to create an inferior for glibc@2.35 from core-updates, but receive the following error when attempting to use the inferior as a package. A similar question went unanswered on StackOverflow last year (https://unix.stackexchange.com/questions/699148/how-to-use-an-inferior-when-input-rewriting-in-guix). --8<---cut here---start->8--- $ cat master.scm (use-modules (guix channels) (guix inferior) (guix packages) (gnu packages gcc) (gnu packages llvm)) (define channels (list (channel (name 'guix) (url "https://git.savannah.gnu.org/git/guix.git;) (branch "core-updates") (commit "3b57f25f55c52c97428106de285d3cf2746554dc" (define (from-core-updates name) (car (lookup-inferior-packages (inferior-for-channels channels) name))) (define glibc-from-core-updates (from-core-updates "glibc")) (define with-gcc12 (package-input-rewriting/spec `(("gcc" . ,(const gcc-12)) ("glibc" . ,(const glibc-from-core-updates) (define clang-with-gcc-12 (with-gcc12 clang-toolchain-15)) (concatenate-manifests (list (specifications->manifest '("gcc-toolchain@12")) (packages->manifest `(,clang-with-gcc-12 $ guix build -m master.scm Backtrace: In guix/scripts/build.scm: 670:16 19 (_ #) 659:24 18 (_ # …) In guix/packages.scm: 1351:17 17 (supported-package? # …) In guix/memoization.scm: 101:0 16 (_ # # …) In guix/packages.scm: 1329:37 15 (_) 1589:16 14 (package->bag _ _ _ #:graft? _) 1690:48 13 (thunk) 1485:25 12 (inputs _) In srfi/srfi-1.scm: 586:29 11 (map1 (("clang" #) …)) 586:29 10 (map1 (("ld-wrapper" #) …)) 586:29 9 (map1 (("binutils" #) …)) 586:29 8 (map1 (("libomp" #) …)) 586:17 7 (map1 (("libc" #) …)) In guix/packages.scm: 1442:20 6 (rewrite ("libc" #)) In guix/memoization.scm: 101:0 5 (_ # # …) In guix/packages.scm: 1459:22 4 (_) 1570:31 3 (loop #) In ice-9/boot-9.scm: 1685:16 2 (raise-exception _ #:continuable? _) 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure package-properties: Wrong type argument: # --8<---cut here---end--->8---