petalinux-build: do_compile: oe_runmake failed & do_compile: Function failed: do_compile

created at 01-17-2022 views: 7

problem

petalinux version: 2018.3

Both kernel and uboot use externally imported source code;

The petalinux-build compilation error message is as follows:

$ petalinux-build 
[INFO] building project
[INFO] sourcing bitbake
INFO: bitbake petalinux-user-image
Loading cache: 100% |########################################################################################| Time: 0:00:00
Loaded 3442 entries from dependency cache.
Parsing recipes: 100% |######################################################################################| Time: 0:00:03
Parsing of 2569 .bb files complete (2534 cached, 35 parsed). 3445 targets, 149 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
WARNING: /opt/pkg/petalinux/2018.3/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-xlnx_2018.3.bb.do_compile is tainted from a forced run
Initialising tasks: 100% |###################################################################################| Time: 0:00:34
Checking sstate mirror object availability: 100% |###########################################################| Time: 0:00:09
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: linux-xlnx: compiling from external source tree /home/lyq/workspace/linux-4.14
ERROR: linux-xlnx-4.14-xilinx-v2018.3+git999-r0 do_compile: oe_runmake failed
ERROR: linux-xlnx-4.14-xilinx-v2018.3+git999-r0 do_compile: Function failed: do_compile (log file is located at /home/lyq/workspace/xilinx/petalinux/zynq-1/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.14-xilinx-v2018.3+git999-r0/temp/log.do_compile.129048)
ERROR: Logfile of failure stored in: /home/lyq/workspace/xilinx/petalinux/zynq-1/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.14-xilinx-v2018.3+git999-r0/temp/log.do_compile.129048
Log data follows:
| DEBUG: Executing python function externalsrc_compile_prefunc
| NOTE: linux-xlnx: compiling from external source tree /home/lyq/workspace/linux-4.14
| DEBUG: Python function externalsrc_compile_prefunc finished
| DEBUG: Executing shell function do_compile
| NOTE: make -j 8 HOSTCC=gcc  -isystem/home/lyq/workspace/xilinx/petalinux/zynq-1/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.14-xilinx-v2018.3+git999-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/lyq/workspace/xilinx/petalinux/zynq-1/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.14-xilinx-v2018.3+git999-r0/recipe-sysroot-native/usr/lib -L/home/lyq/workspace/xilinx/petalinux/zynq-1/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.14-xilinx-v2018.3+git999-r0/recipe-sysroot-native/lib -Wl,-rpath-link,/home/lyq/workspace/xilinx/petalinux/zynq-1/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.14-xilinx-v2018.3+git999-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/lyq/workspace/xilinx/petalinux/zynq-1/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.14-xilinx-v2018.3+git999-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/lyq/workspace/xilinx/petalinux/zynq-1/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.14-xilinx-v2018.3+git999-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/lyq/workspace/xilinx/petalinux/zynq-1/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.14-xilinx-v2018.3+git999-r0/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/lyq/workspace/xilinx/petalinux/zynq-1/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 HOSTCPP=gcc  -E zImage CC=arm-xilinx-linux-gnueabi-gcc  -mno-thumb-interwork -marm -fuse-ld=bfd -ffile-prefix-map=/home/lyq/workspace/linux-4.14=/kernel-source/  LD=arm-xilinx-linux-gnueabi-ld.bfd   UIMAGE_LOADADDR=0x8000
|   GEN     ./Makefile
| scripts/kconfig/conf  --silentoldconfig Kconfig
|   CHK     include/config/kernel.release
|   SYSHDR  arch/arm/include/generated/uapi/asm/unistd-common.h
|   SYSHDR  arch/arm/include/generated/uapi/asm/unistd-oabi.h
|   SYSHDR  arch/arm/include/generated/uapi/asm/unistd-eabi.h
|   GEN     ./Makefile
|   UPD     include/config/kernel.release
|   WRAP    arch/arm/include/generated/uapi/asm/bitsperlong.h
|   WRAP    arch/arm/include/generated/uapi/asm/errno.h
|   WRAP    arch/arm/include/generated/uapi/asm/ioctl.h
|   WRAP    arch/arm/include/generated/uapi/asm/ipcbuf.h
|   WRAP    arch/arm/include/generated/uapi/asm/resource.h
|   WRAP    arch/arm/include/generated/uapi/asm/param.h
|   WRAP    arch/arm/include/generated/uapi/asm/poll.h
|   WRAP    arch/arm/include/generated/uapi/asm/sembuf.h
|   WRAP    arch/arm/include/generated/uapi/asm/msgbuf.h
|   WRAP    arch/arm/include/generated/uapi/asm/shmbuf.h
|   WRAP    arch/arm/include/generated/uapi/asm/siginfo.h
|   WRAP    arch/arm/include/generated/uapi/asm/socket.h
|   WRAP    arch/arm/include/generated/uapi/asm/termbits.h
|   WRAP    arch/arm/include/generated/uapi/asm/sockios.h
|   CHK     include/generated/uapi/linux/version.h
|   WRAP    arch/arm/include/generated/uapi/asm/termios.h
|   UPD     include/generated/uapi/linux/version.h
|   CHK     include/generated/utsrelease.h
|   UPD     include/generated/utsrelease.h
|   HOSTCC  scripts/basic/bin2c
|   Using /home/lyq/workspace/linux-4.14 as source for kernel
|   /home/lyq/workspace/linux-4.14 is not clean, please run 'make mrproper'
|   in the '/home/lyq/workspace/linux-4.14' directory.
| make[2]: *** [/home/lyq/workspace/linux-4.14/Makefile:1050: prepare3] Error 1
| make[1]: *** [Makefile:146: sub-make] Error 2
| ERROR: oe_runmake failed
| make: *** [Makefile:24: __sub-make] Error 2
| WARNING: /home/lyq/workspace/xilinx/petalinux/zynq-1/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.14-xilinx-v2018.3+git999-r0/temp/run.do_compile.129048:1 exit 1 from 'exit 1'
| ERROR: Function failed: do_compile (log file is located at /home/lyq/workspace/xilinx/petalinux/zynq-1/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.14-xilinx-v2018.3+git999-r0/temp/log.do_compile.129048)
ERROR: Task (/opt/pkg/petalinux/2018.3/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2018.3.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2231 tasks of which 1798 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /opt/pkg/petalinux/2018.3/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2018.3.bb:do_compile
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
ERROR: Failed to build project
...

At this time, I didn't find any useful tips when I looked at the build/build.log information, but there was a sentence near the end of the above error message that reminded me,

|   Using /home/lyq/workspace/linux-4.14 as source for kernel
|   /home/lyq/workspace/linux-4.14 is not clean, please run 'make mrproper'

I remember that I configured and compiled under the source code path, which caused the compilation to fail. I need to prompt you to go to /home/lyq/workspace/linux-4.14 in the source code path, run make mrproper to clear the old target files and configurations, and then go back to Go to the petalinux project path and compile it.

The warning can be skipped, it is said that this is a version of petalinux, ignore it.

Please log in to leave a comment.