[OE-core] DEPENDS not extended to -native for BBCLASSEXTENDS when added by PACKAGECONFIG

Martin Jansa martin.jansa at gmail.com
Mon Feb 27 13:12:56 UTC 2012


On Fri, Feb 24, 2012 at 01:32:43PM +0100, Martin Jansa wrote:
> On Wed, Feb 15, 2012 at 12:00:44AM +0100, Martin Jansa wrote:
> > oe-core gtk+ has:
> > 
> > X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender libxcomposite"
> > DEPENDS = "glib-2.0 pango atk jpeg libpng gtk-doc-native gdk-pixbuf-native docbook-utils-native \
> >  libgcrypt cairo gdk-pixbuf"
> > PACKAGECONFIG[x11] = "--with-x=yes --with-gdktarget=x11,--with-x=no,${X11DEPENDS}"
> > 
> > meta-oe adds BBCLASSEXTEND = "native"
> > because gtk+-native-2* is needed for gtk+3 to build:
> > http://git.openembedded.org/meta-openembedded/commit/?id=a4155ac38dce214cbb59f6243b29ca3df76e0d29
> > 
> > I would expect that all dependencies added by x11 PACKAGECONFIG will be expanded 
> > to -native variants like for every other dependency, but it's not true:
> > 
> > gtk-native.env:X11DEPENDS="virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender libxcomposite"
> > gtk-native.env:# DEPENDS=pkgconfig-native ${@autotools_dep_prepend(d)}${BASEDEPENDS} glib-2.0-native pango-native atk-native jpeg-native libpng-native gtk-doc-native gdk-pixbuf-native docbook-utils-native libgcrypt-native cairo-native gdk-pixbuf-native ${X11DEPENDS}
> > gtk-gative.env:DEPENDS="pkgconfig-native autoconf-native automake-native libtool-native gnu-config-native  glib-2.0-native pango-native atk-native jpeg-native libpng-native gtk-doc-native gdk-pixbuf-native docbook-utils-native libgcrypt-native cairo-native gdk-pixbuf-native virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender libxcomposite"
> > 
> > gtk-target.env:X11DEPENDS="virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender libxcomposite"
> > gtk-target.env:# DEPENDS=pkgconfig-native ${@autotools_dep_prepend(d)}${BASEDEPENDS} glib-2.0 pango atk jpeg libpng gtk-doc-native gdk-pixbuf-native docbook-utils-native  libgcrypt cairo gdk-pixbuf ${X11DEPENDS}
> > gtk-target.env:DEPENDS="pkgconfig-native autoconf-native automake-native libtool-native libtool-cross gnu-config-native  virtual/arm-oe-linux-gnueabi-gcc virtual/arm-oe-linux-gnueabi-compilerlibs virtual/libc  glib-2.0 pango atk jpeg libpng gtk-doc-native gdk-pixbuf-native docbook-utils-native  libgcrypt cairo gdk-pixbuf virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender libxcomposite"
> > 
> > And gtk+-native builds fails to configure because of missing libxrender-native (libx11-native is built by something else probably).
> > 
> > configure:23318: checking for XOpenDisplay
> > configure:23318: gcc -o conftest -DGDK_PIXBUF_DISABLE_DEPRECATED -isystem/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include -O2 -pipe -Wall -isystem/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES  -L/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib -L/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/lib -Wl,-rpath-link,/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib -Wl,-rpath-link,/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/lib -Wl,-rpath,/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/var/lib/jenkins/jobs/shr-core/workspace/shr-core/tmp-eglibc/sysroots/x86_64-linux/lib -Wl,-O1 conftest.c  -lXext -lXrender -lX11    >&5
> > /usr/bin/ld: cannot find -lXrender
> > collect2: ld returned 1 exit status
> > configure:23318: $? = 1
> > configure: failed program was:
> > ...
> > configure:23318: result: no
> > configure:23322: error: *** libX11 not found. Check 'config.log' for more details.
> > 
> > Regards,
> 
> any idea about this? I'm tired of building virtual/libx11-native and
> libxrender-native manually after each gtk+-native build error :/.
> 
> Yes I can fix it in gtk+ bbappend by repeating
> PACKAGECONFIG/DISTRO_FEATURES logic fog DEPENDS_virtclass-native, but
> this seems like bug in PACKAGECONFIG handling and could be in more
> recipes.

I've added bb.error to PACKAGECONFIG handling and virtclass-native
handler and PACKAGECONFIG is executed _always_ after virtclass-native
(or nativesdk), so all dependencies added by PACKAGECONFIG are not 
available for virtclass-native handler to process.

With tmp-eglibc/cache removed to force reparse of all recipes I have
this order of handlers:
OE qemux86-64@ ~/oe-core $ grep "\(cairo\)\|\(gtk+\)\|\(libsdl\)\|\(pango\)\|\(xserver-xorg\)" log
ERROR: Executing virtclass-native handle for gtk+
ERROR: Executing PACKAGECONFIG handle for gtk+
ERROR: Executing virtclass-native handle for gtk+-native
ERROR: Executing PACKAGECONFIG handle for gtk+-native
ERROR: Executing virtclass-native handle for gtk+
ERROR: Executing PACKAGECONFIG handle for gtk+
ERROR: Executing virtclass-native handle for gtk+
ERROR: Executing PACKAGECONFIG handle for gtk+
ERROR: Executing virtclass-native handle for libsdl
ERROR: Executing PACKAGECONFIG handle for libsdl
ERROR: Executing virtclass-native handle for libsdl-nativesdk
ERROR: Executing PACKAGECONFIG handle for libsdl-nativesdk
ERROR: Executing virtclass-native handle for pango
ERROR: Executing PACKAGECONFIG handle for pango
ERROR: Executing virtclass-native handle for pango-native
ERROR: Executing PACKAGECONFIG handle for pango-native
ERROR: Executing virtclass-native handle for cairo
ERROR: Executing PACKAGECONFIG handle for cairo
ERROR: Executing virtclass-native handle for cairo-native
ERROR: Executing PACKAGECONFIG handle for cairo-native
ERROR: Executing virtclass-native handle for xserver-xorg
ERROR: Executing PACKAGECONFIG handle for xserver-xorg
ERROR: Executing virtclass-native handle for xserver-xorg-lite
ERROR: Executing PACKAGECONFIG handle for xserver-xorg-lite
ERROR: Executing virtclass-native handle for python-pycairo
ERROR: Executing PACKAGECONFIG handle for gtk+
ERROR: Executing virtclass-native handle for gtk+-native
ERROR: Executing PACKAGECONFIG handle for gtk+-native
ERROR: Executing virtclass-native handle for pango
ERROR: Executing PACKAGECONFIG handle for pango
ERROR: Executing virtclass-native handle for pango-native
ERROR: Executing PACKAGECONFIG handle for pango-native
ERROR: Executing virtclass-native handle for cairo
ERROR: Executing PACKAGECONFIG handle for cairo
ERROR: Executing virtclass-native handle for cairo-native
ERROR: Executing PACKAGECONFIG handle for cairo-native
ERROR: Executing virtclass-native handle for pango
ERROR: Executing PACKAGECONFIG handle for pango
ERROR: Executing virtclass-native handle for cairo
ERROR: Executing PACKAGECONFIG handle for cairo

Can we convert PACKAGECONFIG from anonymous python function in
base.bbclass to handler like native is and somehow define order of
handlers (like with addtask)?

Cheers,

> 
> Cheers,
> 
> -- 
> Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com



-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20120227/250364d6/attachment-0002.sig>


More information about the Openembedded-core mailing list