embedded-linux - 在 pkg-config 搜索路径中找不到软件包 xkbcommon。构建 Yocto 图像时

标签 embedded-linux yocto pkg-config

在 Ubuntu 14.04 上

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:    14.04
Codename:   trusty

使用 fido 分支构建一个 Yocto Poky 图像

inherit core-image
IMAGE_FEATURES += "x11-base x11-sato package-management ssh-server-dropbear"
IMAGE_INSTALL += "chromium \
                  lsb \
                  kernel-modules \
                  alsa-utils \

...我收到了这样的消息

我看起来它与 Chromium 配方 /meta-browser/recipes-browser/chromium/chromium_45.0.2454.85.bb 相关

include chromium.inc

DESCRIPTION = "Chromium browser"
DEPENDS += "libgnome-keyring"

我收到这条消息

ERROR: Logfile of failure stored in: /home/joel/yocto/build-fido/tmp/work/cortexa7hf-vfp-vfpv4-neon-poky-linux-gnueabi/chromium/45.0.2454.85-r0/temp/log.do_configure.28622
Log data follows:
| DEBUG: Executing python function sysroot_cleansstate
| DEBUG: Python function sysroot_cleansstate finished
| DEBUG: Executing shell function do_configure
| Updating projects from gyp files...
| Package xkbcommon was not found in the pkg-config search path.
| Perhaps you should add the directory containing `xkbcommon.pc'
| to the PKG_CONFIG_PATH environment variable
| No package 'xkbcommon' found
| gyp: Call to 'pkg-config --cflags xkbcommon' returned exit status 1.
| WARNING: exit code 1 from a shell command.

我尝试过的

安装库

$ sudo apt-get install libxkbcommon-x11-dev

搜索xkbcommon.pc

$ apt-file search xkbcommon.pc
libxkbcommon-dev: /usr/lib/x86_64-linux-gnu/pkgconfig/xkbcommon.pc

包配置

joel@linux-Lenovo-G50-70:~/yocto/build-fido$ pkg-config --cflags xkbcommon
               <=== Return is EMPTY (?)
joel@linux-Lenovo-G50-70:~/yocto/build-fido$ pkg-config --libs xkbcommon
-lxkbcommon    <=== Looks correct

添加了PKG_CONFIG_PATH

 $ PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/x86_64-linux-gnu/pkgconfig/
 $ export PKG_CONFIG_PATH


 $ env | grep PKG
 PKG_CONFIG_PATH=:/usr/lib/x86_64-linux-gnu/pkgconfig/

但我在运行 bitbake 时仍然收到相同的消息

有什么建议吗?

找到xkbcommon

$ find /usr/lib/ -name *xkbcommon*
/usr/lib/x86_64-linux-gnu/libxkbcommon.so
/usr/lib/x86_64-linux-gnu/libxkbcommon.so.0.0.0
/usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so.0.0.0
/usr/lib/x86_64-linux-gnu/libxkbcommon-x11.a
/usr/lib/x86_64-linux-gnu/libxkbcommon.a
/usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so.0
/usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so
/usr/lib/x86_64-linux-gnu/pkgconfig/xkbcommon.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/xkbcommon-x11.pc
/usr/lib/x86_64-linux-gnu/libxkbcommon.so.0

最佳答案

在这种情况下,是 Chrome 配方未能找到 libxkbcommon。由于在为目标系统构建配方时发生错误,我们需要告诉构建系统 Chrome 配方依赖于 libxkbcommmon

这可以通过添加

 DEPENDS += "libxkbcommon"

Chrome 配方。

值得注意的是,libxkbcommon 很可能是一个可选的依赖项,在这种情况下,它应该由合适的 PACKAGECONFIG 处理。 (参见 PACKAGECONFIG in ref.manual)。

Note: I've never built chromium myself, thus I'd prefer to not suggest any suitable PACKAGECONFIG.

关于embedded-linux - 在 pkg-config 搜索路径中找不到软件包 xkbcommon。构建 Yocto 图像时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36058343/

相关文章:

c++ - Linux 内存分析工具

linux - 如何在 i.MX6Q 上检查和调试 Yocto 的引导加载程序?

linux - 哪些库应该作为依赖项进入 pkg-config 文件?

linux - opencv pkg-config : cannot find -lopencv_ts when compiling using g++

linux-kernel - 如何修改未编译为模块的 Linux 内核驱动程序?

embedded-linux - 如何在 Yocto Fido (poky) 中使/var/log 持久化

jenkins - 为嵌入式 Linux 构建系统

linux - bzImage 和 grub 配置未安装到 yocto dsk 构建中的 .dsk

linux - 为 u-boot 创建 boot.scr

macos - 将/usr/local/bin (homebrew) 添加到 Mac OSX 上 pkg-config 的 QtCreator 搜索路径