GNOME Bugzilla – Bug 617772
pango fails to build from git outside source tree
Last modified: 2010-07-23 03:16:10 UTC
By setting 'buildroot' in .jhbuildrc so that jhbuild builds stuffs from outside git source trees, pango fails to build, with the following messages: ---8<--- mv -f .deps/querymodules.Tpo .deps/querymodules.Po /bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -I/home/gnome2/include -Wall -L/home/gnome2/lib64 -o pango-querymodules querymodules.o libpangox-1.0.la libpangoxft-1.0.la libpangoft2-1.0.la libpango-1.0.la -pthread -L/home/gnome2/lib64 -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lrt -lglib-2.0 libtool: link: gcc -g -O2 -I/home/gnome2/include -Wall -o .libs/pango-querymodules querymodules.o -pthread -L/home/gnome2/lib64 ./.libs/libpangox-1.0.so ./.libs/libpangoxft-1.0.so ./.libs/libpangoft2-1.0.so ./.libs/libpango-1.0.so /home/gnome2/lib64/libgobject-2.0.so /home/gnome2/lib64/libgthread-2.0.so /home/gnome2/lib64/libgmodule-2.0.so -lrt /home/gnome2/lib64/libglib-2.0.so -pthread -Wl,-rpath -Wl,/home/gnome2/lib64 make[4]: Leaving directory `/home/thep/build/gnome_git/pango/pango' make[3]: Leaving directory `/home/thep/build/gnome_git/pango/pango' make[4]: *** No rule to make target `/home/thep/vcs/gnome_git/pango/pango/pango-enum-types.c', needed by `Pango-1.0.gir'. Stop. make[3]: *** [all-recursive] Error 1 make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/thep/build/gnome_git/pango/pango' make[1]: Leaving directory `/home/thep/build/gnome_git/pango' make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 ---8<--- It's this line that caused the problem: > Pango_1_0_gir_FILES = $(addprefix $(srcdir)/,$(pango_introspection_files)) $(pango_introspection_files) includes all $(libpango_1_0_la_SOURCES), including pango-enum-types.c and module-defs-lang.c, which are generated in $(builddir). So, adding prefix $(srcdir) here breaks it. Note that this kind of problem won't be caught by 'make distcheck', as the generated files are included in the distributed tarball. But this is not the case for building from VCS, such as with jhbuild.
Created attachment 160351 [details] [review] Split generated C source files This patch split the generated C source files so they can be treated differently, just like how the generated headers are done.
Created attachment 160554 [details] [review] Formatted patch with changelog Patch formatted with 'git format-patch'.
Created attachment 165551 [details] [review] Use g-i >= 0.6.14 According to bug 616425, Makefile.introspection now references introspection sources via VPATH. Generated and manual sources can now be equally accessed. Just remove the $(srcdir) prefix.