all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Compiling a linux kernel from git
@ 2019-07-06 16:01 Christopher Lemmer Webber
  2019-07-06 22:21 ` Mark H Weaver
  2019-07-06 23:41 ` Tobias Geerinckx-Rice
  0 siblings, 2 replies; 7+ messages in thread
From: Christopher Lemmer Webber @ 2019-07-06 16:01 UTC (permalink / raw)
  To: help-guix

Hello,

Unfortunately my laptop was failing and I needed to pick up a new one
asap before a conference I leave for tomorrow morning, so I bought one
off the shelf from a retail store.  Also unfortunately, while the
hardware is supported in upstream linux, it isn't in any of the released
tarballs yet.  I thought I'd try to make a package derivative:

(define linux-next
  (package
   (inherit linux-libre)
   (name "linux-next")
   (version "22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12")
   (source
    (origin
     (method git-fetch)
     (uri (git-reference
           (url (string-append "https://git.kernel.org/pub/scm/linux/"
                               "kernel/git/next/linux-next.git"))
           (commit version)))
     (file-name (string-append "linux-next-" version "-checkout"))
     (sha256
      (base32
       "1f3fn2mcfa213vb0d40386533dy4nll9v9d2jc6bi7gd38z2rc18"))))))

Unfortunately an extra step seems to be necessary, or something.  It's
failing at the "make oldconfig" stage:


patch-shebang: ./tools/usb/usbip/autogen.sh: changing `/bin/sh' to `/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/sh'
patch-shebang: ./tools/usb/usbip/cleanup.sh: changing `/bin/sh' to `/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/sh'
patch-shebang: ./tools/usb/usbip/vudc/vudc_server_example.sh: changing `/bin/bash' to `/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/bash'
patch-shebang: ./tools/virtio/ringtest/run-on-all.sh: changing `/bin/sh' to `/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/sh'
patch-shebang: ./tools/vm/slabinfo-gnuplot.sh: changing `/bin/bash' to `/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/bash'
patch-shebang: ./usr/gen_initramfs_list.sh: changing `/bin/sh' to `/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/sh'
phase `patch-source-shebangs' succeeded after 4.8 seconds
starting phase `work-around-gcc-7-include-path-issue'
phase `work-around-gcc-7-include-path-issue' succeeded after 0.0 seconds
starting phase `configure'
`ARCH' set to `x86_64'
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
In file included from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/stdlib.h:394:0,
                 from scripts/kconfig/conf.c:9:
/gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/sys/types.h:42:18: error: conflicting types for 'loff_t'
 typedef __loff_t loff_t;
                  ^~~~~~
In file included from /gnu/store/3qbgfljvmyi12df4yiwjnlg7mwkc4z1y-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12-checkout/include/linux/limits.h:6:0,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/local_lim.h:38,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/posix1_lim.h:161,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/limits.h:183,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/limits.h:194,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/syslimits.h:7,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/limits.h:34,
                 from scripts/kconfig/conf.c:7:
/gnu/store/3qbgfljvmyi12df4yiwjnlg7mwkc4z1y-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12-checkout/include/linux/types.h:46:26: note: previous declaration of 'loff_t' was here
 typedef __kernel_loff_t  loff_t;
                          ^~~~~~
In file included from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/stdlib.h:394:0,
                 from scripts/kconfig/conf.c:9:
/gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/sys/types.h:59:17: error: conflicting types for 'dev_t'
 typedef __dev_t dev_t;
                 ^~~~~
In file included from /gnu/store/3qbgfljvmyi12df4yiwjnlg7mwkc4z1y-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12-checkout/include/linux/limits.h:6:0,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/local_lim.h:38,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/posix1_lim.h:161,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/limits.h:183,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/limits.h:194,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/syslimits.h:7,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/limits.h:34,
                 from scripts/kconfig/conf.c:7:
/gnu/store/3qbgfljvmyi12df4yiwjnlg7mwkc4z1y-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12-checkout/include/linux/types.h:16:25: note: previous declaration of 'dev_t' was here
 typedef __kernel_dev_t  dev_t;
                         ^~~~~
In file included from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/stdlib.h:394:0,
                 from scripts/kconfig/conf.c:9:
/gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/sys/types.h:74:19: error: conflicting types for 'nlink_t'
 typedef __nlink_t nlink_t;
                   ^~~~~~~
In file included from /gnu/store/3qbgfljvmyi12df4yiwjnlg7mwkc4z1y-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12-checkout/include/linux/limits.h:6:0,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/local_lim.h:38,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/posix1_lim.h:161,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/limits.h:183,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/limits.h:194,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/syslimits.h:7,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/limits.h:34,
                 from scripts/kconfig/conf.c:7:
/gnu/store/3qbgfljvmyi12df4yiwjnlg7mwkc4z1y-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12-checkout/include/linux/types.h:20:15: note: previous declaration of 'nlink_t' was here
 typedef u32   nlink_t;
               ^~~~~~~
In file included from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/sys/types.h:130:0,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/stdlib.h:394,
                 from scripts/kconfig/conf.c:9:
/gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/types/timer_t.h:7:19: error: conflicting types for 'timer_t'
 typedef __timer_t timer_t;
                   ^~~~~~~
In file included from /gnu/store/3qbgfljvmyi12df4yiwjnlg7mwkc4z1y-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12-checkout/include/linux/limits.h:6:0,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/local_lim.h:38,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/posix1_lim.h:161,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/limits.h:183,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/limits.h:194,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/syslimits.h:7,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/limits.h:34,
                 from scripts/kconfig/conf.c:7:
/gnu/store/3qbgfljvmyi12df4yiwjnlg7mwkc4z1y-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12-checkout/include/linux/types.h:26:26: note: previous declaration of 'timer_t' was here
 typedef __kernel_timer_t timer_t;
                          ^~~~~~~
In file included from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/sys/types.h:155:0,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/stdlib.h:394,
                 from scripts/kconfig/conf.c:9:
/gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/stdint-intn.h:27:19: error: conflicting types for 'int64_t'
 typedef __int64_t int64_t;
                   ^~~~~~~
In file included from /gnu/store/3qbgfljvmyi12df4yiwjnlg7mwkc4z1y-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12-checkout/include/linux/limits.h:6:0,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/local_lim.h:38,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/posix1_lim.h:161,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/limits.h:183,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/limits.h:194,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/syslimits.h:7,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/limits.h:34,
                 from scripts/kconfig/conf.c:7:
/gnu/store/3qbgfljvmyi12df4yiwjnlg7mwkc4z1y-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12-checkout/include/linux/types.h:114:15: note: previous declaration of 'int64_t' was here
 typedef s64   int64_t;
               ^~~~~~~
In file included from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/stdlib.h:394:0,
                 from scripts/kconfig/conf.c:9:
/gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/sys/types.h:180:1: error: conflicting types for 'u_int64_t'
 __u_intN_t (64, __DI__);
 ^
In file included from /gnu/store/3qbgfljvmyi12df4yiwjnlg7mwkc4z1y-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12-checkout/include/linux/limits.h:6:0,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/local_lim.h:38,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/posix1_lim.h:161,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/limits.h:183,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/limits.h:194,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/syslimits.h:7,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/limits.h:34,
                 from scripts/kconfig/conf.c:7:
/gnu/store/3qbgfljvmyi12df4yiwjnlg7mwkc4z1y-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12-checkout/include/linux/types.h:113:15: note: previous declaration of 'u_int64_t' was here
 typedef u64   u_int64_t;
               ^~~~~~~~~
In file included from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/sys/types.h:196:0,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/stdlib.h:394,
                 from scripts/kconfig/conf.c:9:
/gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/sys/select.h:70:5: error: conflicting types for 'fd_set'
   } fd_set;
     ^~~~~~
In file included from /gnu/store/3qbgfljvmyi12df4yiwjnlg7mwkc4z1y-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12-checkout/include/linux/limits.h:6:0,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/local_lim.h:38,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/posix1_lim.h:161,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/limits.h:183,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/limits.h:194,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/syslimits.h:7,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/limits.h:34,
                 from scripts/kconfig/conf.c:7:
/gnu/store/3qbgfljvmyi12df4yiwjnlg7mwkc4z1y-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12-checkout/include/linux/types.h:15:26: note: previous declaration of 'fd_set' was here
 typedef __kernel_fd_set  fd_set;
                          ^~~~~~
In file included from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/stdlib.h:394:0,
                 from scripts/kconfig/conf.c:9:
/gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/sys/types.h:209:20: error: conflicting types for 'blkcnt_t'
 typedef __blkcnt_t blkcnt_t;  /* Type to count number of disk blocks.  */
                    ^~~~~~~~
In file included from /gnu/store/3qbgfljvmyi12df4yiwjnlg7mwkc4z1y-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12-checkout/include/linux/limits.h:6:0,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/local_lim.h:38,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/posix1_lim.h:161,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/limits.h:183,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/limits.h:194,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/syslimits.h:7,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/limits.h:34,
                 from scripts/kconfig/conf.c:7:
/gnu/store/3qbgfljvmyi12df4yiwjnlg7mwkc4z1y-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12-checkout/include/linux/types.h:131:13: note: previous declaration of 'blkcnt_t' was here
 typedef u64 blkcnt_t;
             ^~~~~~~~
In file included from scripts/kconfig/expr.h:15:0,
                 from scripts/kconfig/lkc.h:9,
                 from scripts/kconfig/conf.c:18:
scripts/kconfig/list.h:24:8: error: redefinition of 'struct list_head'
 struct list_head {
        ^~~~~~~~~
In file included from /gnu/store/3qbgfljvmyi12df4yiwjnlg7mwkc4z1y-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12-checkout/include/linux/limits.h:6:0,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/local_lim.h:38,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/posix1_lim.h:161,
                 from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/limits.h:183,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/limits.h:194,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/syslimits.h:7,
                 from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/limits.h:34,
                 from scripts/kconfig/conf.c:7:
/gnu/store/3qbgfljvmyi12df4yiwjnlg7mwkc4z1y-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12-checkout/include/linux/types.h:181:8: note: originally defined here
 struct list_head {
        ^~~~~~~~~
make[1]: *** [scripts/Makefile.host:107: scripts/kconfig/conf.o] Error 1
make: *** [Makefile:560: oldconfig] Error 2
Backtrace:
           4 (primitive-load "/gnu/store/r9j8rs8cn7shjzl32v5irdqd375…")
In ice-9/eval.scm:
   191:35  3 (_ _)
In srfi/srfi-1.scm:
   863:16  2 (every1 #<procedure 86bb20 at /gnu/store/gfprsx2m62cvq…> …)
In /gnu/store/gfprsx2m62cvqbh7ysc9ay9slhijvmal-module-import/guix/build/gnu-build-system.scm:
   799:28  1 (_ _)
In /gnu/store/gfprsx2m62cvqbh7ysc9ay9slhijvmal-module-import/guix/build/utils.scm:
    616:6  0 (invoke _ . _)

/gnu/store/gfprsx2m62cvqbh7ysc9ay9slhijvmal-module-import/guix/build/utils.scm:616:6: In procedure invoke:
Throw to key `srfi-34' with args `(#<condition &invoke-error [program: "make" arguments: ("oldconfig") exit-status: 2 term-signal: #f stop-signal: #f] 869740>)'.
note: keeping build directory `/tmp/guix-build-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12.drv-0'
builder for `/gnu/store/k4ajm0q5nxfr9vxmni962pgk8vf4y2z8-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12.drv' failed with exit code 1
build of /gnu/store/k4ajm0q5nxfr9vxmni962pgk8vf4y2z8-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12.drv failed
View build log at '/var/log/guix/drvs/k4/ajm0q5nxfr9vxmni962pgk8vf4y2z8-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12.drv.bz2'.
guix system: error: build of `/gnu/store/k4ajm0q5nxfr9vxmni962pgk8vf4y2z8-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12.drv' failed


Anyone more familiar with the linux build process who can give me some
tips?  Especially since I board a plane very early tomorrow morning :)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Compiling a linux kernel from git
  2019-07-06 16:01 Compiling a linux kernel from git Christopher Lemmer Webber
@ 2019-07-06 22:21 ` Mark H Weaver
  2019-07-07  3:57   ` Mark H Weaver
  2019-07-06 23:41 ` Tobias Geerinckx-Rice
  1 sibling, 1 reply; 7+ messages in thread
From: Mark H Weaver @ 2019-07-06 22:21 UTC (permalink / raw)
  To: Christopher Lemmer Webber; +Cc: help-guix

Hi Chris,

Christopher Lemmer Webber <cwebber@dustycloud.org> writes:

> Unfortunately my laptop was failing and I needed to pick up a new one
> asap before a conference I leave for tomorrow morning, so I bought one
> off the shelf from a retail store.  Also unfortunately, while the
> hardware is supported in upstream linux, it isn't in any of the released
> tarballs yet.  I thought I'd try to make a package derivative:
>
> (define linux-next
>   (package
>    (inherit linux-libre)
>    (name "linux-next")
>    (version "22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12")
>    (source
>     (origin
>      (method git-fetch)
>      (uri (git-reference
>            (url (string-append "https://git.kernel.org/pub/scm/linux/"
>                                "kernel/git/next/linux-next.git"))
>            (commit version)))
>      (file-name (string-append "linux-next-" version "-checkout"))
>      (sha256
>       (base32
>        "1f3fn2mcfa213vb0d40386533dy4nll9v9d2jc6bi7gd38z2rc18"))))))
>
> Unfortunately an extra step seems to be necessary, or something.  It's
> failing at the "make oldconfig" stage:
>
>
> patch-shebang: ./tools/usb/usbip/autogen.sh: changing `/bin/sh' to `/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/sh'
> patch-shebang: ./tools/usb/usbip/cleanup.sh: changing `/bin/sh' to `/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/sh'
> patch-shebang: ./tools/usb/usbip/vudc/vudc_server_example.sh: changing `/bin/bash' to `/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/bash'
> patch-shebang: ./tools/virtio/ringtest/run-on-all.sh: changing `/bin/sh' to `/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/sh'
> patch-shebang: ./tools/vm/slabinfo-gnuplot.sh: changing `/bin/bash' to `/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/bash'
> patch-shebang: ./usr/gen_initramfs_list.sh: changing `/bin/sh' to `/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/sh'
> phase `patch-source-shebangs' succeeded after 4.8 seconds
> starting phase `work-around-gcc-7-include-path-issue'
> phase `work-around-gcc-7-include-path-issue' succeeded after 0.0 seconds
> starting phase `configure'
> `ARCH' set to `x86_64'
>   HOSTCC  scripts/basic/fixdep
>   HOSTCC  scripts/kconfig/conf.o
> In file included from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/stdlib.h:394:0,
>                  from scripts/kconfig/conf.c:9:
> /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/sys/types.h:42:18: error: conflicting types for 'loff_t'
>  typedef __loff_t loff_t;
>                   ^~~~~~
> In file included from /gnu/store/3qbgfljvmyi12df4yiwjnlg7mwkc4z1y-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12-checkout/include/linux/limits.h:6:0,
>                  from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/local_lim.h:38,
>                  from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/posix1_lim.h:161,
>                  from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/limits.h:183,
>                  from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/limits.h:194,
>                  from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/syslimits.h:7,
>                  from /gnu/store/rvv5rw5gcrpmbgnvhb60f7czk0m0h2qp-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include-fixed/limits.h:34,
>                  from scripts/kconfig/conf.c:7:
> /gnu/store/3qbgfljvmyi12df4yiwjnlg7mwkc4z1y-linux-next-22c45ec32b4a9fa8c48ef4f5bf9b189b307aae12-checkout/include/linux/types.h:46:26: note: previous declaration of 'loff_t' was here
>  typedef __kernel_loff_t  loff_t;
>                           ^~~~~~

My first guess is that '/gnu/store/…-linux-next-…-checkout/include'
should not be in the C include path while compiling that file, but that
it's getting added.  The difference might be due to the fact that the
'source' in this case is a directory instead of a tarball.  For now, I
would try packing the git checkout as a tarball, and then using that
tarball as your 'source'.

       Mark

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Compiling a linux kernel from git
  2019-07-06 16:01 Compiling a linux kernel from git Christopher Lemmer Webber
  2019-07-06 22:21 ` Mark H Weaver
@ 2019-07-06 23:41 ` Tobias Geerinckx-Rice
  2019-07-06 23:49   ` Tobias Geerinckx-Rice
  1 sibling, 1 reply; 7+ messages in thread
From: Tobias Geerinckx-Rice @ 2019-07-06 23:41 UTC (permalink / raw)
  To: help-guix, Christopher Lemmer Webber

[-- Attachment #1: Type: text/plain, Size: 947 bytes --]

Chris,
 
Christopher Lemmer Webber wrote: 
> Anyone more familiar with the linux build process who can give 
> me some tips?  Especially since I board a plane very early 
> tomorrow morning :) 

My own kernel package has nothing left in common with linux-libre, 
but it does build from git and has this phase + comment which I'd 
hoped
would never see the light of day:

  (add-before 'configure 'fix-CPATH 
    (lambda _ 
      ;; Temporary hack to remove -checkout/include which breaks 
      things.  ;; Why is this not necessary when building in a 
      ‘guix environment’ ;; and in the Guix linux-libre package? 
      Git-checkout-related?  (setenv "CPATH" (string-join 
                       (cdr (string-split (getenv "CPATH") #\:)) 
                       ":")) 
      #t))

I'd remove it to see what happens, but that would be tomorrow and 
you appear to be in something of a hurry. 

Good luck!

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Compiling a linux kernel from git
  2019-07-06 23:41 ` Tobias Geerinckx-Rice
@ 2019-07-06 23:49   ` Tobias Geerinckx-Rice
  0 siblings, 0 replies; 7+ messages in thread
From: Tobias Geerinckx-Rice @ 2019-07-06 23:49 UTC (permalink / raw)
  To: help-guix, Christopher Lemmer Webber

[-- Attachment #1: Type: text/plain, Size: 957 bytes --]

Tobias Geerinckx-Rice wrote:
>  (add-before 'configure 'fix-CPATH  (lambda _    ;; Temporary 
>  hack to
> remove -checkout/include which breaks    things.  ;; Why is this 
> not
> necessary when building in a    ‘guix environment’ ;; and in the 
> Guix
> linux-libre package?    Git-checkout-related?  (setenv "CPATH"
> (string-join                     (cdr (string-split (getenv 
> "CPATH")
> #\:))                     ":"))    #t))

Silly emacs, let's try that again:

  (add-before 'configure 'fix-CPATH
    (lambda _
      ;; Temporary hack to remove -checkout/include which breaks 
      things.
      ;; Why is this not necessary when building in a ‘guix 
      environment’
      ;; and in the Guix linux-libre package? 
      Git-checkout-related?
      (setenv "CPATH" (string-join
                       (cdr (string-split (getenv "CPATH") #\:))
                       ":"))
      #t))

Kind regards,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Compiling a linux kernel from git
  2019-07-06 22:21 ` Mark H Weaver
@ 2019-07-07  3:57   ` Mark H Weaver
  2019-07-07  7:00     ` Christopher Lemmer Webber
  0 siblings, 1 reply; 7+ messages in thread
From: Mark H Weaver @ 2019-07-07  3:57 UTC (permalink / raw)
  To: Christopher Lemmer Webber; +Cc: help-guix

Hi Chris,

I wrote earlier:
> My first guess is that '/gnu/store/…-linux-next-…-checkout/include'
> should not be in the C include path while compiling that file, but that
> it's getting added.  The difference might be due to the fact that the
> 'source' in this case is a directory instead of a tarball.

I see now what's happening more precisely.  Our gcc-7 package inherits
from gcc-6 'native-search-paths' for the CPATH variable.  Because of
this, the 'set-paths' phase in 'gnu-build-system' sets the CPATH to
include <NATIVE_INPUT>/include for all native inputs that are
directories with an 'include' subdirectory.

The 'source' is itself a native input.  When it's a tarball, it will not
be included, but when it's a source checkout, it _is_ included, although
it shouldn't be.

> For now, I would try packing the git checkout as a tarball, and then
> using that tarball as your 'source'.

I'm now fairly confident that this workaround would work.  Another
workaround would be to add another phase that removes the CPATH
component corresponding to 'source', as Tobias does.

      Mark

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Compiling a linux kernel from git
  2019-07-07  3:57   ` Mark H Weaver
@ 2019-07-07  7:00     ` Christopher Lemmer Webber
  2019-07-07 23:30       ` Mark H Weaver
  0 siblings, 1 reply; 7+ messages in thread
From: Christopher Lemmer Webber @ 2019-07-07  7:00 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: help-guix

Mark H Weaver writes:

> Hi Chris,
>
> I wrote earlier:
>> My first guess is that '/gnu/store/…-linux-next-…-checkout/include'
>> should not be in the C include path while compiling that file, but that
>> it's getting added.  The difference might be due to the fact that the
>> 'source' in this case is a directory instead of a tarball.
>
> I see now what's happening more precisely.  Our gcc-7 package inherits
> from gcc-6 'native-search-paths' for the CPATH variable.  Because of
> this, the 'set-paths' phase in 'gnu-build-system' sets the CPATH to
> include <NATIVE_INPUT>/include for all native inputs that are
> directories with an 'include' subdirectory.
>
> The 'source' is itself a native input.  When it's a tarball, it will not
> be included, but when it's a source checkout, it _is_ included, although
> it shouldn't be.

Oh, that's quite curious.

>> For now, I would try packing the git checkout as a tarball, and then
>> using that tarball as your 'source'.
>
> I'm now fairly confident that this workaround would work.  Another
> workaround would be to add another phase that removes the CPATH
> component corresponding to 'source', as Tobias does.
>
>       Mark

Thanks!  I got things working by going the tarball route, though
slightly more indirectly than the approach you suggested here.  What I
did was get the latest release-candidate tarball and list the patches I
specifically needed in the package definition.  Happily this worked!

Happy to say I'm on my way to the conference with a functioning laptop.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Compiling a linux kernel from git
  2019-07-07  7:00     ` Christopher Lemmer Webber
@ 2019-07-07 23:30       ` Mark H Weaver
  0 siblings, 0 replies; 7+ messages in thread
From: Mark H Weaver @ 2019-07-07 23:30 UTC (permalink / raw)
  To: Christopher Lemmer Webber; +Cc: help-guix

Hi Chris,

Christopher Lemmer Webber <cwebber@dustycloud.org> writes:
> Thanks!  I got things working by going the tarball route, though
> slightly more indirectly than the approach you suggested here.  What I
> did was get the latest release-candidate tarball and list the patches I
> specifically needed in the package definition.  Happily this worked!
>
> Happy to say I'm on my way to the conference with a functioning laptop.

I'm very glad to hear it! :)

FYI, I filed a bug to discuss the underlying issue that led to this
surprising breakage: <https://bugs.gnu.org/36544>

     Best,
      Mark

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-07-07 23:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-06 16:01 Compiling a linux kernel from git Christopher Lemmer Webber
2019-07-06 22:21 ` Mark H Weaver
2019-07-07  3:57   ` Mark H Weaver
2019-07-07  7:00     ` Christopher Lemmer Webber
2019-07-07 23:30       ` Mark H Weaver
2019-07-06 23:41 ` Tobias Geerinckx-Rice
2019-07-06 23:49   ` Tobias Geerinckx-Rice

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.