All of lore.kernel.org
 help / color / mirror / Atom feed
* Google Chrome recipe and systemd => how to satisfy runtime requirement for libudev.so.0?
@ 2015-01-27 11:46 Timo Pulkkinen
  2015-01-27 12:32 ` Burton, Ross
  0 siblings, 1 reply; 5+ messages in thread
From: Timo Pulkkinen @ 2015-01-27 11:46 UTC (permalink / raw)
  To: yocto

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Google Chrome recipe and systemd => how to satisfy runtime requirement for libudev.so.0?
  2015-01-27 11:46 Google Chrome recipe and systemd => how to satisfy runtime requirement for libudev.so.0? Timo Pulkkinen
@ 2015-01-27 12:32 ` Burton, Ross
  2015-01-27 19:19   ` Timo Pulkkinen
  0 siblings, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2015-01-27 12:32 UTC (permalink / raw)
  To: Timo Pulkkinen; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 920 bytes --]

On 27 January 2015 at 11:46, Timo Pulkkinen <timo.j.pulkkinen@gmail.com>
wrote:

> 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)
>

My guess is that you didn't wipe away your tmp when changing
DISTRO_FEATURES, which leads to the sysroot and package deploy directories
having both udev and systemd in.

Try deleting your tmp/ directory (sstate-cache will be used to rebuild
everything quickly) and then cleaning Chrome (bitbake -ccleansstate
google-chrome) before building the image again.

Ross

[-- Attachment #2: Type: text/html, Size: 1332 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Google Chrome recipe and systemd => how to satisfy runtime requirement for libudev.so.0?
  2015-01-27 12:32 ` Burton, Ross
@ 2015-01-27 19:19   ` Timo Pulkkinen
  2015-01-27 19:49     ` Burton, Ross
  0 siblings, 1 reply; 5+ messages in thread
From: Timo Pulkkinen @ 2015-01-27 19:19 UTC (permalink / raw)
  To: Burton, Ross; +Cc: yocto


> On 27.1.2015, at 14.32, Burton, Ross <ross.burton@intel.com> wrote:
> 
>> 
>> On 27 January 2015 at 11:46, Timo Pulkkinen <timo.j.pulkkinen@gmail.com> wrote:
>> 
>> error: Can't install google-chrome-40.0.2214.91+1-r0@x86_64: no package provides libudev.so.0()(64bit)
> 
> My guess is that you didn't wipe away your tmp when changing DISTRO_FEATURES, which leads to the sysroot and package deploy directories having both udev and systemd in.
> 
> Try deleting your tmp/ directory (sstate-cache will be used to rebuild everything quickly) and then cleaning Chrome (bitbake -ccleansstate google-chrome) before building the image again.
> 
Hello,

tried this (I wasn't sure if I had done -ccleanstate for google-chrome before together after removing the tmp), but it doesn't help. Sysroot correctly contains /lib/libudev.so.1 (libudev.so.1.6.0, systemd).
tmp/deploy/rpm/ contains udev rpms also - is this a problem, or do they just get built before systemd preference takes over?

I looked more closely on my google-chrome recipe build (bitbake -v) and it warns about missing library already on (i think) qa task: 
NOTE: Couldn't find shared library provider for libudev.so.0, used by files: /.../poky/nuc/tmp/work/x86_64-poky-linux/google-chrome/40.0.2214.91-1-r0/packages-split/google-chrome/opt/google/chrome/chrome

Is there really a provider for libudev.so.0 when using systemd?



Timo





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Google Chrome recipe and systemd => how to satisfy runtime requirement for libudev.so.0?
  2015-01-27 19:19   ` Timo Pulkkinen
@ 2015-01-27 19:49     ` Burton, Ross
  2015-01-28  7:52       ` Timo Pulkkinen
  0 siblings, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2015-01-27 19:49 UTC (permalink / raw)
  To: Timo Pulkkinen; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1441 bytes --]

On 27 January 2015 at 19:19, Timo Pulkkinen <timo.j.pulkkinen@gmail.com>
wrote:

> tried this (I wasn't sure if I had done -ccleanstate for google-chrome
> before together after removing the tmp), but it doesn't help. Sysroot
> correctly contains /lib/libudev.so.1 (libudev.so.1.6.0, systemd).
> tmp/deploy/rpm/ contains udev rpms also - is this a problem, or do they
> just get built before systemd preference takes over?
>
> I looked more closely on my google-chrome recipe build (bitbake -v) and it
> warns about missing library already on (i think) qa task:
> NOTE: Couldn't find shared library provider for libudev.so.0, used by
> files:
> /.../poky/nuc/tmp/work/x86_64-poky-linux/google-chrome/40.0.2214.91-1-r0/packages-split/google-chrome/opt/google/chrome/chrome
>
> Is there really a provider for libudev.so.0 when using systemd?
>

There really isn't - systemd has a newer udev that had an ABI change, so
the version was increased.

There's no way that your tmp/deploy/rpms can contain both systemd and udev
packages (specifically, libudev1 and libudev0) unless you don't delete it
when enabling the systemd DISTRO_FEATURE.  The systemd and udev packages
conflict with each other and they both can't be built at the same time.

A copy of the cooker log for the image would be useful after you've deleted
tmp and -ccleansstate's google-chrome if you are certain that this is what
has happened.

Ross

[-- Attachment #2: Type: text/html, Size: 1902 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Google Chrome recipe and systemd => how to satisfy runtime requirement for libudev.so.0?
  2015-01-27 19:49     ` Burton, Ross
@ 2015-01-28  7:52       ` Timo Pulkkinen
  0 siblings, 0 replies; 5+ messages in thread
From: Timo Pulkkinen @ 2015-01-28  7:52 UTC (permalink / raw)
  To: yocto


> On 27.1.2015, at 21.49, Burton, Ross <ross.burton@intel.com> wrote:
> 
> There really isn't - systemd has a newer udev that had an ABI change, so the version was increased.
> 
> There's no way that your tmp/deploy/rpms can contain both systemd and udev packages (specifically, libudev1 and libudev0) unless you don't delete it when enabling the systemd DISTRO_FEATURE.  The systemd and udev packages conflict with each other and they both can't be built at the same time.
> 
> A copy of the cooker log for the image would be useful after you've deleted tmp and -ccleansstate's google-chrome if you are certain that this is what has happened.
> 
Ross,

yeah, you were right - I mistook the existing libudev and udev rpms not to be from systemd before I checked the contents (they DO contain only udevstuff "generated" by systemd). So the image build itself was ok all the time, but libudev.so.0 just doesn't exist when using systemd.

However, about my actual problem: I managed to package Google Chrome successfully by adding SKIP_FILEDEPS_${PN} = "1" and by creating a symlink /opt/google/chrome/libudev.so.0 -> ../../../lib/libudev.so.1 in do_install. A bit dirty, but this is what the official deb from Google seems to do to manage the different versions. Also skipping file deps inspection is not clearly an optimal solution, but works for me in this case.

Thanks for your help, 

Timo


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-01-28  8:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-27 11:46 Google Chrome recipe and systemd => how to satisfy runtime requirement for libudev.so.0? Timo Pulkkinen
2015-01-27 12:32 ` Burton, Ross
2015-01-27 19:19   ` Timo Pulkkinen
2015-01-27 19:49     ` Burton, Ross
2015-01-28  7:52       ` Timo Pulkkinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.