petalinux-build: do_compile: oe_runmake failed & do_compile: Function failed: do_compile 解决方法

petalinux-build 报错 do_compile: oe_runmake failed

petalinux版本:2018.3
kernel和uboot都是使用外部导入的源码;

petalinux-build编译报错信息如下:

$ 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
...

这个时候去看build/build.log信息没有找到有用的提示,但是在上述报错信息接近末尾处有一句话提醒了我,

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

想起来我在源码路径下面配置和编译过,导致编译失败,需要提示先到源码路径下/home/lyq/workspace/linux-4.14,运行make mrproper清除旧目标文件和配置,再回到petalinux项目路径下进行编译即可。
petalinux-build: do_compile: oe_runmake failed & do_compile: Function failed: do_compile 解决方法_第1张图片
警告可以掠过,据说这个是petalinux的版本问题,不用管它。

你可能感兴趣的:(zynq,fpga开发,petalinux,zynq)