GNOME Bugzilla – Bug 570174
gdm fails to build outside source tree
Last modified: 2010-06-17 00:35: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.
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.
Ray, Jon, would you comment on this patch ?
Patch seems okayish to me. Theppitak, any particular reason you aren't including the generated files in the distributed tarball?
(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.
Looks ok I guess. Pushed to master. Thanks!