gtk 2.24.24 cross-gotcha



Just in case anyone else falls into this: there's a potential gotcha if you're cross-compiling gtk for (say) Windows on Linux. It took me a while to figure out why the Windows version of my app didn't have any GTK icons any more!

If gtk2 on the Linux host is updated to 2.24.24, and you're cross-building gtk2 < 2.24.24 you will end up with a build that doesn't include any of the "built-in" GTK icons.

This is because of changed behavior of the gtk-update-icon-cache binary: by default it no longer includes image data when generating a cache. But generating such a cache using host tools in part of the cross-build process (the result goes into gtkbuiltincache.h).

This is fixed (I believe) for a cross-build of 2.24.24 itself. If for whatever reason you're cross-building an earlier version you can try applying the patch at

http://osdir.com/ml/commits.gnome/2014-06/msg04980.html

and rerunning autoconf, or (what I did)

cd /usr/bin
mv gtk-update-icon-cache gtk-update-icon-cache.bin

and put in /usr/bin a shell script called gtk-update-icon-cache which calls gtk-update-icon-cache.bin with the new (and as yet undocumented) option --include-image-data:

<script>
#!/bin/sh
gtk-update-icon-cache.bin --include-image-data $@
</script>

However, this may not be the behavior you want for "native" use of gtk-update-icon-cache on Linux. (It's the behavior you've had up till now but is no longer recommended.)

Actually I wish that the 2.24 branch of GTK were not a domain of experimentation.

--
Allin Cottrell
Department of Economics
Wake Forest University


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]