modpost build failure on aarch64 (?)
All, I've hit an issue this past weekend trying to compile a custom kernel based on the OpenSUSE stable branch with CONFIG_VFIO_FSL_MC enabled (for NXP QorIQ) on aarch64. This is in order to support passthrough of DPAA2 containers to VMs on a system with a LS1088 processor. My build host: OpenSUSE LEAP 15.3 (aarch64) rock:~ # uname -a Linux rock 5.3.18-59.19-default #1 SMP Tue Aug 3 14:11:23 UTC 2021 (055c4fd) aarch64 aarch64 aarch64 GNU/Linux rock:~/kernel # gcc --version gcc (SUSE Linux) 7.5.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Checkout stable branch: rock:~ # git clone https://github.com/SUSE/kernel -b stable Cloning into 'kernel'... remote: Enumerating objects: 11355151, done. remote: Counting objects: 100% (84628/84628), done. remote: Compressing objects: 100% (26754/26754), done. remote: Total 11355151 (delta 60838), reused 73774 (delta 57756), pack-reused 11270523 Receiving objects: 100% (11355151/11355151), 2.37 GiB | 10.37 MiB/s, done. Resolving deltas: 100% (9666658/9666658), done. Checking objects: 100% (33554432/33554432), done. Updating files: 100% (72873/72873), done. Configuration step. Here I've enabled CONFIG_VFIO_FSL_MC=m here after loading /boot/config-5.3.18-59.19-default rock:~/kernel # make menuconfig HOSTCC scripts/basic/fixdep UPD scripts/kconfig/mconf-cfg HOSTCC scripts/kconfig/mconf.o HOSTCC scripts/kconfig/lxdialog/checklist.o HOSTCC scripts/kconfig/lxdialog/inputbox.o HOSTCC scripts/kconfig/lxdialog/menubox.o HOSTCC scripts/kconfig/lxdialog/textbox.o HOSTCC scripts/kconfig/lxdialog/util.o HOSTCC scripts/kconfig/lxdialog/yesno.o HOSTCC scripts/kconfig/confdata.o HOSTCC scripts/kconfig/expr.o LEX scripts/kconfig/lexer.lex.c YACC scripts/kconfig/parser.tab.[ch] HOSTCC scripts/kconfig/lexer.lex.o HOSTCC scripts/kconfig/menu.o HOSTCC scripts/kconfig/parser.tab.o HOSTCC scripts/kconfig/preprocess.o HOSTCC scripts/kconfig/symbol.o HOSTCC scripts/kconfig/util.o HOSTLD scripts/kconfig/mconf # # using defaults found in /boot/config-5.3.18-59.19-default # configuration written to .config *** End of the configuration. *** Execute 'make' to start the build or try 'make help'. Start build rock:~/kernel # make -j4 WRAP arch/arm64/include/generated/uapi/asm/errno.h WRAP arch/arm64/include/generated/uapi/asm/kvm_para.h WRAP arch/arm64/include/generated/uapi/asm/ioctls.h WRAP arch/arm64/include/generated/uapi/asm/ioctl.h WRAP arch/arm64/include/generated/uapi/asm/ipcbuf.h WRAP arch/arm64/include/generated/uapi/asm/msgbuf.h WRAP arch/arm64/include/generated/uapi/asm/poll.h WRAP arch/arm64/include/generated/uapi/asm/resource.h WRAP arch/arm64/include/generated/uapi/asm/sembuf.h WRAP arch/arm64/include/generated/uapi/asm/shmbuf.h WRAP arch/arm64/include/generated/uapi/asm/siginfo.h WRAP arch/arm64/include/generated/uapi/asm/socket.h WRAP arch/arm64/include/generated/uapi/asm/sockios.h WRAP arch/arm64/include/generated/uapi/asm/stat.h WRAP arch/arm64/include/generated/uapi/asm/swab.h WRAP arch/arm64/include/generated/uapi/asm/termbits.h WRAP arch/arm64/include/generated/uapi/asm/termios.h WRAP arch/arm64/include/generated/uapi/asm/types.h .... .... DTC arch/arm64/boot/dts/qcom/sm8250-mtp.dtb DTC arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx203.dtb DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revA.dtb DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revC.dtb DTC arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dtb DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dtb DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dtb DTC arch/arm64/boot/dts/qcom/sm8350-hdk.dtb DTC arch/arm64/boot/dts/qcom/sm8350-mtp.dtb ============= BUILD STOPS HERE - no error is displayed, return to prompt ============= Run make -j4 again - and we see an error building scripts/modpost rock:~/kernel # make -j4 HOSTLD scripts/mod/modpost /usr/lib64/gcc/aarch64-suse-linux/7/../../../../aarch64-suse-linux/bin/ld: scripts/mod/modpost.o: in function `main': modpost.c:(.text.startup+0x61c): undefined reference to `get_next_line' /usr/lib64/gcc/aarch64-suse-linux/7/../../../../aarch64-suse-linux/bin/ld: modpost.c:(.text.startup+0x710): undefined reference to `get_next_line' collect2: error: ld returned 1 exit status make[1]: *** [scripts/Makefile.host:104: scripts/mod/modpost] Error 1 make: *** [Makefile:1225: prepare0] Error 2 make: *** Waiting for unfinished jobs.... rock:~/kernel # ls -la scripts/mod/ total 460 drwxr-xr-x 1 root root 814 Sep 6 11:55 . drwxr-xr-x 1 root root 4172 Sep 6 11:54 .. -rw-r--r-- 1 root root 4739 Sep 6 11:54 .devicetable-offsets.s.cmd -rw-r--r-- 1 root root 104 Sep 6 11:54 .elfconfig.h.cmd -rw-r--r-- 1 root root 2510 Sep 6 11:54 .empty.o.cmd -rw-r--r-- 1 root root 556 Sep 6 11:54 .file2alias.o.cmd -rw-r--r-- 1 root root 99 Sep 6 11:51 .gitignore -rw-r--r-- 1 root root 104 Sep 6 11:54 .ksym-provides.cmd -rw-r--r-- 1 root root 440 Sep 6 11:54 .ksym-provides.o.cmd -rw-r--r-- 1 root root 416 Sep 6 11:54 .mk_elfconfig.cmd -rw-r--r-- 1 root root 896 Sep 6 11:54 .modpost.o.cmd -rw-r--r-- 1 root root 464 Sep 6 11:54 .sumversion.o.cmd -rw-r--r-- 1 root root 949 Sep 6 11:51 Makefile -rw-r--r-- 1 root root 7438 Sep 6 11:51 devicetable-offsets.c -rw-r--r-- 1 root root 16224 Sep 6 11:54 devicetable-offsets.h -rw-r--r-- 1 root root 48497 Sep 6 11:54 devicetable-offsets.s -rw-r--r-- 1 root root 136 Sep 6 11:54 elfconfig.h -rw-r--r-- 1 root root 54 Sep 6 11:51 empty.c -rw-r--r-- 1 root root 2248 Sep 6 11:54 empty.o -rw-r--r-- 1 root root 45703 Sep 6 11:51 file2alias.c -rw-r--r-- 1 root root 56120 Sep 6 11:54 file2alias.o -rwxr-xr-x 1 root root 75992 Sep 6 11:54 ksym-provides -rw-r--r-- 1 root root 2534 Sep 6 11:51 ksym-provides.c -rw-r--r-- 1 root root 5024 Sep 6 11:54 ksym-provides.o -rwxr-xr-x 1 root root 75152 Sep 6 11:54 mk_elfconfig -rw-r--r-- 1 root root 1269 Sep 6 11:51 mk_elfconfig.c -rw-r--r-- 1 root root 71306 Sep 6 11:51 modpost.c -rw-r--r-- 1 root root 5934 Sep 6 11:51 modpost.h -rw-r--r-- 1 root root 63432 Sep 6 11:54 modpost.o -rw-r--r-- 1 root root 9921 Sep 6 11:51 sumversion.c -rw-r--r-- 1 root root 7480 Sep 6 11:54 sumversion.o Any suggestions or feedback would be appreciated.
Hi Samu, On 06/09/2021 14:32, GP Samu wrote:
All,
I've hit an issue this past weekend trying to compile a custom kernel based on the OpenSUSE stable branch with CONFIG_VFIO_FSL_MC enabled (for NXP QorIQ) on aarch64. This is in order to support passthrough of DPAA2 containers to VMs on a system with a LS1088 processor.
My build host:
OpenSUSE LEAP 15.3 (aarch64)
rock:~ # uname -a Linux rock 5.3.18-59.19-default #1 SMP Tue Aug 3 14:11:23 UTC 2021 (055c4fd) aarch64 aarch64 aarch64 GNU/Linux
rock:~/kernel # gcc --version gcc (SUSE Linux) 7.5.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Checkout stable branch:
rock:~ # git clone https://github.com/SUSE/kernel -b stable Cloning into 'kernel'... remote: Enumerating objects: 11355151, done. remote: Counting objects: 100% (84628/84628), done. remote: Compressing objects: 100% (26754/26754), done. remote: Total 11355151 (delta 60838), reused 73774 (delta 57756), pack-reused 11270523 Receiving objects: 100% (11355151/11355151), 2.37 GiB | 10.37 MiB/s, done. Resolving deltas: 100% (9666658/9666658), done. Checking objects: 100% (33554432/33554432), done. Updating files: 100% (72873/72873), done.
Configuration step. Here I've enabled CONFIG_VFIO_FSL_MC=m here after loading /boot/config-5.3.18-59.19-default
rock:~/kernel # make menuconfig
If you want to build the kernel locally, you will need to use the configuration. It can be found in the kernel-source.git configs/arm64/default kernel.git is just the expanded branch of kernel-source.git. In the latter you find each patch applied onto the base kernel version for Leap. You can use kernel-source git also to push your kernel to OBS and build a kernel RPM with the changed config. Let me know if that's of interest for you. If you are intersted in this, you can also request to add that config option for upcoming Leap 15.4 Regards, Matthias
HOSTCC scripts/basic/fixdep UPD scripts/kconfig/mconf-cfg HOSTCC scripts/kconfig/mconf.o HOSTCC scripts/kconfig/lxdialog/checklist.o HOSTCC scripts/kconfig/lxdialog/inputbox.o HOSTCC scripts/kconfig/lxdialog/menubox.o HOSTCC scripts/kconfig/lxdialog/textbox.o HOSTCC scripts/kconfig/lxdialog/util.o HOSTCC scripts/kconfig/lxdialog/yesno.o HOSTCC scripts/kconfig/confdata.o HOSTCC scripts/kconfig/expr.o LEX scripts/kconfig/lexer.lex.c YACC scripts/kconfig/parser.tab.[ch] HOSTCC scripts/kconfig/lexer.lex.o HOSTCC scripts/kconfig/menu.o HOSTCC scripts/kconfig/parser.tab.o HOSTCC scripts/kconfig/preprocess.o HOSTCC scripts/kconfig/symbol.o HOSTCC scripts/kconfig/util.o HOSTLD scripts/kconfig/mconf # # using defaults found in /boot/config-5.3.18-59.19-default # configuration written to .config
*** End of the configuration. *** Execute 'make' to start the build or try 'make help'.
Start build
rock:~/kernel # make -j4 WRAP arch/arm64/include/generated/uapi/asm/errno.h WRAP arch/arm64/include/generated/uapi/asm/kvm_para.h WRAP arch/arm64/include/generated/uapi/asm/ioctls.h WRAP arch/arm64/include/generated/uapi/asm/ioctl.h WRAP arch/arm64/include/generated/uapi/asm/ipcbuf.h WRAP arch/arm64/include/generated/uapi/asm/msgbuf.h WRAP arch/arm64/include/generated/uapi/asm/poll.h WRAP arch/arm64/include/generated/uapi/asm/resource.h WRAP arch/arm64/include/generated/uapi/asm/sembuf.h WRAP arch/arm64/include/generated/uapi/asm/shmbuf.h WRAP arch/arm64/include/generated/uapi/asm/siginfo.h WRAP arch/arm64/include/generated/uapi/asm/socket.h WRAP arch/arm64/include/generated/uapi/asm/sockios.h WRAP arch/arm64/include/generated/uapi/asm/stat.h WRAP arch/arm64/include/generated/uapi/asm/swab.h WRAP arch/arm64/include/generated/uapi/asm/termbits.h WRAP arch/arm64/include/generated/uapi/asm/termios.h WRAP arch/arm64/include/generated/uapi/asm/types.h .... .... DTC arch/arm64/boot/dts/qcom/sm8250-mtp.dtb DTC arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx203.dtb DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revA.dtb DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revC.dtb DTC arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dtb DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dtb DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dtb DTC arch/arm64/boot/dts/qcom/sm8350-hdk.dtb DTC arch/arm64/boot/dts/qcom/sm8350-mtp.dtb ============= BUILD STOPS HERE - no error is displayed, return to prompt =============
Run make -j4 again - and we see an error building scripts/modpost
rock:~/kernel # make -j4 HOSTLD scripts/mod/modpost /usr/lib64/gcc/aarch64-suse-linux/7/../../../../aarch64-suse-linux/bin/ld: scripts/mod/modpost.o: in function `main': modpost.c:(.text.startup+0x61c): undefined reference to `get_next_line' /usr/lib64/gcc/aarch64-suse-linux/7/../../../../aarch64-suse-linux/bin/ld: modpost.c:(.text.startup+0x710): undefined reference to `get_next_line' collect2: error: ld returned 1 exit status make[1]: *** [scripts/Makefile.host:104: scripts/mod/modpost] Error 1 make: *** [Makefile:1225: prepare0] Error 2 make: *** Waiting for unfinished jobs....
rock:~/kernel # ls -la scripts/mod/ total 460 drwxr-xr-x 1 root root 814 Sep 6 11:55 . drwxr-xr-x 1 root root 4172 Sep 6 11:54 .. -rw-r--r-- 1 root root 4739 Sep 6 11:54 .devicetable-offsets.s.cmd -rw-r--r-- 1 root root 104 Sep 6 11:54 .elfconfig.h.cmd -rw-r--r-- 1 root root 2510 Sep 6 11:54 .empty.o.cmd -rw-r--r-- 1 root root 556 Sep 6 11:54 .file2alias.o.cmd -rw-r--r-- 1 root root 99 Sep 6 11:51 .gitignore -rw-r--r-- 1 root root 104 Sep 6 11:54 .ksym-provides.cmd -rw-r--r-- 1 root root 440 Sep 6 11:54 .ksym-provides.o.cmd -rw-r--r-- 1 root root 416 Sep 6 11:54 .mk_elfconfig.cmd -rw-r--r-- 1 root root 896 Sep 6 11:54 .modpost.o.cmd -rw-r--r-- 1 root root 464 Sep 6 11:54 .sumversion.o.cmd -rw-r--r-- 1 root root 949 Sep 6 11:51 Makefile -rw-r--r-- 1 root root 7438 Sep 6 11:51 devicetable-offsets.c -rw-r--r-- 1 root root 16224 Sep 6 11:54 devicetable-offsets.h -rw-r--r-- 1 root root 48497 Sep 6 11:54 devicetable-offsets.s -rw-r--r-- 1 root root 136 Sep 6 11:54 elfconfig.h -rw-r--r-- 1 root root 54 Sep 6 11:51 empty.c -rw-r--r-- 1 root root 2248 Sep 6 11:54 empty.o -rw-r--r-- 1 root root 45703 Sep 6 11:51 file2alias.c -rw-r--r-- 1 root root 56120 Sep 6 11:54 file2alias.o -rwxr-xr-x 1 root root 75992 Sep 6 11:54 ksym-provides -rw-r--r-- 1 root root 2534 Sep 6 11:51 ksym-provides.c -rw-r--r-- 1 root root 5024 Sep 6 11:54 ksym-provides.o -rwxr-xr-x 1 root root 75152 Sep 6 11:54 mk_elfconfig -rw-r--r-- 1 root root 1269 Sep 6 11:51 mk_elfconfig.c -rw-r--r-- 1 root root 71306 Sep 6 11:51 modpost.c -rw-r--r-- 1 root root 5934 Sep 6 11:51 modpost.h -rw-r--r-- 1 root root 63432 Sep 6 11:54 modpost.o -rw-r--r-- 1 root root 9921 Sep 6 11:51 sumversion.c -rw-r--r-- 1 root root 7480 Sep 6 11:54 sumversion.o
Any suggestions or feedback would be appreciated.
Hi,
-----Original Message----- From: Matthias Brugger
Sent: 06 September 2021 15:28 To: GP Samu ; arm@lists.opensuse.org Subject: Re: modpost build failure on aarch64 (?) Hi Samu,
All,
I've hit an issue this past weekend trying to compile a custom kernel based on
On 06/09/2021 14:32, GP Samu wrote: the OpenSUSE stable branch with CONFIG_VFIO_FSL_MC enabled (for NXP QorIQ) on aarch64. This is in order to support passthrough of DPAA2 containers to VMs on a system with a LS1088 processor.
CONFIG_VFIO_FSL_MC=m is already enabled in stable branch (which is the branch for Tumbleweed). So, you can just use Tumbleweed on this system. Cheers, Guillaume
My build host:
OpenSUSE LEAP 15.3 (aarch64)
rock:~ # uname -a Linux rock 5.3.18-59.19-default #1 SMP Tue Aug 3 14:11:23 UTC 2021 (055c4fd) aarch64 aarch64 aarch64 GNU/Linux
rock:~/kernel # gcc --version gcc (SUSE Linux) 7.5.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
Checkout stable branch:
rock:~ # git clone https://github.com/SUSE/kernel -b stable Cloning into 'kernel'... remote: Enumerating objects: 11355151, done. remote: Counting objects: 100% (84628/84628), done. remote: Compressing objects: 100% (26754/26754), done. remote: Total 11355151 (delta 60838), reused 73774 (delta 57756), pack-reused 11270523 Receiving objects: 100% (11355151/11355151), 2.37 GiB |
10.37 MiB/s, done.
Resolving deltas: 100% (9666658/9666658), done. Checking objects: 100% (33554432/33554432), done. Updating files: 100% (72873/72873), done.
Configuration step. Here I've enabled CONFIG_VFIO_FSL_MC=m here after loading /boot/config-5.3.18-59.19-default
rock:~/kernel # make menuconfig
If you want to build the kernel locally, you will need to use the configuration. It can be found in the kernel-source.git configs/arm64/default
kernel.git is just the expanded branch of kernel-source.git. In the latter you find each patch applied onto the base kernel version for Leap.
You can use kernel-source git also to push your kernel to OBS and build a kernel RPM with the changed config.
Let me know if that's of interest for you. If you are intersted in this, you can also request to add that config option for upcoming Leap 15.4
Regards, Matthias
HOSTCC scripts/basic/fixdep UPD scripts/kconfig/mconf-cfg HOSTCC scripts/kconfig/mconf.o HOSTCC scripts/kconfig/lxdialog/checklist.o HOSTCC scripts/kconfig/lxdialog/inputbox.o HOSTCC scripts/kconfig/lxdialog/menubox.o HOSTCC scripts/kconfig/lxdialog/textbox.o HOSTCC scripts/kconfig/lxdialog/util.o HOSTCC scripts/kconfig/lxdialog/yesno.o HOSTCC scripts/kconfig/confdata.o HOSTCC scripts/kconfig/expr.o LEX scripts/kconfig/lexer.lex.c YACC scripts/kconfig/parser.tab.[ch] HOSTCC scripts/kconfig/lexer.lex.o HOSTCC scripts/kconfig/menu.o HOSTCC scripts/kconfig/parser.tab.o HOSTCC scripts/kconfig/preprocess.o HOSTCC scripts/kconfig/symbol.o HOSTCC scripts/kconfig/util.o HOSTLD scripts/kconfig/mconf # # using defaults found in /boot/config-5.3.18-59.19-default # configuration written to .config
*** End of the configuration. *** Execute 'make' to start the build or try 'make help'.
Start build
rock:~/kernel # make -j4 WRAP arch/arm64/include/generated/uapi/asm/errno.h WRAP arch/arm64/include/generated/uapi/asm/kvm_para.h WRAP arch/arm64/include/generated/uapi/asm/ioctls.h WRAP arch/arm64/include/generated/uapi/asm/ioctl.h WRAP arch/arm64/include/generated/uapi/asm/ipcbuf.h WRAP arch/arm64/include/generated/uapi/asm/msgbuf.h WRAP arch/arm64/include/generated/uapi/asm/poll.h WRAP arch/arm64/include/generated/uapi/asm/resource.h WRAP arch/arm64/include/generated/uapi/asm/sembuf.h WRAP arch/arm64/include/generated/uapi/asm/shmbuf.h WRAP arch/arm64/include/generated/uapi/asm/siginfo.h WRAP arch/arm64/include/generated/uapi/asm/socket.h WRAP arch/arm64/include/generated/uapi/asm/sockios.h WRAP arch/arm64/include/generated/uapi/asm/stat.h WRAP arch/arm64/include/generated/uapi/asm/swab.h WRAP arch/arm64/include/generated/uapi/asm/termbits.h WRAP arch/arm64/include/generated/uapi/asm/termios.h WRAP arch/arm64/include/generated/uapi/asm/types.h .... .... DTC arch/arm64/boot/dts/qcom/sm8250-mtp.dtb DTC arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx203.dtb DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revA.dtb DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revC.dtb DTC arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dtb DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dtb DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dtb DTC arch/arm64/boot/dts/qcom/sm8350-hdk.dtb DTC arch/arm64/boot/dts/qcom/sm8350-mtp.dtb ============= BUILD STOPS HERE - no error is displayed, return to prompt =============
Run make -j4 again - and we see an error building scripts/modpost
rock:~/kernel # make -j4 HOSTLD scripts/mod/modpost /usr/lib64/gcc/aarch64-suse-linux/7/../../../../aarch64-suse-linux/bin/ld: scripts/mod/modpost.o: in function `main': modpost.c:(.text.startup+0x61c): undefined reference to `get_next_line' /usr/lib64/gcc/aarch64-suse-linux/7/../../../../aarch64-suse-linux/bin/ld: modpost.c:(.text.startup+0x710): undefined reference to `get_next_line' collect2: error: ld returned 1 exit status make[1]: *** [scripts/Makefile.host:104: scripts/mod/modpost] Error 1 make: *** [Makefile:1225: prepare0] Error 2 make: *** Waiting for unfinished jobs....
rock:~/kernel # ls -la scripts/mod/ total 460 drwxr-xr-x 1 root root 814 Sep 6 11:55 . drwxr-xr-x 1 root root 4172 Sep 6 11:54 .. -rw-r--r-- 1 root root 4739 Sep 6 11:54 .devicetable-offsets.s.cmd -rw-r--r-- 1 root root 104 Sep 6 11:54 .elfconfig.h.cmd -rw-r--r-- 1 root root 2510 Sep 6 11:54 .empty.o.cmd -rw-r--r-- 1 root root 556 Sep 6 11:54 .file2alias.o.cmd -rw-r--r-- 1 root root 99 Sep 6 11:51 .gitignore -rw-r--r-- 1 root root 104 Sep 6 11:54 .ksym-provides.cmd -rw-r--r-- 1 root root 440 Sep 6 11:54 .ksym-provides.o.cmd -rw-r--r-- 1 root root 416 Sep 6 11:54 .mk_elfconfig.cmd -rw-r--r-- 1 root root 896 Sep 6 11:54 .modpost.o.cmd -rw-r--r-- 1 root root 464 Sep 6 11:54 .sumversion.o.cmd -rw-r--r-- 1 root root 949 Sep 6 11:51 Makefile -rw-r--r-- 1 root root 7438 Sep 6 11:51 devicetable-offsets.c -rw-r--r-- 1 root root 16224 Sep 6 11:54 devicetable-offsets.h -rw-r--r-- 1 root root 48497 Sep 6 11:54 devicetable-offsets.s -rw-r--r-- 1 root root 136 Sep 6 11:54 elfconfig.h -rw-r--r-- 1 root root 54 Sep 6 11:51 empty.c -rw-r--r-- 1 root root 2248 Sep 6 11:54 empty.o -rw-r--r-- 1 root root 45703 Sep 6 11:51 file2alias.c -rw-r--r-- 1 root root 56120 Sep 6 11:54 file2alias.o -rwxr-xr-x 1 root root 75992 Sep 6 11:54 ksym-provides -rw-r--r-- 1 root root 2534 Sep 6 11:51 ksym-provides.c -rw-r--r-- 1 root root 5024 Sep 6 11:54 ksym-provides.o -rwxr-xr-x 1 root root 75152 Sep 6 11:54 mk_elfconfig -rw-r--r-- 1 root root 1269 Sep 6 11:51 mk_elfconfig.c -rw-r--r-- 1 root root 71306 Sep 6 11:51 modpost.c -rw-r--r-- 1 root root 5934 Sep 6 11:51 modpost.h -rw-r--r-- 1 root root 63432 Sep 6 11:54 modpost.o -rw-r--r-- 1 root root 9921 Sep 6 11:51 sumversion.c -rw-r--r-- 1 root root 7480 Sep 6 11:54 sumversion.o
Any suggestions or feedback would be appreciated.
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
On Mon, Sep 06, 2021 at 01:33:03PM +0000, Guillaume Gardet wrote:
Hi,
-----Original Message----- From: Matthias Brugger
Sent: 06 September 2021 15:28 To: GP Samu ; arm@lists.opensuse.org Subject: Re: modpost build failure on aarch64 (?) Hi Samu,
All,
I've hit an issue this past weekend trying to compile a custom kernel based on
On 06/09/2021 14:32, GP Samu wrote: the OpenSUSE stable branch with CONFIG_VFIO_FSL_MC enabled (for NXP QorIQ) on aarch64. This is in order to support passthrough of DPAA2 containers to VMs on a system with a LS1088 processor.
CONFIG_VFIO_FSL_MC=m is already enabled in stable branch (which is the branch for Tumbleweed). So, you can just use Tumbleweed on this system.
Or the Tumbleweed kernel for Leap which is available in Kernel:stable:Backport project in OBS. Thanks Michal
Cheers, Guillaume
My build host:
OpenSUSE LEAP 15.3 (aarch64)
rock:~ # uname -a Linux rock 5.3.18-59.19-default #1 SMP Tue Aug 3 14:11:23 UTC 2021 (055c4fd) aarch64 aarch64 aarch64 GNU/Linux
rock:~/kernel # gcc --version gcc (SUSE Linux) 7.5.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
Checkout stable branch:
rock:~ # git clone https://github.com/SUSE/kernel -b stable Cloning into 'kernel'... remote: Enumerating objects: 11355151, done. remote: Counting objects: 100% (84628/84628), done. remote: Compressing objects: 100% (26754/26754), done. remote: Total 11355151 (delta 60838), reused 73774 (delta 57756), pack-reused 11270523 Receiving objects: 100% (11355151/11355151), 2.37 GiB |
10.37 MiB/s, done.
Resolving deltas: 100% (9666658/9666658), done. Checking objects: 100% (33554432/33554432), done. Updating files: 100% (72873/72873), done.
Configuration step. Here I've enabled CONFIG_VFIO_FSL_MC=m here after loading /boot/config-5.3.18-59.19-default
rock:~/kernel # make menuconfig
If you want to build the kernel locally, you will need to use the configuration. It can be found in the kernel-source.git configs/arm64/default
kernel.git is just the expanded branch of kernel-source.git. In the latter you find each patch applied onto the base kernel version for Leap.
You can use kernel-source git also to push your kernel to OBS and build a kernel RPM with the changed config.
Let me know if that's of interest for you. If you are intersted in this, you can also request to add that config option for upcoming Leap 15.4
Regards, Matthias
HOSTCC scripts/basic/fixdep UPD scripts/kconfig/mconf-cfg HOSTCC scripts/kconfig/mconf.o HOSTCC scripts/kconfig/lxdialog/checklist.o HOSTCC scripts/kconfig/lxdialog/inputbox.o HOSTCC scripts/kconfig/lxdialog/menubox.o HOSTCC scripts/kconfig/lxdialog/textbox.o HOSTCC scripts/kconfig/lxdialog/util.o HOSTCC scripts/kconfig/lxdialog/yesno.o HOSTCC scripts/kconfig/confdata.o HOSTCC scripts/kconfig/expr.o LEX scripts/kconfig/lexer.lex.c YACC scripts/kconfig/parser.tab.[ch] HOSTCC scripts/kconfig/lexer.lex.o HOSTCC scripts/kconfig/menu.o HOSTCC scripts/kconfig/parser.tab.o HOSTCC scripts/kconfig/preprocess.o HOSTCC scripts/kconfig/symbol.o HOSTCC scripts/kconfig/util.o HOSTLD scripts/kconfig/mconf # # using defaults found in /boot/config-5.3.18-59.19-default # configuration written to .config
*** End of the configuration. *** Execute 'make' to start the build or try 'make help'.
Start build
rock:~/kernel # make -j4 WRAP arch/arm64/include/generated/uapi/asm/errno.h WRAP arch/arm64/include/generated/uapi/asm/kvm_para.h WRAP arch/arm64/include/generated/uapi/asm/ioctls.h WRAP arch/arm64/include/generated/uapi/asm/ioctl.h WRAP arch/arm64/include/generated/uapi/asm/ipcbuf.h WRAP arch/arm64/include/generated/uapi/asm/msgbuf.h WRAP arch/arm64/include/generated/uapi/asm/poll.h WRAP arch/arm64/include/generated/uapi/asm/resource.h WRAP arch/arm64/include/generated/uapi/asm/sembuf.h WRAP arch/arm64/include/generated/uapi/asm/shmbuf.h WRAP arch/arm64/include/generated/uapi/asm/siginfo.h WRAP arch/arm64/include/generated/uapi/asm/socket.h WRAP arch/arm64/include/generated/uapi/asm/sockios.h WRAP arch/arm64/include/generated/uapi/asm/stat.h WRAP arch/arm64/include/generated/uapi/asm/swab.h WRAP arch/arm64/include/generated/uapi/asm/termbits.h WRAP arch/arm64/include/generated/uapi/asm/termios.h WRAP arch/arm64/include/generated/uapi/asm/types.h .... .... DTC arch/arm64/boot/dts/qcom/sm8250-mtp.dtb DTC arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx203.dtb DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revA.dtb DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revC.dtb DTC arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dtb DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dtb DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dtb DTC arch/arm64/boot/dts/qcom/sm8350-hdk.dtb DTC arch/arm64/boot/dts/qcom/sm8350-mtp.dtb ============= BUILD STOPS HERE - no error is displayed, return to prompt =============
Run make -j4 again - and we see an error building scripts/modpost
rock:~/kernel # make -j4 HOSTLD scripts/mod/modpost /usr/lib64/gcc/aarch64-suse-linux/7/../../../../aarch64-suse-linux/bin/ld: scripts/mod/modpost.o: in function `main': modpost.c:(.text.startup+0x61c): undefined reference to `get_next_line' /usr/lib64/gcc/aarch64-suse-linux/7/../../../../aarch64-suse-linux/bin/ld: modpost.c:(.text.startup+0x710): undefined reference to `get_next_line' collect2: error: ld returned 1 exit status make[1]: *** [scripts/Makefile.host:104: scripts/mod/modpost] Error 1 make: *** [Makefile:1225: prepare0] Error 2 make: *** Waiting for unfinished jobs....
rock:~/kernel # ls -la scripts/mod/ total 460 drwxr-xr-x 1 root root 814 Sep 6 11:55 . drwxr-xr-x 1 root root 4172 Sep 6 11:54 .. -rw-r--r-- 1 root root 4739 Sep 6 11:54 .devicetable-offsets.s.cmd -rw-r--r-- 1 root root 104 Sep 6 11:54 .elfconfig.h.cmd -rw-r--r-- 1 root root 2510 Sep 6 11:54 .empty.o.cmd -rw-r--r-- 1 root root 556 Sep 6 11:54 .file2alias.o.cmd -rw-r--r-- 1 root root 99 Sep 6 11:51 .gitignore -rw-r--r-- 1 root root 104 Sep 6 11:54 .ksym-provides.cmd -rw-r--r-- 1 root root 440 Sep 6 11:54 .ksym-provides.o.cmd -rw-r--r-- 1 root root 416 Sep 6 11:54 .mk_elfconfig.cmd -rw-r--r-- 1 root root 896 Sep 6 11:54 .modpost.o.cmd -rw-r--r-- 1 root root 464 Sep 6 11:54 .sumversion.o.cmd -rw-r--r-- 1 root root 949 Sep 6 11:51 Makefile -rw-r--r-- 1 root root 7438 Sep 6 11:51 devicetable-offsets.c -rw-r--r-- 1 root root 16224 Sep 6 11:54 devicetable-offsets.h -rw-r--r-- 1 root root 48497 Sep 6 11:54 devicetable-offsets.s -rw-r--r-- 1 root root 136 Sep 6 11:54 elfconfig.h -rw-r--r-- 1 root root 54 Sep 6 11:51 empty.c -rw-r--r-- 1 root root 2248 Sep 6 11:54 empty.o -rw-r--r-- 1 root root 45703 Sep 6 11:51 file2alias.c -rw-r--r-- 1 root root 56120 Sep 6 11:54 file2alias.o -rwxr-xr-x 1 root root 75992 Sep 6 11:54 ksym-provides -rw-r--r-- 1 root root 2534 Sep 6 11:51 ksym-provides.c -rw-r--r-- 1 root root 5024 Sep 6 11:54 ksym-provides.o -rwxr-xr-x 1 root root 75152 Sep 6 11:54 mk_elfconfig -rw-r--r-- 1 root root 1269 Sep 6 11:51 mk_elfconfig.c -rw-r--r-- 1 root root 71306 Sep 6 11:51 modpost.c -rw-r--r-- 1 root root 5934 Sep 6 11:51 modpost.h -rw-r--r-- 1 root root 63432 Sep 6 11:54 modpost.o -rw-r--r-- 1 root root 9921 Sep 6 11:51 sumversion.c -rw-r--r-- 1 root root 7480 Sep 6 11:54 sumversion.o
Any suggestions or feedback would be appreciated.
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Hello, at the moment I strongly recommend to build mainline kenel on Tumbleweed. Some toolchain features that are required by the recent kernels are not yet available on Leap. That is one potential source of errors. Broken source or configuration is another. If you do not want to deal with git you can also branch from the Kernel:stable:Backport project in OBS and only change the config. Note however that the config changes as the kernel is updated so such frankenpackage will break soon. HTH Michal On Mon, Sep 06, 2021 at 12:32:19PM -0000, GP Samu wrote:
All,
I've hit an issue this past weekend trying to compile a custom kernel based on the OpenSUSE stable branch with CONFIG_VFIO_FSL_MC enabled (for NXP QorIQ) on aarch64. This is in order to support passthrough of DPAA2 containers to VMs on a system with a LS1088 processor.
My build host:
OpenSUSE LEAP 15.3 (aarch64)
rock:~ # uname -a Linux rock 5.3.18-59.19-default #1 SMP Tue Aug 3 14:11:23 UTC 2021 (055c4fd) aarch64 aarch64 aarch64 GNU/Linux
rock:~/kernel # gcc --version gcc (SUSE Linux) 7.5.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Checkout stable branch:
rock:~ # git clone https://github.com/SUSE/kernel -b stable Cloning into 'kernel'... remote: Enumerating objects: 11355151, done. remote: Counting objects: 100% (84628/84628), done. remote: Compressing objects: 100% (26754/26754), done. remote: Total 11355151 (delta 60838), reused 73774 (delta 57756), pack-reused 11270523 Receiving objects: 100% (11355151/11355151), 2.37 GiB | 10.37 MiB/s, done. Resolving deltas: 100% (9666658/9666658), done. Checking objects: 100% (33554432/33554432), done. Updating files: 100% (72873/72873), done.
Configuration step. Here I've enabled CONFIG_VFIO_FSL_MC=m here after loading /boot/config-5.3.18-59.19-default
rock:~/kernel # make menuconfig HOSTCC scripts/basic/fixdep UPD scripts/kconfig/mconf-cfg HOSTCC scripts/kconfig/mconf.o HOSTCC scripts/kconfig/lxdialog/checklist.o HOSTCC scripts/kconfig/lxdialog/inputbox.o HOSTCC scripts/kconfig/lxdialog/menubox.o HOSTCC scripts/kconfig/lxdialog/textbox.o HOSTCC scripts/kconfig/lxdialog/util.o HOSTCC scripts/kconfig/lxdialog/yesno.o HOSTCC scripts/kconfig/confdata.o HOSTCC scripts/kconfig/expr.o LEX scripts/kconfig/lexer.lex.c YACC scripts/kconfig/parser.tab.[ch] HOSTCC scripts/kconfig/lexer.lex.o HOSTCC scripts/kconfig/menu.o HOSTCC scripts/kconfig/parser.tab.o HOSTCC scripts/kconfig/preprocess.o HOSTCC scripts/kconfig/symbol.o HOSTCC scripts/kconfig/util.o HOSTLD scripts/kconfig/mconf # # using defaults found in /boot/config-5.3.18-59.19-default # configuration written to .config
*** End of the configuration. *** Execute 'make' to start the build or try 'make help'.
Start build
rock:~/kernel # make -j4 WRAP arch/arm64/include/generated/uapi/asm/errno.h WRAP arch/arm64/include/generated/uapi/asm/kvm_para.h WRAP arch/arm64/include/generated/uapi/asm/ioctls.h WRAP arch/arm64/include/generated/uapi/asm/ioctl.h WRAP arch/arm64/include/generated/uapi/asm/ipcbuf.h WRAP arch/arm64/include/generated/uapi/asm/msgbuf.h WRAP arch/arm64/include/generated/uapi/asm/poll.h WRAP arch/arm64/include/generated/uapi/asm/resource.h WRAP arch/arm64/include/generated/uapi/asm/sembuf.h WRAP arch/arm64/include/generated/uapi/asm/shmbuf.h WRAP arch/arm64/include/generated/uapi/asm/siginfo.h WRAP arch/arm64/include/generated/uapi/asm/socket.h WRAP arch/arm64/include/generated/uapi/asm/sockios.h WRAP arch/arm64/include/generated/uapi/asm/stat.h WRAP arch/arm64/include/generated/uapi/asm/swab.h WRAP arch/arm64/include/generated/uapi/asm/termbits.h WRAP arch/arm64/include/generated/uapi/asm/termios.h WRAP arch/arm64/include/generated/uapi/asm/types.h .... .... DTC arch/arm64/boot/dts/qcom/sm8250-mtp.dtb DTC arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx203.dtb DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revA.dtb DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revC.dtb DTC arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dtb DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dtb DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dtb DTC arch/arm64/boot/dts/qcom/sm8350-hdk.dtb DTC arch/arm64/boot/dts/qcom/sm8350-mtp.dtb ============= BUILD STOPS HERE - no error is displayed, return to prompt =============
Run make -j4 again - and we see an error building scripts/modpost
rock:~/kernel # make -j4 HOSTLD scripts/mod/modpost /usr/lib64/gcc/aarch64-suse-linux/7/../../../../aarch64-suse-linux/bin/ld: scripts/mod/modpost.o: in function `main': modpost.c:(.text.startup+0x61c): undefined reference to `get_next_line' /usr/lib64/gcc/aarch64-suse-linux/7/../../../../aarch64-suse-linux/bin/ld: modpost.c:(.text.startup+0x710): undefined reference to `get_next_line' collect2: error: ld returned 1 exit status make[1]: *** [scripts/Makefile.host:104: scripts/mod/modpost] Error 1 make: *** [Makefile:1225: prepare0] Error 2 make: *** Waiting for unfinished jobs....
rock:~/kernel # ls -la scripts/mod/ total 460 drwxr-xr-x 1 root root 814 Sep 6 11:55 . drwxr-xr-x 1 root root 4172 Sep 6 11:54 .. -rw-r--r-- 1 root root 4739 Sep 6 11:54 .devicetable-offsets.s.cmd -rw-r--r-- 1 root root 104 Sep 6 11:54 .elfconfig.h.cmd -rw-r--r-- 1 root root 2510 Sep 6 11:54 .empty.o.cmd -rw-r--r-- 1 root root 556 Sep 6 11:54 .file2alias.o.cmd -rw-r--r-- 1 root root 99 Sep 6 11:51 .gitignore -rw-r--r-- 1 root root 104 Sep 6 11:54 .ksym-provides.cmd -rw-r--r-- 1 root root 440 Sep 6 11:54 .ksym-provides.o.cmd -rw-r--r-- 1 root root 416 Sep 6 11:54 .mk_elfconfig.cmd -rw-r--r-- 1 root root 896 Sep 6 11:54 .modpost.o.cmd -rw-r--r-- 1 root root 464 Sep 6 11:54 .sumversion.o.cmd -rw-r--r-- 1 root root 949 Sep 6 11:51 Makefile -rw-r--r-- 1 root root 7438 Sep 6 11:51 devicetable-offsets.c -rw-r--r-- 1 root root 16224 Sep 6 11:54 devicetable-offsets.h -rw-r--r-- 1 root root 48497 Sep 6 11:54 devicetable-offsets.s -rw-r--r-- 1 root root 136 Sep 6 11:54 elfconfig.h -rw-r--r-- 1 root root 54 Sep 6 11:51 empty.c -rw-r--r-- 1 root root 2248 Sep 6 11:54 empty.o -rw-r--r-- 1 root root 45703 Sep 6 11:51 file2alias.c -rw-r--r-- 1 root root 56120 Sep 6 11:54 file2alias.o -rwxr-xr-x 1 root root 75992 Sep 6 11:54 ksym-provides -rw-r--r-- 1 root root 2534 Sep 6 11:51 ksym-provides.c -rw-r--r-- 1 root root 5024 Sep 6 11:54 ksym-provides.o -rwxr-xr-x 1 root root 75152 Sep 6 11:54 mk_elfconfig -rw-r--r-- 1 root root 1269 Sep 6 11:51 mk_elfconfig.c -rw-r--r-- 1 root root 71306 Sep 6 11:51 modpost.c -rw-r--r-- 1 root root 5934 Sep 6 11:51 modpost.h -rw-r--r-- 1 root root 63432 Sep 6 11:54 modpost.o -rw-r--r-- 1 root root 9921 Sep 6 11:51 sumversion.c -rw-r--r-- 1 root root 7480 Sep 6 11:54 sumversion.o
Any suggestions or feedback would be appreciated.
participants (4)
-
GP Samu
-
Guillaume Gardet
-
Matthias Brugger
-
Michal Suchánek