* Wrong type argument: package-input-rewriting/spec with inferior
@ 2023-02-23 18:30 Greg Hogan
2023-02-23 20:43 ` Greg Hogan
2023-03-07 15:56 ` Ludovic Courtès
0 siblings, 2 replies; 4+ messages in thread
From: Greg Hogan @ 2023-02-23 18:30 UTC (permalink / raw)
To: Guix Help
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 (_ #<package clang-toolchain@15.0.7 gnu/packages/llvm.s…>)
659:24 18 (_ #<package clang-toolchain@15.0.7 gnu/packages/llvm.…> …)
In guix/packages.scm:
1351:17 17 (supported-package? #<package clang-toolchain@15.0.7 g…> …)
In guix/memoization.scm:
101:0 16 (_ #<hash-table 7f5d81ec88a0 125/223> #<package clang-…> …)
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" #<package clang@15.0.7 gnu/package…>) …))
586:29 10 (map1 (("ld-wrapper" #<package ld-wrapper@0 gnu/pa…>) …))
586:29 9 (map1 (("binutils" #<package binutils@2.37 gnu/pac…>) …))
586:29 8 (map1 (("libomp" #<package libomp@15.0.7 gnu/packa…>) …))
586:17 7 (map1 (("libc" #<package glibc@2.33 gnu/packages/b…>) …))
In guix/packages.scm:
1442:20 6 (rewrite ("libc" #<package glibc@2.33 gnu/packages/ba…>))
In guix/memoization.scm:
101:0 5 (_ #<hash-table 7f5d937a6780 5/31> #<package glibc@2.3…> …)
In guix/packages.scm:
1459:22 4 (_)
1570:31 3 (loop #<inferior-package glibc@2.35 7f5d88e873c0>)
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:
#<inferior-package glibc@2.35 7f5d88e873c0>
--8<---------------cut here---------------end--------------->8---
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Wrong type argument: package-input-rewriting/spec with inferior
2023-02-23 18:30 Wrong type argument: package-input-rewriting/spec with inferior Greg Hogan
@ 2023-02-23 20:43 ` Greg Hogan
2023-03-07 15:56 ` Ludovic Courtès
1 sibling, 0 replies; 4+ messages in thread
From: Greg Hogan @ 2023-02-23 20:43 UTC (permalink / raw)
To: Guix Help
On Thu, Feb 23, 2023 at 1:30 PM Greg Hogan <code@greghogan.com> 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.
<silicius> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Wrong type argument: package-input-rewriting/spec with inferior
2023-02-23 18:30 Wrong type argument: package-input-rewriting/spec with inferior Greg Hogan
2023-02-23 20:43 ` Greg Hogan
@ 2023-03-07 15:56 ` Ludovic Courtès
2023-03-07 19:28 ` Greg Hogan
1 sibling, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2023-03-07 15:56 UTC (permalink / raw)
To: Greg Hogan; +Cc: Guix Help
Hi Greg,
Greg Hogan <code@greghogan.com> 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:
> #<inferior-package glibc@2.35 7f5d88e873c0>
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’.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Wrong type argument: package-input-rewriting/spec with inferior
2023-03-07 15:56 ` Ludovic Courtès
@ 2023-03-07 19:28 ` Greg Hogan
0 siblings, 0 replies; 4+ messages in thread
From: Greg Hogan @ 2023-03-07 19:28 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Guix Help
On Tue, Mar 7, 2023 at 10:56 AM Ludovic Courtès <ludo@gnu.org> 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 (#<procedure 7ffff42053e0 at ice-9/eval.scm:282:?> ?))
217:50 11 (lp (#<procedure 7ffff42053c0 at ice-9/eval.scm:282:?> ?))
217:50 10 (lp (#<procedure 7ffff4205360 at ice-9/eval.scm:649:?> ?))
217:50 9 (lp (#<procedure 7ffff4205340 at ice-9/eval.scm:282:?> ?))
217:50 8 (lp (#<procedure 7ffff42052e0 at ice-9/eval.scm:649:?> ?))
217:50 7 (lp (#<procedure 7ffff42052c0 at ice-9/eval.scm:282:?> ?))
217:50 6 (lp (#<procedure 7ffff42052a0 at ice-9/eval.scm:282:?> ?))
217:50 5 (lp (#<procedure 7ffff4205260 at ice-9/eval.scm:282:?> ?))
217:50 4 (lp (#<procedure 7ffff421efc0 at ice-9/eval.scm:649:?> ?))
217:50 3 (lp (#<procedure 7ffff421efa0 at ice-9/eval.scm:282:?> ?))
217:33 2 (lp (#<procedure 7ffff3ff3c00 at ice-9/eval.scm:212:?> ?))
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---
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-07 19:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-23 18:30 Wrong type argument: package-input-rewriting/spec with inferior Greg Hogan
2023-02-23 20:43 ` Greg Hogan
2023-03-07 15:56 ` Ludovic Courtès
2023-03-07 19:28 ` Greg Hogan
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).