Compiling image error

hi,

could you tell me how to find that kind of error during compilation? I checked into that file ( .package..)
is empty anyway...

thanks

make[1]: *** [package/Makefile:108: /home/perkel/openwrt/staging_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/perkel/openwrt'
make: *** [/home/perkel/openwrt/include/toplevel.mk:230: world] Error 2

Rerun with make -j1 V=sc and post the last 30 lines or so. That doesn't give you any information except it didn't work.

5 Likes

ok thanks, I will try.

I tried to make a build from that repo ;

git clone https://git.openwrt.org/openwrt/staging/nbd.git

Presumably what you are trying to achieve:

from my shell history
git clone https://git.openwrt.org/openwrt/staging/nbd.git b510x
cd b510x
./scripts/feeds update -a
./scripts/feeds install -a
patch -p1 < ../510setup/build.patch
patch -p1 < ../510setup/510mvebu.patch
cp ../510setup/configdiff configdiff
cp configdiff .config
make defconfig && make oldconfig
nice -n -1 ionice -c2 -n0 make --jobs=5
#break out when it starts to compile linux kernel if you want most recent
update_kernel.sh -u -v 5.10 5.10.15
rm -rf bin tmp build_dir
cp configdiff .config
make defconfig && make oldconfig
nice -n -1 ionice -c2 -n0 make --jobs=5

just shout if you do not know where some of the bits originate.

1 Like

hi,

I dont know if I need that patch and where is the patch and what is the purpose?
thanks

also, I don't know that command nice -n -1 ionice -c2 -n0 make --jobs=5
but I'm using it right now, usualy I use something like make -j5

error at the end.

make[5]: *** [Makefile:139: /home/perkel/5_10/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/tmp/openwrt-mvebu-cortexa9-linksys_wrt1900ac-v1-squashfs-sysupgrade.bin] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: *** [Makefile:139: /home/perkel/5_10/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/tmp/openwrt-mvebu-cortexa9-linksys_wrt1900ac-v1-squashfs-factory.img] Error 1
Parallel mksquashfs: Using 1 processor
Creating 4.0 filesystem on /home/perkel/5_10/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/root.squashfs+pkg=374d9a28, block size 262144.
[=============================================================-] 1830/1830 100%

Exportable Squashfs 4.0 filesystem, xz compressed, data block size 262144
	compressed data, compressed metadata, compressed fragments,
	compressed xattrs, compressed ids
	duplicates are removed
Filesystem size 11663.51 Kbytes (11.39 Mbytes)
	33.09% of uncompressed filesystem size (35244.44 Kbytes)
Inode table size 15153 bytes (14.80 Kbytes)
	20.54% of uncompressed inode table size (73757 bytes)
Directory table size 21566 bytes (21.06 Kbytes)
	43.42% of uncompressed directory table size (49664 bytes)
Number of duplicate files found 266
Number of inodes 2225
Number of files 1783
Number of fragments 61
Number of symbolic links  286
Number of device nodes 1
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 155
Number of ids (unique uids + gids) 1
Number of uids 1
	root (0)
Number of gids 1
	root (0)
make[5]: Leaving directory '/home/perkel/5_10/target/linux/mvebu/image'
make[4]: *** [Makefile:19: install] Error 2
make[4]: Leaving directory '/home/perkel/5_10/target/linux/mvebu'
make[3]: *** [Makefile:11: install] Error 2
make[3]: Leaving directory '/home/perkel/5_10/target/linux'
time: target/linux/install#115.34#8.48#36.31
    ERROR: target/linux failed to build.
make[2]: *** [target/Makefile:25: target/linux/install] Error 1
make[2]: Leaving directory '/home/perkel/5_10'
make[1]: *** [target/Makefile:19: /home/perkel/5_10/staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/stamp/.target_install] Error 2
make[1]: Leaving directory '/home/perkel/5_10'
make: *** [/home/perkel/5_10/include/toplevel.mk:230: world] Error 2

You're still doing it wrong. Use -j1 like Grommish asked. At the top of what you just posted, you see make [5] erroring out, but you're not sharing the actual error.

3 Likes

ok,

often I use make -j5 cause many say to use +1 of your cpu cores, I have 4

Sure, but when you try to debug an error, it is really hard as the log contains simultaneous lines from five compilation threads.

Compile single-threaded when you want to see an understandable log.

(You can play detective and decrypt multi-threaded log with search for *** that usually is visible in make errors, but finding the actual first error can still be difficult.)

And like already said, show a few more lines before the error...

3 Likes

ok perfect, thanks for the explanations.

finaly I made my 5.10 kernel new image for one of my device and it works great.
after that, I only added some more LuCi apps for another device and thats it but I got errors and dont know what is the errors, idea?

thanks again

+ printf '  %-7s %s\n' GEN .version
  GEN     .version
+ '[' -r .version ']'
+ rm -f .version
+ echo 1
+ make -f ./scripts/Makefile.build obj=init need-builtin=1
bash ./scripts/mkcompile_h include/generated/compile.h	\
"arm" "y" ""	\
"" "arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 8.4.0 r15826-7c24b381fc) 8.4.0" "arm-openwrt-linux-muslgnueabi-ld"
+ info LD vmlinux.o
+ '[' '' '!=' silent_ ']'
+ printf '  %-7s %s\n' LD vmlinux.o
  LD      vmlinux.o
+ modpost_link vmlinux.o
+ local objects
+ objects='--whole-archive						arch/arm/kernel/head.o init/built-in.a usr/built-in.a arch/arm/built-in.a arch/arm/mach-mvebu/built-in.a arch/arm/plat-orion/built-in.a kernel/built-in.a certs/built-in.a mm/built-in.a fs/built-in.a ipc/built-in.a security/built-in.a crypto/built-in.a block/built-in.a arch/arm/lib/built-in.a lib/built-in.a drivers/built-in.a sound/built-in.a net/built-in.a virt/built-in.a				--no-whole-archive						--start-group							arch/arm/lib/lib.a lib/lib.a	--end-group'
+ arm-openwrt-linux-muslgnueabi-ld -EL -r -o vmlinux.o --whole-archive arch/arm/kernel/head.o init/built-in.a usr/built-in.a arch/arm/built-in.a arch/arm/mach-mvebu/built-in.a arch/arm/plat-orion/built-in.a kernel/built-in.a certs/built-in.a mm/built-in.a fs/built-in.a ipc/built-in.a security/built-in.a crypto/built-in.a block/built-in.a arch/arm/lib/built-in.a lib/built-in.a drivers/built-in.a sound/built-in.a net/built-in.a virt/built-in.a --no-whole-archive --start-group arch/arm/lib/lib.a lib/lib.a --end-group
+ objtool_link vmlinux.o
+ local objtoolopt
+ '[' -n '' ']'
+ make -f ./scripts/Makefile.modpost MODPOST_VMLINUX=1
  scripts/mod/modpost     -o vmlinux.symvers vmlinux.o
+ info MODINFO modules.builtin.modinfo
+ '[' '' '!=' silent_ ']'
+ printf '  %-7s %s\n' MODINFO modules.builtin.modinfo
  MODINFO modules.builtin.modinfo
+ arm-openwrt-linux-muslgnueabi-objcopy -j .modinfo -O binary vmlinux.o modules.builtin.modinfo
+ info GEN modules.builtin
+ '[' '' '!=' silent_ ']'
+ printf '  %-7s %s\n' GEN modules.builtin
  GEN     modules.builtin
+ tr '\0' '\n'
+ sed -n 's/^[[:alnum:]:_]*\.file=//p'
+ tr ' ' '\n'
+ uniq
+ sed -e 's:^:kernel/:' -e 's/$/.ko/'
+ btf_vmlinux_bin_o=
+ '[' -n '' ']'
+ kallsymso=
+ kallsymso_prev=
+ kallsyms_vmlinux=
+ '[' -n y ']'
+ kallsyms_step 1
+ kallsymso_prev=
+ kallsyms_vmlinux=.tmp_vmlinux.kallsyms1
+ kallsymso=.tmp_vmlinux.kallsyms1.o
+ kallsyms_S=.tmp_vmlinux.kallsyms1.S
+ vmlinux_link .tmp_vmlinux.kallsyms1 ''
+ local lds=./arch/arm/kernel/vmlinux.lds
+ local output=.tmp_vmlinux.kallsyms1
+ local objects
+ local strip_debug
+ info LD .tmp_vmlinux.kallsyms1
+ '[' '' '!=' silent_ ']'
+ printf '  %-7s %s\n' LD .tmp_vmlinux.kallsyms1
  LD      .tmp_vmlinux.kallsyms1
+ shift
+ '[' .tmp_vmlinux.kallsyms1 '!=' 1 ']'
+ strip_debug=-Wl,--strip-debug
+ '[' arm '!=' um ']'
+ objects='--whole-archive						arch/arm/kernel/head.o init/built-in.a usr/built-in.a arch/arm/built-in.a arch/arm/mach-mvebu/built-in.a arch/arm/plat-orion/built-in.a kernel/built-in.a certs/built-in.a mm/built-in.a fs/built-in.a ipc/built-in.a security/built-in.a crypto/built-in.a block/built-in.a arch/arm/lib/built-in.a lib/built-in.a drivers/built-in.a sound/built-in.a net/built-in.a virt/built-in.a				--no-whole-archive						--start-group							arch/arm/lib/lib.a lib/lib.a	--end-group							'
+ arm-openwrt-linux-muslgnueabi-ld -EL --no-undefined -X --pic-veneer --build-id=sha1 --orphan-handling=warn --strip-debug -o .tmp_vmlinux.kallsyms1 -T ./arch/arm/kernel/vmlinux.lds --whole-archive arch/arm/kernel/head.o init/built-in.a usr/built-in.a arch/arm/built-in.a arch/arm/mach-mvebu/built-in.a arch/arm/plat-orion/built-in.a kernel/built-in.a certs/built-in.a mm/built-in.a fs/built-in.a ipc/built-in.a security/built-in.a crypto/built-in.a block/built-in.a arch/arm/lib/built-in.a lib/built-in.a drivers/built-in.a sound/built-in.a net/built-in.a virt/built-in.a --no-whole-archive --start-group arch/arm/lib/lib.a lib/lib.a --end-group
arm-openwrt-linux-muslgnueabi-ld: lib/kobject_uevent.o: in function `broadcast_uevent':
/home/perkel/5.10/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/linux-5.10.14/lib/kobject_uevent.c:723: undefined reference to `kfree_skb'
+ on_exit
+ '[' 1 -ne 0 ']'
+ cleanup
+ rm -f '.btf.*'
+ rm -f .tmp_System.map
+ rm -f '.tmp_vmlinux*'
+ rm -f System.map
+ rm -f vmlinux
+ rm -f vmlinux.o
make[5]: *** [Makefile:1170: vmlinux] Error 1
make[5]: Leaving directory '/home/perkel/5.10/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/linux-5.10.14'
make[4]: *** [Makefile:20: /home/perkel/5.10/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/linux-5.10.14/.modules] Error 2
make[4]: Leaving directory '/home/perkel/5.10/target/linux/mvebu'
make[3]: *** [Makefile:11: compile] Error 2
make[3]: Leaving directory '/home/perkel/5.10/target/linux'
time: target/linux/compile#1186.24#103.04#1289.72
    ERROR: target/linux failed to build.
make[2]: *** [target/Makefile:25: target/linux/compile] Error 1
make[2]: Leaving directory '/home/perkel/5.10'
make[1]: *** [target/Makefile:18: /home/perkel/5.10/staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/stamp/.target_compile] Error 2
make[1]: Leaving directory '/home/perkel/5.10'
make: *** [/home/perkel/5.10/include/toplevel.mk:230: world] Error 2