首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在pkg-config搜索路径中找不到xkbcommon包。在建立Yocto形象时

在pkg-config搜索路径中找不到xkbcommon包。在建立Yocto形象时
EN

Stack Overflow用户
提问于 2016-03-17 10:49:55
回答 2查看 7K关注 0票数 3

论Ubuntu 14.04

代码语言:javascript
复制
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:    14.04
Codename:   trusty

使用fido分支构建Yocto图像

代码语言:javascript
复制
inherit core-image
IMAGE_FEATURES += "x11-base x11-sato package-management ssh-server-dropbear"
IMAGE_INSTALL += "chromium \
                  lsb \
                  kernel-modules \
                  alsa-utils \

..。我得到了这样的信息

我看上去和铬配方/meta-browser/recipes-browser/chromium/chromium_45.0.2454.85.bb有关,它的开头是这样的

代码语言:javascript
复制
include chromium.inc

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

我收到这条信息

代码语言:javascript
复制
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.

我试过的

安装了库

代码语言:javascript
复制
$ sudo apt-get install libxkbcommon-x11-dev

搜索xkbcommon.pc

代码语言:javascript
复制
$ apt-file search xkbcommon.pc
libxkbcommon-dev: /usr/lib/x86_64-linux-gnu/pkgconfig/xkbcommon.pc

pkg-config

代码语言:javascript
复制
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

代码语言:javascript
复制
 $ 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

代码语言:javascript
复制
$ 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
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2016-03-17 15:03:34

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

这可以通过添加

代码语言:javascript
复制
 DEPENDS += "libxkbcommon"

铬的配方。

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

备注:我自己从来没有造过铬,所以我宁愿不建议任何合适的PACKAGECONFIG

票数 3
EN

Stack Overflow用户

发布于 2016-03-17 16:28:37

我认为Chromium_45的食谱是从我上次看到它(不要再看到它)就被取下来的。

总之,这就是我对Chromium_40所做的。我已经禁用了Wayland (臭氧-铬中的wayland),所以它只使用x11。

在local.conf中,我添加了CHROMIUM_ENABLE_WAYLAND = "0"

通过这样做,我将绕过CHROMIUM_WAYLAND_DEPENDS = "wayland libxkbcommon"

代码语言:javascript
复制
CHROMIUM_X11_DEPENDS = "xextproto gtk+ libxi libxss"
CHROMIUM_X11_GYP_DEFINES = ""
CHROMIUM_WAYLAND_DEPENDS = "wayland libxkbcommon"
CHROMIUM_WAYLAND_GYP_DEFINES = "use_ash=1 use_aura=1 chromeos=0 use_ozone=1"

python() {
    if d.getVar('CHROMIUM_ENABLE_WAYLAND', True) == '1':
        d.appendVar('DEPENDS', ' %s ' % d.getVar('CHROMIUM_WAYLAND_DEPENDS', True))
        d.appendVar('GYP_DEFINES', ' %s ' % d.getVar('CHROMIUM_WAYLAND_GYP_DEFINES', True))
    else:
        d.appendVar('DEPENDS', ' %s ' % d.getVar('CHROMIUM_X11_DEPENDS', True))
        d.appendVar('GYP_DEFINES', ' %s ' % d.getVar('CHROMIUM_X11_GYP_DEFINES', True))
}

P.S.:我还发现一件奇怪的事是use-egl

PACKAGECONFIG[use-egl] = ",,virtual/egl virtual/libgles2"PACKAGECONFIG[use-egl] = ""夸大了,所以我已经将PACKAGECONFIG[use-egl] = ""chromium.inc中删除了

代码语言:javascript
复制
PACKAGECONFIG ??= "use-egl"

# this makes sure the dependencies for the EGL mode are present; otherwise, the configure scripts
# automatically and silently fall back to GLX
PACKAGECONFIG[use-egl] = ",,virtual/egl virtual/libgles2"

# Additional PACKAGECONFIG options - listed here to avoid warnings
PACKAGECONFIG[component-build] = ""
PACKAGECONFIG[disable-api-keys-info-bar] = ""
PACKAGECONFIG[ignore-lost-context] = ""
PACKAGECONFIG[impl-side-painting] = ""
PACKAGECONFIG[use-egl] = ""
PACKAGECONFIG[kiosk-mode] = ""
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36058343

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档