Hello,

i'm trying to create a recipe for Google Chrome for my first Yocto project for 
Intel NUC (based on the Chrome rpm package). The recipe seems to build ok, and 
I was able to
build a working system using sysvinit, but when I enabled systemd the image 
build stops during do_rootfs when requirement for libudev.so.0 is not 
satisfied. 

error: Can't install google-chrome-40.0.2214.91+1-r0@x86_64: no package 
provides libudev.so.0()(64bit)

Google Chrome can use either systemd provided libudev.so.1 or udev provided 
libudev.so.0 (so either of them should satisfy the runtime dependency). I tried 
to create a symlink between
libudev.so.0 and libudev.so1 (as you can see in the recipe attached) but to no 
avail. Any suggestions on how I could satisfy this dependency 
during image building? Link between lib and lib64 was fairly easy to do but 
apparently libs are handled differently.

Chrome recipe:
============

SUMMARY = "Google Chrome (without auto updates, 64bit) "
DESCRIPTION = "This recipe adds Google Chrome (binary) to system"
LICENSE = "Proprietary"
PACKAGE_ARCH = "x86_64"
RDEPENDS_${PN} = "systemd openssl libselinux krb5 xz libpcap cairo expat 
freetype libxcursor libxtst glib-2.0 udev nss libxi \
                  fontconfig gdk-pixbuf libcap libxdamage libxext libxrandr 
alsa-lib dbus gtk+ gconf pango nspr \
                  libx11 libxcomposite libxrender libxfixes libxscrnsaver 
cups-lib"


LIC_FILES_CHKSUM = "file://eula_text.html;md5=a4fcf95699bbb37e9522695b0d632e0b"

# skip certain insane QA tests for binaries

INSANE_SKIP_${PN} = "already-stripped ldflags"



# set source dir to subdir

S = "${WORKDIR}/google-chrome/"

SRC_URI = "file://google-chrome-stable_current_x86_64.rpm;subdir=google-chrome"
SRC_URI[md5sum] = ""
SRC_URI[sha256sum] = ""

# Common variable and task for the binary package recipe.
# Basic principle:
# * The files have been unpacked to ${S} by base.bbclass
# * Skip do_configure and do_compile
# * Use do_install to install the files to ${D}
#
# Note:
# The "subdir" parameter in the SRC_URI is useful when the input package
# is rpm, ipk, deb and so on, for example:
#
# SRC_URI = "http://foo.com/foo-1.0-r1.i586.rpm;subdir=foo-1.0";
#
# Then the files would be unpacked to ${WORKDIR}/foo-1.0, otherwise
# they would be in ${WORKDIR}.
#

# Skip the unwanted steps
do_configure[noexec] = "1"
do_compile[noexec] = "1"

# Install the files to ${D}
do_install () {
        echo sdfs  
  # Do it carefully
    [ -d "${S}" ] || (echo missing source && exit 1)
    cd ${S} || (echo unable to change to && exit 1)
    tar --no-same-owner --exclude='./etc' --exclude='./patches' 
--exclude='./.pc' -cpvf - . \
        | tar --no-same-owner -xpvf - -C ${D}
    cd ${D}
    ln -sf lib lib64
    cd usr
    ln -sf lib lib64
    cd ..
    mkdir -p lib
    cd ${D}/opt/google/chrome
    ln -sf ../../../lib/libudev.so.1 libudev.so.0
}
FILES_${PN} = "${bindir}/google-chrome-stable /lib64 /usr/lib64 
${bindir}/google-chrome /opt/google/chrome ${datadir}/applications 
${datadir}/gnome-control-center/default-apps"


Excerpt from local.conf:
==================
...

LICENSE_FLAGS_WHITELIST = "commercial"
DISTRO_FEATURES_append = " opengl pam selinux systemd"
VIRTUAL-RUNTIME_xserver_common = "xserver-common"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""
PREFERRED_PROVIDER_udev = "systemd"
PREFERRED_PROVIDER_libudev = "systemd"

Layers:
======
BBLAYERS = "/.../Yocto/poky/meta-infomonitor /.../Yocto/poky/meta 
/.../Yocto/poky/meta-yocto /.../Yocto/poky/meta-yocto-bsp 
/.../Yocto/poky/meta-intel /.../Yocto/poky/meta-intel/meta-nuc 
/.../Yocto/poky/meta-qt5 /.../Yocto/poky/meta-browser 
/.../Yocto/poky/meta-openembedded/meta-gnome 
/.../Yocto/poky/meta-openembedded/meta-ruby 
/.../Yocto/poky/meta-openembedded/meta-xfce 
/.../Yocto/poky/meta-openembedded/meta-multimedia 
/.../Yocto/poky/meta-openembedded/meta-networking 
/.../Yocto/poky/meta-openembedded/meta-python 
/.../Yocto/poky/meta-openembedded/meta-oe /.../Yocto/poky/meta-selinux"


br,
Timo



-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to