L4STeam / linux

Kernel tree containing patches for TCP Prague and the dualpi2 qdisc
Other
47 stars 16 forks source link

Kernel dpkg doesn't build #5

Closed larseggert closed 3 years ago

larseggert commented 3 years ago

While waiting for #4, I thought I'd build the dpkg myself. Unfortunately, this fails per below on Ubuntu 20.10 (groovy):

root@ubuntu-groovy:/home/vagrant/linux# BUILD_NUMBER=${BUILD_NUMBER:-1} make VERBOSE=1 bindeb-pkg LOCALVERSION=-prague-${BUILD_NUMBER} KDEB_PKGVERSION=1
sh ./scripts/package/mkdebian
dpkg-buildpackage -r"fakeroot -u" -a$(cat debian/arch)  -b -nc -uc
dpkg-buildpackage: warning: using a gain-root-command while being root
dpkg-buildpackage: info: source package linux-5.4.0-rc3-prague-
dpkg-buildpackage: info: source version 1
dpkg-buildpackage: info: source distribution groovy
dpkg-buildpackage: info: source changed by root <root@ubuntu-groovy>
dpkg-buildpackage: info: host architecture amd64
 dpkg-source --before-build .
 debian/rules build
make KERNELRELEASE=5.4.0-rc3-prague- ARCH=x86   KBUILD_BUILD_VERSION=1 -f ./Makefile
  CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  DESCEND  objtool
  CHK     include/generated/compile.h
  CHK     kernel/kheaders_data.tar.xz
  LD      arch/x86/boot/compressed/vmlinux
ld: arch/x86/boot/compressed/pgtable_64.o:(.bss+0x0): multiple definition of `__force_order'; arch/x86/boot/compressed/kaslr_64.o:(.bss+0x0): first defined here
ld: arch/x86/boot/compressed/head_64.o: warning: relocation in read-only section `.head.text'
ld: warning: creating DT_TEXTREL in a PIE
make[5]: *** [arch/x86/boot/compressed/Makefile:118: arch/x86/boot/compressed/vmlinux] Error 1
make[4]: *** [arch/x86/boot/Makefile:112: arch/x86/boot/compressed/vmlinux] Error 2
make[3]: *** [arch/x86/Makefile:284: bzImage] Error 2
make[2]: *** [debian/rules:6: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
make[1]: *** [scripts/Makefile.package:83: bindeb-pkg] Error 2
make: *** [Makefile:1427: bindeb-pkg] Error 2
larseggert commented 3 years ago

Here is the actual step that fails:

make -f ./scripts/Makefile.build obj=arch/x86/boot/compressed arch/x86/boot/compressed/vmlinux
    for obj in arch/x86/boot/compressed/head_64.o arch/x86/boot/compressed/misc.o arch/x86/boot/compressed/string.o arch/x86/boot/compressed/cmdline.o arch/x86/boot/compressed/error.o arch/x86/boot/compressed/piggy.o arch/x86/boot/compressed/cpuflags.o arch/x86/boot/compressed/early_serial_console.o arch/x86/boot/compressed/kaslr.o arch/x86/boot/compressed/kaslr_64.o arch/x86/boot/compressed/mem_encrypt.o arch/x86/boot/compressed/pgtable_64.o arch/x86/boot/compressed/acpi.o arch/x86/boot/compressed/eboot.o arch/x86/boot/compressed/efi_stub_64.o arch/x86/boot/compressed/efi_thunk_64.o; do readelf -S $obj | grep -qF .rel.local && { echo "error: $obj has data relocations!" >&2; exit 1; } || true; done; ld -m elf_x86_64 -z noreloc-overflow -pie --no-dynamic-linker  -T arch/x86/boot/compressed/vmlinux.lds arch/x86/boot/compressed/head_64.o arch/x86/boot/compressed/misc.o arch/x86/boot/compressed/string.o arch/x86/boot/compressed/cmdline.o arch/x86/boot/compressed/error.o arch/x86/boot/compressed/piggy.o arch/x86/boot/compressed/cpuflags.o arch/x86/boot/compressed/early_serial_console.o arch/x86/boot/compressed/kaslr.o arch/x86/boot/compressed/kaslr_64.o arch/x86/boot/compressed/mem_encrypt.o arch/x86/boot/compressed/pgtable_64.o arch/x86/boot/compressed/acpi.o arch/x86/boot/compressed/eboot.o arch/x86/boot/compressed/efi_stub_64.o drivers/firmware/efi/libstub/lib.a arch/x86/boot/compressed/efi_thunk_64.o -o arch/x86/boot/compressed/vmlinux
ld: arch/x86/boot/compressed/pgtable_64.o:(.bss+0x0): multiple definition of `__force_order'; arch/x86/boot/compressed/kaslr_64.o:(.bss+0x0): first defined here
ld: arch/x86/boot/compressed/head_64.o: warning: relocation in read-only section `.head.text'
ld: warning: creating DT_TEXTREL in a PIE
make[5]: *** [arch/x86/boot/compressed/Makefile:118: arch/x86/boot/compressed/vmlinux] Error 1
make[4]: *** [arch/x86/boot/Makefile:112: arch/x86/boot/compressed/vmlinux] Error 2
make[3]: *** [arch/x86/Makefile:284: bzImage] Error 2
make[2]: *** [debian/rules:6: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
make[1]: *** [scripts/Makefile.package:83: bindeb-pkg] Error 2
make: *** [Makefile:1427: bindeb-pkg] Error 2
oliviertilmans commented 3 years ago

I assume that with 20.10 you are using gcc-10. You are likely to be hitting https://lore.kernel.org/lkml/20200124181811.4780-1-hjl.tools@gmail.com/ I will backport that fix in the current tree.

Ideally, this tree should be rebased on 5.10 once released as it is the next LTS.

-----Original Message----- From: Lars Eggert notifications@github.com Sent: Friday, November 20, 2020 9:38 AM To: L4STeam/linux linux@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [L4STeam/linux] Kernel dpkg doesn't build (#5)

While waiting for #4 https://github.com/L4STeam/linux/issues/4 , I thought I'd build the dpkg myself. Unfortunately, this fails per below on Ubuntu 20.10 (groovy):

root@ubuntu-groovy:/home/vagrant/linux# BUILD_NUMBER=${BUILD_NUMBER:-1} make VERBOSE=1 bindeb-pkg LOCALVERSION=-prague-${BUILD_NUMBER} KDEB_PKGVERSION=1 sh ./scripts/package/mkdebian dpkg-buildpackage -r"fakeroot -u" -a$(cat debian/arch) -b -nc -uc dpkg-buildpackage: warning: using a gain-root-command while being root dpkg-buildpackage: info: source package linux-5.4.0-rc3-prague- dpkg-buildpackage: info: source version 1 dpkg-buildpackage: info: source distribution groovy dpkg-buildpackage: info: source changed by root root@ubuntu-groovy dpkg-buildpackage: info: host architecture amd64 dpkg-source --before-build . debian/rules build make KERNELRELEASE=5.4.0-rc3-prague- ARCH=x86 KBUILD_BUILD_VERSION=1 -f ./Makefile CALL scripts/checksyscalls.sh CALL scripts/atomic/check-atomics.sh DESCEND objtool CHK include/generated/compile.h CHK kernel/kheaders_data.tar.xz LD arch/x86/boot/compressed/vmlinux ld: arch/x86/boot/compressed/pgtable_64.o:(.bss+0x0): multiple definition of __force_order'; arch/x86/boot/compressed/kaslr_64.o:(.bss+0x0): first defined here ld: arch/x86/boot/compressed/head_64.o: warning: relocation in read-only section.head.text' ld: warning: creating DT_TEXTREL in a PIE make[5]: [arch/x86/boot/compressed/Makefile:118: arch/x86/boot/compressed/vmlinux] Error 1 make[4]: [arch/x86/boot/Makefile:112: arch/x86/boot/compressed/vmlinux] Error 2 make[3]: [arch/x86/Makefile:284: bzImage] Error 2 make[2]: [debian/rules:6: build] Error 2 dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 make[1]: [scripts/Makefile.package:83: bindeb-pkg] Error 2 make: [Makefile:1427: bindeb-pkg] Error 2

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/L4STeam/linux/issues/5 , or unsubscribe https://github.com/notifications/unsubscribe- auth/AAJVCUNF7USVLP4TGDQOKP3SQYTFXANCNFSM4T4PEBXA . https://github.com/notifications/beacon/AAJVCULKMVOTG7DYSU2RM6TSQYTFXA5CNF SM4T4PEBXKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4LEKZPJQ.gif

larseggert commented 3 years ago

Now using the pre-built deb, closing