Skip to contentSkip to conversation

Phil Blundell : gtk+: build gtk-demo and package it appropriately

oe-commits Martin Jansa 6 participants 12 messages Mar 6, 2010 – Mar 10, 2010 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 9 lines · git version control

Module: openembedded.git
Branch: org.openembedded.dev
Commit: a3b0920d0cc2cecac9eea4993ad18a64b207d7af
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=a3b0920d0cc2cecac9eea4993ad18a64b207d7af

Author: Phil Blundell <[email protected]>
Date:   Thu Mar  4 22:56:33 2010 +0000

gtk+: build gtk-demo and package it appropriately

Hi,

after this patch I get build failure in those re-enable demos:

| make[2]: Entering directory `/OE/tmpdir-dev-shr/work/armv4t-oe-linux-gnueabi/gtk+-2.18.6-r8.3/gtk+-2.18.6/demos' | /OE/tmpdir-dev-shr/staging/x86_64-linux/usr/bin/gdk-pixbuf-csource
--raw --build-list \

|               apple_red  ./apple-red.png      \
|                 gnome_foot ./gnome-foot.png   \
|         > test-inline-pixbufs.h                               \
|       || (rm -f test-inline-pixbufs.h && false)
| failed to load "./apple-red.png": Couldn't recognize the image file

format for file './apple-red.png'
| make[2]: *** [test-inline-pixbufs.h] Error 1
| make[2]: Leaving directory `/OE/tmpdir-dev-shr/work/armv4t-oe-linux-gnueabi/gtk+-2.18.6-r8.3/gtk+-2.18.6/demos' | make[1]: *** [all-recursive] Error 1
| make[1]: Leaving directory `/OE/tmpdir-dev-shr/work/armv4t-oe-linux-gnueabi/gtk+-2.18.6-r8.3/gtk+-2.18.6'

| make: *** [all] Error 2
| FATAL: oe_runmake failed
| ERROR: Function do_compile failed

bitbake@jama ~/build.dev.shr.gta $ /OE/tmpdir-dev-shr/staging/x86_64-linux/usr/bin/gdk-pixbuf-csource -v gdk-pixbuf-csource version 2.12.11

seems like that version from
recipes/gtk+/gdk-pixbuf-csource-native_2.12.11.bb

and gtk+-native explicitly removes this
recipes/gtk+/gtk+_2.18.6.bb:

do_install_virtclass-native () {
        autotools_do_install
        find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \;
        rm ${D}${bindir}/gdk-pixbuf-csource
        echo "going native!"
}

So I guess that
find ${D}${libdir} -name "libpixbufloader-*.so" -exec rm \{\} \; in gtk+-native could help gdk-pixbuf-csource-native to work

but replacing gdk-pixbuf-csource-native with gtk+-native would be much better

There is also bug when you rebuild gdk-pixbuf-csource-native and then don't rebuild gtk+-native to fix pkgconfig gtk.
http://bugs.openembedded.org/show_bug.cgi?id=5405

Please GTK/OE gurus fix this, thanks.

#2 lore raw
Quoted 5 lines · Martin Jansa

So I guess that
find ${D}${libdir} -name "libpixbufloader-*.so" -exec rm \{\} \; in gtk+-native could help gdk-pixbuf-csource-native to work

but replacing gdk-pixbuf-csource-native with gtk+-native would be much better

No, it wouldn't, that recipe is useful to people who don't want to build a whole native gtk/X stack ;-).

Ideally, gtk+-native should just replace all the gdk-pixbuf-csource package but I don't think we can do that currently :(

Quoted 3 lines

There is also bug when you rebuild gdk-pixbuf-csource-native and then don't rebuild gtk+-native to fix pkgconfig gtk.
http://bugs.openembedded.org/show_bug.cgi?id=5405

gdk-pixbuf-csouce should not be installing a .pc file.

Cheers,

Richard

#3 lore raw
Quoted 10 lines · Richard Purdie
Quoted 5 lines · Martin Jansa

So I guess that
find ${D}${libdir} -name "libpixbufloader-*.so" -exec rm \{\} \; in gtk+-native could help gdk-pixbuf-csource-native to work

but replacing gdk-pixbuf-csource-native with gtk+-native would be much better

No, it wouldn't, that recipe is useful to people who don't want to build a whole native gtk/X stack ;-).

Quoted 8 lines

Ideally, gtk+-native should just replace all the gdk-pixbuf-csource package but I don't think we can do that currently :(

Quoted 3 lines

There is also bug when you rebuild gdk-pixbuf-csource-native and then don't rebuild gtk+-native to fix pkgconfig gtk.
http://bugs.openembedded.org/show_bug.cgi?id=5405

gdk-pixbuf-csouce should not be installing a .pc file.

So, what would be the proper fix? I'm blocked at the moment with this gtk+/apple-red.png issue, where gtk+ is being pulled by gstreamer... Thanks in advance for any help or suggestions.

Signature · 1 line
Denys
#4 lore raw
Quoted 3 lines · Denys Dmytriyenko

So, what would be the proper fix? I'm blocked at the moment with this gtk+/apple-red.png issue, where gtk+ is being pulled by gstreamer... Thanks in advance for any help or suggestions.

I think the patch that Graeme posted, or a subset of it, is at least part of the proper fix. I'll check that in this evening. With that, using gtk+ as the provider for gdk-pixbuf-csource-native ought to do what you need.

Getting the standalone g-p-c-n to DTRT will require a bit more fiddling but I don't think it should be very hard.

p.

#5 lore raw
Quoted 9 lines · Phil Blundell
Quoted 3 lines · Denys Dmytriyenko

So, what would be the proper fix? I'm blocked at the moment with this gtk+/apple-red.png issue, where gtk+ is being pulled by gstreamer... Thanks in advance for any help or suggestions.

I think the patch that Graeme posted, or a subset of it, is at least part of the proper fix.  I'll check that in this evening.  With that, using gtk+ as the provider for gdk-pixbuf-csource-native ought to do what you need.

Prior to the above patch, gtk+ would build for me with no problems. Afterwards I get:

| Making all in demos
| make[2]: Entering directory `/home/sakoman/source/omap3-oe/tmp/work/armv7a-angstrom-linux-gnueabi/gtk+-2.18.6-r8.3/gtk+-2.18.6/demos' | /home/sakoman/source/omap3-oe/tmp/staging/i686-linux/usr/bin/gdk-pixbuf-csource
--raw --build-list \

| 	        apple_red  ./apple-red.png	\
|                 gnome_foot ./gnome-foot.png	\
|         > test-inline-pixbufs.h				\
| 	|| (rm -f test-inline-pixbufs.h && false)
|
| (process:4835): GdkPixbuf-WARNING **: Cannot open pixbuf loader

module file '/home/sakoman/source/omap3-oe/tmp/staging/i686-linux/etc/gtk-2.0/gdk-pixbuf.loaders':
No such file or directory
| failed to load "./apple-red.png": Couldn't recognize the image file
format for file './apple-red.png'
| make[2]: *** [test-inline-pixbufs.h] Error 1

So for me it seems to have triggered the problem it was trying to fix!

Steve

Quoted 12 lines

Getting the standalone g-p-c-n to DTRT will require a bit more fiddling but I don't think it should be very hard.

p.

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#6 lore raw
Quoted 1 line · Steve Sakoman

So for me it seems to have triggered the problem it was trying to fix!

Doh. That's not so good.

Please try the patch at http://pastebin.ca/1832243 and see if the situation improves for you.

p.

#7 lore raw
Quoted 7 lines · Phil Blundell
Quoted 1 line · Steve Sakoman

So for me it seems to have triggered the problem it was trying to fix!

Doh.  That's not so good.

Please try the patch at http://pastebin.ca/1832243 and see if the situation improves for you.

Sorry, I get the same error:

| Making all in demos
| make[2]: Entering directory `/home/sakoman/source/omap3-oe/tmp/work/armv7a-angstrom-linux-gnueabi/gtk+-2.18.6-r8.3/gtk+-2.18.6/demos' | /home/sakoman/source/omap3-oe/tmp/staging/i686-linux/usr/bin/gdk-pixbuf-csource
--raw --build-list \

| 	        apple_red  ./apple-red.png	\
|                 gnome_foot ./gnome-foot.png	\
|         > test-inline-pixbufs.h				\
| 	|| (rm -f test-inline-pixbufs.h && false)
|
| (process:22315): GdkPixbuf-WARNING **: Cannot open pixbuf loader

module file '/home/sakoman/source/omap3-oe/tmp/staging/i686-linux/etc/gtk-2.0/gdk-pixbuf.loaders':
No such file or directory
| failed to load "./apple-red.png": Couldn't recognize the image file
format for file './apple-red.png'
| make[2]: *** [test-inline-pixbufs.h] Error 1

Steve

#8 lore raw
Quoted 10 lines · Steve Sakoman
Quoted 7 lines · Phil Blundell
Quoted 1 line · Steve Sakoman

So for me it seems to have triggered the problem it was trying to fix!

Doh. That's not so good.

Please try the patch at http://pastebin.ca/1832243 and see if the situation improves for you.

Sorry, I get the same error:

Did you clean and rebuild gtk+-native? I forgot to mention that this is necessary.

p.

#9 lore raw
Quoted 2 lines · Phil Blundell

Did you clean and rebuild gtk+-native?  I forgot to mention that this is necessary.

Yes, I did:

bitbake -c clean gtk+ gtk+-native gdk-pixbuf-csource-native bitbake gtk+

My repo is at current top of tree with your gtk+.inc patch and gtk+_2.18.6.bb unchanged:

$ git diff recipes/gtk+/gtk+.inc
recipes/gtk+/gtk+.inc +17 -0
index 268657b..5431c76 100644
@@ -66,6 +66,23 @@ do_install_append () {
        rm -f ${D}${libdir}/gtk-2.0/*/*.la ${D}${libdir}/gtk-2.0/${LIBV}/*/*.la
 }
 
+do_install_virtclass-native () {
+        autotools_do_install
+
+       mkdir -p ${D}${libdir}/gtk-2.0/include
+       install -m 0644 gdk/gdkconfig.h ${D}${libdir}/gtk-2.0/include/gdkconfig.
+       # Copy over all headers, since the maemo stuff needs access to the priva
+       cp gtk/*.h ${D}${includedir}/gtk-2.0/gtk/
+
+       install -m 0644 m4macros/gtk-2.0.m4 ${STAGING_DATADIR}/aclocal/
+
+       install -d ${D}${sysconfdir}/gtk-2.0
+       rm -f ${D}${libdir}/gtk-2.0/*/*.la ${D}${libdir}/gtk-2.0/${LIBV}/*/*.la
+
+        mkdir -p "${D}${sysconfdir}/gtk-2.0"
+        ${B}/gdk-pixbuf/gdk-pixbuf-query-loaders > "${D}${sysconfdir}/gtk-2.0/g
+}
+
 postinst_prologue() {
 if [ "x$D" != "x" ]; then
   exit 1
$ git diff recipes/gtk+/gtk+_2.18.6.bb
$
#10 lore raw
Quoted 2 lines · Steve Sakoman

My repo is at current top of tree with your gtk+.inc patch and gtk+_2.18.6.bb unchanged:

Ah, I remember now, you need a patch to base.bbclass as well to make it stage the files from etc/. Try this:

classes/base.bbclass +1 -0
index bbc1cc7..2327c1e 100644
@@ -1100,6 +1100,7 @@ sysroot_stage_dirs() {
                sysroot_stage_libdir $from${base_libdir} $to${STAGING_DIR_HOST}${base_libdir}
        fi
        sysroot_stage_dir $from${datadir} $to${STAGING_DATADIR}
+        sysroot_stage_dir $from${sysconfdir} $to${sysconfdir}
 }
 
 sysroot_stage_all() {

p.

#11 lore raw
Quoted 2 lines · Phil Blundell

Ah, I remember now, you need a patch to base.bbclass as well to make it stage the files from etc/.  Try this:

I must be cursed :-(

Still no luck. gtk+-native builds, but gtk+ still fails with the apple_red issue.

Here is my diff from top of tree:

classes/base.bbclass +1 -0
index bbc1cc7..a94fa27 100644
@@ -1100,6 +1100,7 @@ sysroot_stage_dirs() {
 		sysroot_stage_libdir $from${base_libdir} $to${STAGING_DIR_HOST}${base_libdir}
 	fi
 	sysroot_stage_dir $from${datadir} $to${STAGING_DATADIR}
+	sysroot_stage_dir $from${sysconfdir} $to${sysconfdir}
 }
 
 sysroot_stage_all() {
recipes/gtk+/gtk+.inc +5 -0
index 268657b..5431c76 100644
@@ -66,6 +66,23 @@ do_install_append () {
 	rm -f ${D}${libdir}/gtk-2.0/*/*.la ${D}${libdir}/gtk-2.0/${LIBV}/*/*.la
 }
 
+do_install_virtclass-native () {
+        autotools_do_install
+
+       mkdir -p ${D}${libdir}/gtk-2.0/include
+       install -m 0644 gdk/gdkconfig.h

${D}${libdir}/gtk-2.0/include/gdkconfig.h
+ # Copy over all headers, since the maemo stuff needs access to
the private api. *sigh*
+ cp gtk/*.h ${D}${includedir}/gtk-2.0/gtk/
+
+ install -m 0644 m4macros/gtk-2.0.m4 ${STAGING_DATADIR}/aclocal/
+
+ install -d ${D}${sysconfdir}/gtk-2.0
+ rm -f ${D}${libdir}/gtk-2.0/*/*.la ${D}${libdir}/gtk-2.0/${LIBV}/*/*.la
+
+ mkdir -p "${D}${sysconfdir}/gtk-2.0"
+ ${B}/gdk-pixbuf/gdk-pixbuf-query-loaders >
"${D}${sysconfdir}/gtk-2.0/gdk-pixbuf.loaders"
+}
+
postinst_prologue() {
if [ "x$D" != "x" ]; then
exit 1

Thanks for helping!

Steve

#12 lore raw
Quoted 9 lines · Steve Sakoman
Quoted 2 lines · Phil Blundell

Ah, I remember now, you need a patch to base.bbclass as well to make it stage the files from etc/. Try this:

I must be cursed :-(

Still no luck. gtk+-native builds, but gtk+ still fails with the apple_red issue.

Drat. It does seem like you must be cursed.

Maybe you could try poking around in your working tree and see if you can figure out why gdk-pixbuf.loaders isn't getting installed into staging. What ought to happen is that it is generated by gtk+-native during do_install() and then copied from there into the native sysroot where gtk+ expects to find it during the build.

p.