GNOME Bugzilla – Bug 617756
glib fails to build from git outside source tree
Last modified: 2010-05-12 20:58:44 UTC
By setting 'buildroot' in .jhbuildrc so that jhbuild builds stuffs from outside git source tree, glib fails to build, with the following messages: ---8<--- make[3]: Entering directory `/home/thep/build/gnome_git/glib/gthread/tests' gcc -DHAVE_CONFIG_H -I. -I/home/thep/vcs/gnome_git/glib/gthread/tests -I../.. -g -I/home/thep/vcs/gnome_git/glib -I/home/thep/vcs/gnome_git/glib/glib -DG_DISABLE_CAST_CHECKS -DG_DISABLE_SINGLE_INCLUDES -pthread -g -O2 -I/home/gnome2/include -Wall -MT 1bit-mutex.o -MD -MP -MF .deps/1bit-mutex.Tpo -c -o 1bit-mutex.o /home/thep/vcs/gnome_git/glib/gthread/tests/1bit-mutex.c mv -f .deps/1bit-mutex.Tpo .deps/1bit-mutex.Po /bin/sh ../../libtool --tag=CC --mode=link gcc -g -O2 -I/home/gnome2/include -Wall -L/home/gnome2/lib64 -o 1bit-mutex 1bit-mutex.o ../../glib/libglib-2.0.la ../../gthread/libgthread-2.0.la ../../gthread/libgthread-2.0.la libtool: link: gcc -g -O2 -I/home/gnome2/include -Wall -o .libs/1bit-mutex 1bit-mutex.o -L/home/gnome2/lib64 ../../glib/.libs/libglib-2.0.so ../../gthread/.libs/libgthread-2.0.so -Wl,-rpath -Wl,/home/gnome2/lib64 gcc -DHAVE_CONFIG_H -I. -I/home/thep/vcs/gnome_git/glib/gthread/tests -I../.. -g -I/home/thep/vcs/gnome_git/glib -I/home/thep/vcs/gnome_git/glib/glib -DG_DISABLE_CAST_CHECKS -DG_DISABLE_SINGLE_INCLUDES -pthread -DTEST_EMULATED_FUTEX -g -O2 -I/home/gnome2/include -Wall -MT 1bit_emufutex-1bit-mutex.o -MD -MP -MF .deps/1bit_emufutex-1bit-mutex.Tpo -c -o 1bit_emufutex-1bit-mutex.o `test -f '1bit-mutex.c' || echo '/home/thep/vcs/gnome_git/glib/gthread/tests/'`1bit-mutex.c In file included from /home/thep/vcs/gnome_git/glib/gthread/tests/1bit-mutex.c:42: /home/thep/vcs/gnome_git/glib/glib/gbitlock.c:32:20: error: galias.h: No such file or directory /home/thep/vcs/gnome_git/glib/glib/gbitlock.c:300:23: error: galiasdef.c: No such file or directory ---8<--- gthread/tests/1bit-mutex.c includes <glib/gbitlock.c> from $(top_srcdir)/glib, which in turns includes "galias.h" and "galiasdef.c", which are generated sources. However, these files were generated in $(top_builddir)/glib, which are not mentioned in CPP flags. Note that this is not caught by 'make distcheck' because the generated sources are already included in the distributed tarball, thanks to BUILT_EXTRA_DIST in $(top_srcdir)/glib/Makefile.am. But this is not the case for building from VCS, especially by jhbuild.
Created attachment 160341 [details] [review] Add builddir include This patch adds $(top_builddir)/glib to INCLUDES in gthread/tests/Makefile.am, so that the generated files can be reached.
This has already been added in git
The bug still exists in glib-2-24 branch, which this bug is reported against. (Yeah, it had been fixed in master. I've just checked and found that.)
*** This bug has been marked as a duplicate of bug 616216 ***