[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Missing symbol on sh4: "__get_user_unknown"



(Please keep me CC'ed, I'm not subscribed to debian-kernel@)

Hi!

src:linux hasn't been building on sh4 in the past for a while now due to objdump
locking up during the build.

However, this problem has recently vanished, I assume maybe because the bug was
fixed in binutils.

In any case, the kernel package now fails to build due to a missing symbol in the
Infiniband core driver (see below). A simple workaround is to disable Infiniband
support which allows me to build the kernel package normally (which I did and
consequently uploaded).

I vaguely remember that I have seen such issues with missing symbols in the past
with the kernel package, but I don't remember the details.

Does anyone know how to address this issue below?

Also, on sh4, the kernel needs a tiny patch by Arnd Bergmann to fix the systemd
build on sh4 after the Y2038 changes in the kernel (attached). Shall I open
a PR for that?

Thanks,
Adrian

gcc-9 -Wp,-MD,arch/sh/boot/compressed/.lshrsi3.o.d  -nostdinc -isystem /usr/lib/gcc/sh4-linux-gnu/9/include -I/<<PKGBUILDDIR>>/arch/sh/include -I./arch/sh/include/generated -I/<<PKGBUILDDIR>>/include -I./include -I/<<PKGBUILDDIR>>/arch/sh/include/uapi -I./arch/sh/include/generated/uapi -I/<<PKGBUILDDIR>>/include/uapi -I./include/generated/uapi -include /<<PKGBUILDDIR>>/include/linux/kconfig.h -D__KERNEL__ -m4 -m4-nofpu -ml -mno-fdpic -Wa,-isa=sh4-up -ffreestanding -I /<<PKGBUILDDIR>>/arch/sh/include/cpu-sh4 -I /<<PKGBUILDDIR>>/arch/sh/include/cpu-common -I /<<PKGBUILDDIR>>/arch/sh/include/mach-r2d -I /<<PKGBUILDDIR>>/arch/sh/include/mach-common -D__ASSEMBLY__ -fno-PIE -m4 -m4-nofpu -ml -mno-fdpic -Wa,-isa=sh4-up -ffreestanding -I /<<PKGBUILDDIR>>/arch/sh/include/cpu-sh4 -I /<<PKGBUILDDIR>>/arch/sh/include/cpu-common -I /<<PKGBUILDDIR>>/arch/sh/include/mach-r2d -I /<<PKGBUILDDIR>>/arch/sh/include/mach-common -Wa,-gdwarf-2 -I /<<PKGBUILDDIR>>/arch/sh/boot/compressed -I ./arch/sh/boot/compressed    -c -o arch/sh/boot/compressed/lshrsi3.o arch/sh/boot/compressed/lshrsi3.S
  ld  -EL   -r --format binary --oformat elf32-sh-linux -T /<<PKGBUILDDIR>>/arch/sh/boot/compressed/vmlinux.scr arch/sh/boot/compressed/vmlinux.bin.xz -o arch/sh/boot/compressed/piggy.o
  ld  -EL   --oformat elf32-sh-linux -Ttext 0x8c800000 -e startup -T arch/sh/boot/compressed/../../kernel/vmlinux.lds arch/sh/boot/compressed/head_32.o arch/sh/boot/compressed/misc.o arch/sh/boot/compressed/cache.o arch/sh/boot/compressed/piggy.o arch/sh/boot/compressed/ashiftrt.o arch/sh/boot/compressed/ashldi3.o arch/sh/boot/compressed/ashrsi3.o arch/sh/boot/compressed/ashlsi3.o arch/sh/boot/compressed/lshrsi3.o -o arch/sh/boot/compressed/vmlinux
  objcopy -O binary -R .note -R .note.gnu.build-id -R .comment -R .stab -R .stabstr -S  arch/sh/boot/compressed/vmlinux arch/sh/boot/zImage
  Kernel: arch/sh/boot/zImage is ready
ERROR: "__get_user_unknown" [drivers/infiniband/core/ib_uverbs.ko] undefined!
make[5]: *** [/<<PKGBUILDDIR>>/scripts/Makefile.modpost:93: __modpost] Error 1
make[4]: *** [/<<PKGBUILDDIR>>/Makefile:1296: modules] Error 2
make[3]: *** [/<<PKGBUILDDIR>>/Makefile:180: sub-make] Error 2
make[3]: Leaving directory '/<<PKGBUILDDIR>>/debian/build/build_sh4_none_sh7751r'
make[2]: *** [debian/rules.real:213: debian/stamps/build_sh4_none_sh7751r] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[1]: *** [debian/rules.gen:701: build-arch_sh4_none_sh7751r_real] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:33: build-arch] Error 2

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
--- linux-5.6.7.orig/arch/sh/include/uapi/asm/sockios.h
+++ linux-5.6.7/arch/sh/include/uapi/asm/sockios.h
@@ -2,6 +2,8 @@
 #ifndef __ASM_SH_SOCKIOS_H
 #define __ASM_SH_SOCKIOS_H
 
+#include <linux/time_types.h>
+
 /* Socket-level I/O control calls. */
 #define FIOGETOWN	_IOR('f', 123, int)
 #define FIOSETOWN 	_IOW('f', 124, int)

Reply to: