【问题标题】:CMake in BB RecipeBB 配方中的 CMake
【发布时间】:2018-08-11 13:34:25
【问题描述】:

我正在为cpsumon 开发 OpenEmbedded Layer,这是一个用 C 语言编写的用于监控 Corsair AXi 电源单元 (PSU) 的工具。

我的层的代码可以在https://github.com/bernardoaraujor/meta-cpsumon找到

我在 Make 和 CMake 方面的经验非常有限,我无法理解以下错误:

[bernardo@localhost build-genericx86-64]$ bitbake cpsumon
WARNING: Host distribution "fedora-27" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |###############################################################################################################################################################################| Time: 0:00:00
Loaded 1312 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION           = "1.36.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "x86_64-poky-linux"
MACHINE              = "genericx86-64"
DISTRO               = "poky"
DISTRO_VERSION       = "2.4.2"
TUNE_FEATURES        = "m64 core2"
TARGET_FPU           = ""
meta-intel           = "rocko:49187e370e7d5370c7adc5a6f1b721b950667113"
meta                 
meta-poky            
meta-yocto-bsp       = "rocko:50189fdf620bc9ca42065998ce8c5a796ad8c331"
meta-mobiles         = "master:147a75c68e60392e3194c17371b447d1183fd8b7"
meta-cpsumon         = "master:281afc3077384716dd3954af4c43dfa76609bb81"
Initialising tasks: 100% |##########################################################################################################################################################################| Time: 0:00:00
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: cpsumon-git-r0 do_install: Function failed: do_install (log file is located at /home/bernardo/dev/yocto/poky/build-genericx86-64/tmp/work/core2-64-poky-linux/cpsumon/git-r0/temp/log.do_install.3666)
ERROR: Logfile of failure stored in: /home/bernardo/dev/yocto/poky/build-genericx86-64/tmp/work/core2-64-poky-linux/cpsumon/git-r0/temp/log.do_install.3666
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['virtual:native:/home/bernardo/dev/yocto/poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb:do_populate_sysroot', '/home/bernardo/dev/yocto/poky/meta/recipes-devtools/quilt/quilt-native_0.65.bb:do_populate_sysroot', 'virtual:native:/home/bernardo/dev/yocto/poky/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb:do_populate_sysroot', '/home/bernardo/dev/yocto/poky/meta/recipes-devtools/cmake/cmake-native_3.8.2.bb:do_populate_sysroot', '/home/bernardo/dev/yocto/poky/meta/recipes-core/glibc/glibc_2.26.bb:do_populate_sysroot', '/home/bernardo/dev/yocto/poky/meta/recipes-devtools/gcc/gcc-cross_7.3.bb:do_populate_sysroot', '/home/bernardo/dev/yocto/poky/meta/recipes-devtools/gcc/gcc-runtime_7.3.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: ['pseudo-native']
| NOTE: Skipping as already exists in sysroot: ['pkgconfig-native', 'quilt-native', 'cmake-native', 'glibc', 'gcc-cross-x86_64', 'gcc-runtime', 'automake-native', 'autoconf-native', 'gnu-config-native', 'libtool-native', 'expat-native', 'curl-native', 'bzip2-native', 'zlib-native', 'xz-native', 'texinfo-dummy-native', 'libmpc-native', 'mpfr-native', 'linux-libc-headers', 'gmp-native', 'binutils-cross-x86_64', 'libgcc', 'm4-native', 'pigz-native', 'openssl-native', 'gettext-minimal-native', 'flex-native', 'bison-native', 'cryptodev-linux-native', 'makedepend-native', 'xproto-native', 'util-macros-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_install
| NOTE: DESTDIR=/home/bernardo/dev/yocto/poky/build-genericx86-64/tmp/work/core2-64-poky-linux/cpsumon/git-r0/image cmake --build /home/bernardo/dev/yocto/poky/build-genericx86-64/tmp/work/core2-64-poky-linux/cpsumon/git-r0/build --target install -- -j 2
| make: *** No rule to make target 'install'.  Stop.
| WARNING: /home/bernardo/dev/yocto/poky/build-genericx86-64/tmp/work/core2-64-poky-linux/cpsumon/git-r0/temp/run.do_install.3666:1 exit 2 from 'DESTDIR='/home/bernardo/dev/yocto/poky/build-genericx86-64/tmp/work/core2-64-poky-linux/cpsumon/git-r0/image' cmake --build '/home/bernardo/dev/yocto/poky/build-genericx86-64/tmp/work/core2-64-poky-linux/cpsumon/git-r0/build' --target install -- -j 2'
| ERROR: Function failed: do_install (log file is located at /home/bernardo/dev/yocto/poky/build-genericx86-64/tmp/work/core2-64-poky-linux/cpsumon/git-r0/temp/log.do_install.3666)
ERROR: Task (/home/bernardo/dev/yocto/meta-cpsumon/recipes-core/cpsumon/cpsumon_git.bb:do_install) failed with exit code '1'
Second Keyboard Interrupt, stopping...

Summary: 1 task failed:
  /home/bernardo/dev/yocto/meta-cpsumon/recipes-core/cpsumon/cpsumon_git.bb:do_install
Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
[bernardo@localhost build-genericx86-64]$ 

据我了解,| make: *** No rule to make target 'install'. Stop. 表示 BitBake 正在尝试使用 --target install 执行 cmall,并且由于某种原因 make 无法执行 install 任务。对吗?

我不明白该问题是否必须在 CMakeLists.txt 或 cpsumon_git.bb 中修复。 非常感谢任何帮助!

【问题讨论】:

    标签: makefile cmake bitbake


    【解决方案1】:

    cpsumon 的 CMake 脚本实际上并未将库安装在任何地方,因此生成的 makefile 不包含 install 目标。

    因此,当do_install 任务执行make install 时,您会收到来自make 的错误提示

    make: *** No rule to make target 'install'.

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-01-08
      • 2018-09-04
      • 2018-01-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-11
      相关资源
      最近更新 更多