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 570174 - gdm fails to build outside source tree
gdm fails to build outside source tree
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
2.25.x
Other Linux
: Normal minor
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks: 569778
 
 
Reported: 2009-02-02 05:47 UTC by Theppitak Karoonboonyanan
Modified: 2010-06-17 00:35 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Summarized fixes (1.36 KB, patch)
2009-02-02 05:51 UTC, Theppitak Karoonboonyanan
reviewed Details | Review

Description Theppitak Karoonboonyanan 2009-02-02 05:47:44 UTC
When building gdm outside source tree, following error is found:

- in daemon/, gdm-session-worker.c fails to compile because the generated gdm-marshal.h cannot be found:

---8<---
make[3]: Entering directory `/home/thep/build/gnome_svn/gdm/daemon'
gcc -DHAVE_CONFIG_H -I. -I/home/thep/vcs/gnome_svn/gdm/daemon -I..  -I. -I.. -I/home/thep/vcs/gnome_svn/gdm/common -DAUTHDIR=\"/home/gnome2/var/gdm\" -DBINDIR=\"/home/gnome2/bin\" -DDATADIR=\"/home/gnome2/share\" -DDMCONFDIR=\"/home/gnome2/etc/dm\" -DGDMCONFDIR=\"/home/gnome2/etc/gdm\" -DGDMLOCALEDIR=\"/home/gnome2/etc/gdm\" -DLIBDIR=\"/home/gnome2/lib64\" -DLIBEXECDIR=\"/home/gnome2/libexec\" -DLOGDIR=\"/var/log/gdm\" -DPIXMAPDIR=\"/home/gnome2/share/pixmaps\" -DSBINDIR=\"/home/gnome2/sbin\" -DGNOMELOCALEDIR=\""/home/gnome2/share/locale"\" -DGDM_XAUTH_DIR=\"/home/gnome2/var/run/gdm\" -DGDM_DEFAULTS_CONF=\"/home/gnome2/share/gdm/defaults.conf\" -DGDM_CUSTOM_CONF=\"/home/gnome2/etc/gdm/custom.conf\" -DGDM_OLD_CONF=\"/home/gnome2/etc/gdm/gdm.conf\"  -I/home/gnome2/include/dbus-1.0 -I/home/gnome2/lib64/dbus-1.0/include -I/home/gnome2/include/glib-2.0 -I/home/gnome2/lib64/glib-2.0/include    -Wall -Wmissing-prototypes  -DG_ENABLE_DEBUG -DLANG_CONFIG_FILE=\"/home/gnome2/etc/sysconfig/i18n\"    -Wall         -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes         -Wnested-externs -Wpointer-arith         -Wcast-align -Wsign-compare -Wp,-D_FORTIFY_SOURCE=2         -g -O2 -I/home/gnome2/include -Wno-strict-aliasing -Wno-sign-compare -MT gdm-session-worker.o -MD -MP -MF .deps/gdm-session-worker.Tpo -c -o gdm-session-worker.o /home/thep/vcs/gnome_svn/gdm/daemon/gdm-session-worker.c
/home/thep/vcs/gnome_svn/gdm/daemon/gdm-session-worker.c:51:25: error: gdm-marshal.h: No such file or directory
make[3]: *** [gdm-session-worker.o] Error 1
make[3]: Leaving directory `/home/thep/build/gnome_svn/gdm/daemon'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/thep/build/gnome_svn/gdm/daemon'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/thep/build/gnome_svn/gdm'
make: *** [all] Error 2
---8<---

This is because gdm-marshal.h (in common/) is a generated file. So, it's generated under $(top_builddir)/common, so a -I flag is required for it, in addition to $(top_srcdir)/common.

The same applies to gui/simple-greeter/gdm-timer.c as well.
Comment 1 Theppitak Karoonboonyanan 2009-02-02 05:51:08 UTC
Created attachment 127748 [details] [review]
Summarized fixes

This patch allows non-source-dir build of gdm on my machine.

With this, I also patch common/Makefile.am so that the generated files (gdm-marshal.{c,h}) are not included in the distribution tarball.
Comment 2 Frederic Peters 2009-04-23 20:32:32 UTC
Ray, Jon, would you comment on this patch ?
Comment 3 Ray Strode [halfline] 2009-07-13 17:14:52 UTC
Patch seems okayish to me.

Theppitak, any particular reason you aren't including the generated files in the distributed tarball?

Comment 4 Theppitak Karoonboonyanan 2009-07-15 03:18:11 UTC
(In reply to comment #3)

> Theppitak, any particular reason you aren't including the generated files in
> the distributed tarball?

It makes building from VCS and from distributed tarball different. It makes this kind of bug not caught by just 'make distcheck'. And the generated files are cleaned by 'make clean' anyway. This can cause another surprise for tarball users.
Comment 5 William Jon McCann 2010-06-17 00:35:44 UTC
Looks ok I guess.  Pushed to master.  Thanks!