<div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 29, 2021 at 7:07 AM <<a href="mailto:ckim@etri.re.kr">ckim@etri.re.kr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div lang="KO"><div class="gmail-m_-220305715686163428WordSection1"><p class="MsoNormal"><span lang="EN-US">I found from <a href="https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel" target="_blank">https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel</a>, the correct method to build ubuntu is (for ARCH=arm64 case)<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><ul style="margin-top:0cm" type="disc"><li class="MsoNormal" style="color:rgb(51,51,51);text-align:left;background-color:white;word-break:keep-all"><span lang="EN-US" style="font-size:12pt;font-family:GulimChe">LANG=C fakeroot debian/rules ARCH=arm64 clean<u></u><u></u></span></li><li class="MsoNormal" style="color:rgb(51,51,51);text-align:left;background-color:white;word-break:keep-all"><span lang="EN-US" style="font-size:12pt;font-family:GulimChe"># quicker build:<u></u><u></u></span></li><li class="MsoNormal" style="color:rgb(51,51,51);text-align:left;background-color:white;word-break:keep-all"><span lang="EN-US" style="font-size:12pt;font-family:GulimChe">LANG=C fakeroot debian/rules ARCH=arm64 binary-headers binary-generic binary-perarch<u></u><u></u></span></li><li class="MsoNormal" style="color:rgb(51,51,51);text-align:left;background-color:white;word-break:keep-all"><span lang="EN-US" style="font-size:12pt;font-family:GulimChe"># if you need linux-tools or lowlatency kernel, run instead:<u></u><u></u></span></li><li class="MsoNormal" style="color:rgb(51,51,51);text-align:left;background-color:white;word-break:keep-all"><span lang="EN-US" style="font-size:12pt;font-family:GulimChe">LANG=C fakeroot debian/rules ARCH=arm64 binary<u></u><u></u></span></li></ul><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">But when I tried it, it went far longer but eventually it failed with error.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal" style="margin-left:30pt">…<span lang="EN-US">.<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">Creating symlink /home/ckim/prj1/QEMU/qemu_test/test_ubuntu-20.04-build/focal/ubuntu-focal/debian/build/builddkms/build/zfs/0.8.3/source -><u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US"> /home/ckim/prj1/QEMU/qemu_test/test_ubuntu-20.04-build/focal/ubuntu-focal/debian/build/builddkms/source/zfs-0.8.3<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">DKMS: add completed.<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">Running the pre_build script:<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">checking for gawk... gawk<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">checking metadata... META file<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">checking build system type... x86_64-pc-linux-gnu<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">checking host system type... x86_64-pc-linux-gnu<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">checking target system type... x86_64-pc-linux-gnu<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">checking whether to enable maintainer-specific portions of Makefiles... no<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">checking whether make supports nested variables... yes<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">checking for a BSD-compatible install... /bin/install -c<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">checking whether build environment is sane... yes<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">checking for a thread-safe mkdir -p... /bin/mkdir -p<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> …..<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">checking kernel source version... 5.4.0-42-generic<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">checking kernel file name for module symbols... Module.symvers<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">checking whether modules can be built... no<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">configure: error: <u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US"> *** Unable to build an empty module.<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US"> <u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">Building module:<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">cleaning build area...(bad exit status: 2)<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">make -j28 KERNELRELEASE=5.4.0-42-generic...(bad exit status: 2)<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">ERROR (dkms apport): binary package for zfs: 0.8.3 not found</span></p></div></div></blockquote><div>Based on the error message above you may not have the zfs-dkms package installed.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div lang="KO"><div class="gmail-m_-220305715686163428WordSection1"><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US"><u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">Error! Bad return status for module build on kernel: 5.4.0-42-generic (x86_64)<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">Consult /home/ckim/prj1/QEMU/qemu_test/test_ubuntu-20.04-build/focal/ubuntu-focal/debian/build/builddkms/build/zfs/0.8.3/build/make.log for more information.<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">DKMS make.log for zfs-0.8.3 for kernel 5.4.0-42-generic (x86_64)<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">Tue Jun 29 11:43:02 KST 2021<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">make[1]: Entering directory '<<DKMSDIR>>/build/zfs/0.8.3/build'<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">make[1]: *** No targets specified and no makefile found. Stop.<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">make[1]: Leaving directory '<<DKMSDIR>>/build/zfs/0.8.3/build'<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:30pt"><span lang="EN-US">make: *** [debian/rules.d/<a href="http://2-binary-arch.mk:223" target="_blank">2-binary-arch.mk:223</a>: install-generic] Error 1<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">And according to the guide, I</span>’<span lang="EN-US">m supposed to see in ../ directory two linux headers .deb files and a linux-image .deb file but I see only linux-headers-5.4.0-42_5.4.0-42.46_all.deb<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Can anyone give me an advice? Any suggestion will be appreciated.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Thank you!<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Chan Kim<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><div style="border-style:none none none solid;border-left-width:1.5pt;border-left-color:blue;padding:0cm 0cm 0cm 4pt"><div><div style="border-style:solid none none;border-top-width:1pt;border-top-color:rgb(225,225,225);padding:3pt 0cm 0cm"><p class="MsoNormal" align="left" style="text-align:left;word-break:keep-all"><b><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif">From:</span></b><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif"> <a href="mailto:ckim@etri.re.kr" target="_blank">ckim@etri.re.kr</a> <<a href="mailto:ckim@etri.re.kr" target="_blank">ckim@etri.re.kr</a>> <br><b>Sent:</b> Tuesday, June 29, 2021 10:04 AM<br><b>To:</b> <a href="mailto:kernelnewbies@kernelnewbies.org" target="_blank">kernelnewbies@kernelnewbies.org</a><br><b>Subject:</b> kernel build error during ubuntu linux kernel build <u></u><u></u></span></p></div></div><p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Hello, all<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">I have a strange problem in building the linux kernel from ubuntu. (I want to replace the kernel in ubuntu to debug install failure on qemu virtual machine)<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">I downloaded ubuntu source by </span>“<span lang="EN-US">git clone git://<a href="http://kernel.ubuntu.com/ubuntu/ubuntu-focal.git" target="_blank">kernel.ubuntu.com/ubuntu/ubuntu-focal.git</a></span>”<span lang="EN-US">. and because I wanted to use a specific version, I did </span>“<span lang="EN-US">git checkout Ubuntu-5.4.0-42.46</span>”<span lang="EN-US"> (this version is the one used in a ubuntu installation .iso. <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">And you can see related askubuntu question here : <a href="https://askubuntu.com/questions/1347390/what-ubuntu-source-version-should-i-use-to-add-some-debug-prints-for-ubuntu-bo" target="_blank">https://askubuntu.com/questions/1347390/what-ubuntu-source-version-should-i-use-to-add-some-debug-prints-for-ubuntu-bo</a> )<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">After git-checkout, the `git log` shows this result : <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"> </span><span lang="DE">commit 98c4545e2d65ed35c31056f72c4da20f6b5ea0d0 (HEAD, tag: Ubuntu-5.4.0-42.46)<u></u><u></u></span></p><p class="MsoNormal"><span lang="DE"> </span><span lang="EN-US">Author: Khalid Elmously <<a href="mailto:khalid.elmously@canonical.com" target="_blank">khalid.elmously@canonical.com</a>><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> Date: Thu Jul 9 19:50:26 2020 -0400<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> UBUNTU: Ubuntu-5.4.0-42.46<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> Signed-off-by: Khalid Elmously <<a href="mailto:khalid.elmously@canonical.com" target="_blank">khalid.elmously@canonical.com</a>><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">To build the kernel, I did `ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- make defconfig` and `ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- make -j24 Image`. But this gives me a compile error below. What can be wrong? <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"> . <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> . <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> CC mm/interval_tree.o<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> CC drivers/base/regmap/regcache.o<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> CC kernel/time/posix-cpu-timers.o<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> CC mm/list_lru.o<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> CC block/blk-mq.o<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> AS arch/arm64/lib/memchr.o<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> CC fs/ext4/migrate.o<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> security/security.c: In function 'security_add_hooks':<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> security/security.c:477:25: error: 'struct security_hook_heads' has no member named 'socket_getpeersec_stream'<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> 477 | &security_hook_heads.socket_getpeersec_stream)<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> | ^<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> CC kernel/time/posix-clock.o<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> AS arch/arm64/lib/memcmp.o<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> security/security.c: In function 'security_setprocattr':<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> CC arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic-v2.o<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> security/security.c:2058:27: error: 'union security_list_options' has no member named 'socket_getpeersec_stream'<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> 2058 | socket_getpeersec_stream.socket_getpeersec_stream = NULL;<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> | ^<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> In file included from ./include/linux/timer.h:5,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> from ./include/linux/workqueue.h:9,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> from ./include/linux/bpf.h:9,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> from security/security.c:13:<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> security/security.c:2060:25: error: 'struct security_hook_heads' has no member named 'socket_getpeersec_stream'<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> 2060 | &security_hook_heads.socket_getpeersec_stream,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> | ^<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> ./include/linux/list.h:857:12: note: in definition of macro 'hlist_entry_safe'<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> 857 | ({ typeof(ptr) ____ptr = (ptr); \<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> | ^~~<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> security/security.c:2059:3: note: in expansion of macro 'hlist_for_each_entry'<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> 2059 | hlist_for_each_entry(hp,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> | ^~~~~~~~~~~~~~~~~~~~<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> security/security.c:2060:25: error: 'struct security_hook_heads' has no member named 'socket_getpeersec_stream'<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> 2060 | &security_hook_heads.socket_getpeersec_stream,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> | ^<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> ./include/linux/list.h:857:28: note: in definition of macro 'hlist_entry_safe'<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> 857 | ({ typeof(ptr) ____ptr = (ptr); \<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> | ^~~<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> security/security.c:2059:3: note: in expansion of macro 'hlist_for_each_entry'<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> 2059 | hlist_for_each_entry(hp,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> | ^~~~~~~~~~~~~~~~~~~~<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> In file included from ./include/linux/list.h:9,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> from ./include/linux/timer.h:5,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> from ./include/linux/workqueue.h:9,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> from ./include/linux/bpf.h:9,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> from security/security.c:13:<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> ./include/linux/kernel.h:993:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> 993 | void *__mptr = (void *)(ptr); \<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> | ^<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> ./include/linux/list.h:847:40: note: in expansion of macro 'container_of'<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> 847 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> | ^~~~~~~~~~~~<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> . <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> . <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">BTW, when I do the same with linux-5.4.21 vanila source, it compiles ok. <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Can anyone give me an advice? Could this Ubuntu-5.4.0-42.46 version have a bug and maybe I need a patch?<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Thank you!<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Chan Kim<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div></div></div>_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.org</a><br>
<a href="https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" rel="noreferrer" target="_blank">https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</blockquote></div></div>