site  contact  subhomenews

No CUPS support in gtk+ in OpenEmbedded

November 29, 2017 — BarryK

Right now, I am in a state of great surprise. Testing Pyro64 0.6, printing does not work. In fact, it never has, for any Quirky builds from OpenEmbedded packages.

Despite the fact that 'cups' is available as a package in OE, gtk+ is hard-coded not to use it. Not only is cups missing from the DEPENDS variable in the gtk+ recipe, it is explicitly disabled with "--disable-cups".

There is isn't even a conditional test for existence of cups.

I kept looking at that, because I couldn't believe what I was seeing.

This situation is in the "pyro" release of OE/Yocto, same in the latest in master branch in github.

I have created gtk+_2.24.31.bbappend, with this in it:

PR = "r1"

# added the last line...
DEPENDS = "glib-2.0 pango atk jpeg libpng gdk-pixbuf-native \
cairo gdk-pixbuf \
cups libxinerama xinput pixman freetype fontconfig"

# original...
#EXTRA_OECONF = "--enable-xkb --disable-glibtest --disable-cups --disable-xinerama"

EXTRA_OECONF = "--enable-xkb --disable-glibtest --enable-cups --enable-xinerama \
--with-xinput=yes --enable-debug=minimum"

Added some more things that thought should be there. It compiles, not yet tested in a build.

EDIT 1:

Although OE/Yocto has the 'cups' package, it does not have 'cups-filters', which is required for printing. 'cups-filters' got split out of 'cups' sometime ago. OE actually has a recent 'cups', in which the 'cups-filters' is split out, yet there is no 'cups-filters', and I had to add it in my "meta-quirky" layer. Which shows just how much attention printing has been getting in OE/Yocto -- along with non-printing gtk+, I would say none at all.

i recompiled 'gtk+', no joy. Compiled 'cups', 'cups-filters' and 'poppler' manually in Pyro64, still no joy.

I examined /var/log/cups/error.log, and did a search with google. Found the same error was fixed here:

https://bugs.archlinux.org/task/51598

...by rolling back 'cups-filters' to 1.11.4. I am using 1.13.5, so I tried it, compiled 1.11.4, and hey, printing to my USB printer works!

Oh, what a dark art this CUPS printing is!

Now, need to put the fix into OE.

EDIT 2:

These are the fixes in OE, I confirmed they have fixed printing (Nov 30, 2017):

https://github.com/bkauler/oe-qky-src/commit/204bcebb97c794c15ff9244e15f604dbd1057628
https://github.com/bkauler/oe-qky-src/commit/af82f831c56ff876791ab8a1dfd8aa988ad70f66
https://github.com/bkauler/oe-qky-src/commit/5a8ab7623d4ac55e3d2a4865e5c5e7d28cb54fb4
https://github.com/bkauler/oe-qky-src/commit/3ed260dae6da4ee9bca0a7fbd49ea17b62c9d91b

Note, I am now doing a complete x86 32-bit (i686) recompile in OE.

Tags: oe