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.


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: 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.


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

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

Tags: oe