Bug#622044: choosewm: FTBFS: configure:4871: error: Could not find gtk/gtk.h
Package: choosewm Version: 0.1.6-1 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu natty ubuntu-patch Hi Bernhard, The attached patch addresses this build failure by fixing choosewm to use the standard pkg-config interface for querying include paths, instead of hard-coding the values. These includes should never be hard-coded, as they are not guaranteed to be constant over time - indeed, they will be changing again very soon because of multiarch. Since you appear to be upstream for this package as well, I'll note that there are a few other oddities here: - you're testing in configure.ac for headers that you aren't using (glib.h, pango/pango.h, cairo/cairo.h, atk/atkobject.h). These checks are pretty redundant; either they are needed and the compiler will spit out an error soon enough, or they aren't and the warning is a red herring. - it's not normal to require users to pass CPPFLAGS manually to make - especially when you're using autoconf and building against libraries such as gtk, which provide a standard interface for this in the form of pkg-config (and for which standard autoconf macros - PKG_PROG_PKG_CONFIG and PKG_CHECK_MODULES - are readily available). I strongly encourage you as the upstream to use these interfaces in your upstream build system; they will make your software more portable and your package more robust against irrelevant library changes. -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developerhttp://www.debian.org/ slanga...@ubuntu.com vor...@debian.org diff -u choosewm-0.1.6/debian/rules choosewm-0.1.6/debian/rules --- choosewm-0.1.6/debian/rules +++ choosewm-0.1.6/debian/rules @@ -13,7 +13,7 @@ CFLAGS += -O2 endif LDFLAGS = -Wl,-z,defs -CPPFLAGS = -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo +CPPFLAGS = $(shell pkg-config --cflags gtk+-2.0 glib-2.0 pango atk cairo) ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) MAKEFLAGS += -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) diff -u choosewm-0.1.6/debian/control choosewm-0.1.6/debian/control --- choosewm-0.1.6/debian/control +++ choosewm-0.1.6/debian/control @@ -2,7 +2,7 @@ Section: x11 Priority: extra Maintainer: Bernhard R. Link brl...@debian.org -Build-Depends: debhelper (= 5), libglib2.0-dev, libpango1.0-dev, libatk1.0-dev, libgtk2.0-dev, libcairo2-dev +Build-Depends: debhelper (= 5), libglib2.0-dev, libpango1.0-dev, libatk1.0-dev, libgtk2.0-dev, libcairo2-dev, pkg-config Standards-Version: 3.8.4 Package: choosewm diff -u choosewm-0.1.6/debian/changelog choosewm-0.1.6/debian/changelog
Bug#622044: choosewm: FTBFS: configure:4871: error: Could not find gtk/gtk.h. Calling ./configure with CPPFLAGS containing -I/usr/include/gtk-2.0 and -I/usr/lib/gtk-2.0/include might help.
Source: choosewm Version: 0.1.6-1 Severity: serious Tags: wheezy sid User: debian...@lists.debian.org Usertags: qa-ftbfs-20110408 qa-ftbfs Justification: FTBFS on amd64 Hi, During a rebuild of all packages in sid, your package failed to build on amd64. Relevant part: gcc version 4.5.2 (Debian 4.5.2-8) configure:4340: $? = 0 configure:4329: x86_64-linux-gnu-gcc -V 5 x86_64-linux-gnu-gcc: '-V' option must have argument configure:4340: $? = 1 configure:4329: x86_64-linux-gnu-gcc -qversion 5 x86_64-linux-gnu-gcc: unrecognized option '-qversion' x86_64-linux-gnu-gcc: no input files configure:4340: $? = 1 configure:4344: checking whether we are using the GNU C compiler configure:4372: result: yes configure:4381: checking whether x86_64-linux-gnu-gcc accepts -g configure:4442: result: yes configure:4459: checking for x86_64-linux-gnu-gcc option to accept ISO C89 configure:4536: result: none needed configure:4558: checking dependency style of x86_64-linux-gnu-gcc configure:4668: result: gcc3 configure:4685: checking for g_object_new in -lgobject-2.0 configure:4710: x86_64-linux-gnu-gcc -o conftest -Wall -g -O2 -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -Wl,-z,defs conftest.c -lgobject-2.0 5 configure:4710: $? = 0 configure:4719: result: yes configure:4733: checking for g_free in -lglib-2.0 configure:4758: x86_64-linux-gnu-gcc -o conftest -Wall -g -O2 -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -Wl,-z,defs conftest.c -lglib-2.0 -lgobject-2.0 5 configure:4758: $? = 0 configure:4767: result: yes configure:4780: checking glib.h usability configure:4780: x86_64-linux-gnu-gcc -c -Wall -g -O2 -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo conftest.c 5 configure:4780: $? = 0 configure:4780: result: yes configure:4780: checking glib.h presence configure:4780: x86_64-linux-gnu-gcc -E -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo conftest.c configure:4780: $? = 0 configure:4780: result: yes configure:4780: checking for glib.h configure:4780: result: yes configure:4789: checking pango/pango.h usability configure:4789: x86_64-linux-gnu-gcc -c -Wall -g -O2 -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo conftest.c 5 configure:4789: $? = 0 configure:4789: result: yes configure:4789: checking pango/pango.h presence configure:4789: x86_64-linux-gnu-gcc -E -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo conftest.c configure:4789: $? = 0 configure:4789: result: yes configure:4789: checking for pango/pango.h configure:4789: result: yes configure:4799: checking cairo/cairo.h usability configure:4799: x86_64-linux-gnu-gcc -c -Wall -g -O2 -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo conftest.c 5 configure:4799: $? = 0 configure:4799: result: yes configure:4799: checking cairo/cairo.h presence configure:4799: x86_64-linux-gnu-gcc -E -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo conftest.c configure:4799: $? = 0 configure:4799: result: yes configure:4799: checking for cairo/cairo.h configure:4799: result: yes configure:4809: checking atk/atkobject.h usability configure:4809: x86_64-linux-gnu-gcc -c -Wall -g -O2 -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo conftest.c 5 configure:4809: $? = 0 configure:4809: result: yes configure:4809: checking atk/atkobject.h presence configure:4809: x86_64-linux-gnu-gcc -E -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo conftest.c configure:4809: $? = 0 configure:4809: result: yes configure:4809: checking for atk/atkobject.h configure:4809: result: yes configure:4819: checking for gdk_screen_get_height in -lgdk-x11-2.0 configure:4844: x86_64-linux-gnu-gcc -o conftest -Wall -g -O2 -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0