首页 > 解决方案 > Yocto(Zeus) Perf 构建失败

问题描述

我想在 Yocto(宙斯分支)上构建性能,用于没有 python2 的图像。配方是这个: https ://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-kernel/perf/perf.bb?h=zeus-22.0.4

运行这个配方会产生这个错误:

| ERROR: Execution of '/home/yocto/poseidon-build/tmp/work/imx6dl_poseidon_revb-poseidon-linux-gnueabi/perf/1.0-r9/temp/run.do_compile.19113' failed with exit code 1:
| make: Entering directory '/home/yocto/poseidon-build/tmp/work/imx6dl_poseidon_revb-poseidon-linux-gnueabi/perf/1.0-r9/perf-1.0/tools/perf'
|   BUILD:   Doing 'make -j4' parallel build
| Warning: arch/x86/include/asm/disabled-features.h differs from kernel
| Warning: arch/x86/include/asm/required-features.h differs from kernel
| Warning: arch/x86/include/asm/cpufeatures.h differs from kernel
| Warning: arch/arm/include/uapi/asm/perf_regs.h differs from kernel
| Warning: arch/arm64/include/uapi/asm/perf_regs.h differs from kernel
| Warning: arch/powerpc/include/uapi/asm/perf_regs.h differs from kernel
| Warning: arch/x86/include/uapi/asm/perf_regs.h differs from kernel
| Warning: arch/x86/include/uapi/asm/kvm.h differs from kernel
| Warning: arch/x86/include/uapi/asm/kvm_perf.h differs from kernel
| Warning: arch/x86/include/uapi/asm/svm.h differs from kernel
| Warning: arch/x86/include/uapi/asm/vmx.h differs from kernel
| Warning: arch/powerpc/include/uapi/asm/kvm.h differs from kernel
| Warning: arch/s390/include/uapi/asm/kvm.h differs from kernel
| Warning: arch/s390/include/uapi/asm/kvm_perf.h differs from kernel
| Warning: arch/s390/include/uapi/asm/sie.h differs from kernel
| Warning: arch/arm/include/uapi/asm/kvm.h differs from kernel
| Warning: arch/arm64/include/uapi/asm/kvm.h differs from kernel
| Warning: arch/x86/lib/memcpy_64.S differs from kernel
| Warning: arch/x86/lib/memset_64.S differs from kernel
|
| Auto-detecting system features:
| ...                         dwarf: [ on  ]
| ...            dwarf_getlocations: [ on  ]
| ...                         glibc: [ on  ]
| ...                          gtk2: [ OFF ]
| ...                      libaudit: [ OFF ]
| ...                        libbfd: [ on  ]
| ...                        libelf: [ on  ]
| ...                       libnuma: [ OFF ]
| ...        numa_num_possible_cpus: [ OFF ]
| ...                       libperl: [ OFF ]
| ...                     libpython: [ on  ]
| ...                      libslang: [ on  ]
| ...                     libcrypto: [ on  ]
| ...                     libunwind: [ on  ]
| ...            libdw-dwarf-unwind: [ on  ]
| ...                          zlib: [ on  ]
| ...                          lzma: [ on  ]
| ...                     get_cpuid: [ OFF ]
| ...                           bpf: [ on  ]
|
| Makefile.config:352: DWARF support is off, BPF prologue is disabled
| Makefile.config:547: Missing perl devel files. Disabling perl scripting support, please install perl-ExtUtils-Embed/libperl-dev
| Makefile.config:594: Python 3 is not yet supported; please set
| Makefile.config:595: PYTHON and/or PYTHON_CONFIG appropriately.
| Makefile.config:596: If you also have Python 2 installed, then
| Makefile.config:597: try something like:
| Makefile.config:598:
| Makefile.config:599:   make PYTHON=python2
| Makefile.config:600:
| Makefile.config:601: Otherwise, disable Python support entirely:
| Makefile.config:602:
| Makefile.config:603:   make NO_LIBPYTHON=1
| Makefile.config:604:
| Makefile.config:605: *** .  Stop.
| Makefile.perf:205: recipe for target 'sub-make' failed
| make[1]: *** [sub-make] Error 2
| Makefile:68: recipe for target 'all' failed
| make: *** [all] Error 2
| make: Leaving directory '/home/yocto/poseidon-build/tmp/work/imx6dl_poseidon_revb-poseidon-linux-gnueabi/perf/1.0-r9/perf-1.0/tools/perf'
| WARNING: exit code 1 from a shell command.
|
ERROR: Task (/home/yocto/sources/poky/meta/recipes-kernel/perf/perf.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1947 tasks of which 1946 didn't need to be rerun and 1 failed.

查看配方,libpython 似乎设置好了?:

PACKAGECONFIG ??= "scripting tui libunwind"
PACKAGECONFIG[dwarf] = ",NO_DWARF=1"
PACKAGECONFIG[scripting] = ",NO_LIBPERL=1 NO_LIBPYTHON=1,perl python3"
# gui support was added with kernel 3.6.35
# since 3.10 libnewt was replaced by slang
# to cover a wide range of kernel we add both dependencies
PACKAGECONFIG[tui] = ",NO_NEWT=1,libnewt slang"
PACKAGECONFIG[libunwind] = ",NO_LIBUNWIND=1 NO_LIBDW_DWARF_UNWIND=1,libunwind"
PACKAGECONFIG[libnuma] = ",NO_LIBNUMA=1"
PACKAGECONFIG[systemtap] = ",NO_SDT=1,systemtap"
PACKAGECONFIG[jvmti] = ",NO_JVMTI=1"
# libaudit support would need scripting to be enabled
PACKAGECONFIG[audit] = ",NO_LIBAUDIT=1,audit"
PACKAGECONFIG[manpages] = ",,xmlto-native asciidoc-native"

为什么它不拿起国旗?

标签: yoctobitbake

解决方案


PACKAGECONFIGscripting默认情况下包含在其中。

PACKAGECONFIG选项定义如下:

PACKAGECONFIG[f1] = "--with-f1, \
                     --without-f1, \
                     build-deps-for-f1, \
                     runtime-deps-for-f1, \
                     runtime-recommends-for-f1, \
                     packageconfig-conflicts-for-f1 \
                     "

PACKAGECONFIG[scripting]设置为",NO_LIBPERL=1 NO_LIBPYTHON=1,perl python3"。看到这里的第一个逗号了吗?意思是后面定义是when没有scripting被选中。

因此,如果您不想拉取 python 依赖项,只需将其设置PACKAGECONFIG为一个不包含scripting它的值。

虽然我实际上很惊讶默认没有构建,但这绝对是自动构建器测试的东西。应该是有别的事了吧?

参见: https: //www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-PACKAGECONFIG


推荐阅读