After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 617756 - glib fails to build from git outside source tree
glib fails to build from git outside source tree
Status: RESOLVED DUPLICATE of bug 616216
Product: glib
Classification: Platform
Component: general
2.25.x
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 569778
 
 
Reported: 2010-05-05 13:53 UTC by Theppitak Karoonboonyanan
Modified: 2010-05-12 20:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add builddir include (479 bytes, patch)
2010-05-05 13:58 UTC, Theppitak Karoonboonyanan
none Details | Review

Description Theppitak Karoonboonyanan 2010-05-05 13:53:17 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.
Comment 1 Theppitak Karoonboonyanan 2010-05-05 13:58:14 UTC
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.
Comment 2 Matthias Clasen 2010-05-09 01:24:10 UTC
This has already been added in git
Comment 3 Theppitak Karoonboonyanan 2010-05-09 01:38:57 UTC
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.)
Comment 4 Javier Jardón (IRC: jjardon) 2010-05-12 20:58:44 UTC

*** This bug has been marked as a duplicate of bug 616216 ***