GNOME Bugzilla – Bug 569977
ekiga fails to build from outside source tree
Last modified: 2009-01-31 16:47:30 UTC
When building ekiga from outside source tree, the following errors are found: - In lib/engine/components/hal-dbus/, the generated file hal-marshal.c is not found: ---8<--- make[7]: Entering directory `/home/thep/build/gnome_svn/ekiga/lib/engine/components/hal-dbus' make[7]: *** No rule to make target `/home/thep/vcs/gnome_svn/ekiga/lib/engine/components/hal-dbus/hal-marshal.c', needed by `hal-marshal.lo'. Stop. make[7]: Leaving directory `/home/thep/build/gnome_svn/ekiga/lib/engine/components/hal-dbus' make[6]: *** [all] Error 2 ---8<--- This is because 'libgmhal_dbus_la_SOURCES' refers to $(hal_dir)/hal-marshal.c, where $(hal_dir) is under $(top_srcdir). But hal-marshal.c is a generated file, so it's actually under $(top_builddir) for non-source-dir builds. The same applies to hal-marshal.h. - In src/, the dbus-helper-stub.h file cannot be generated: ---8<--- make[2]: Entering directory `/home/thep/build/gnome_svn/ekiga/src' /bin/sh ../libtool --mode=execute dbus-binding-tool --prefix=helper --mode=glib-server --output=dbus-helper/dbus-helper-stub.h /home/thep/vcs/gnome_svn/ekiga/src/dbus-helper/dbus-helper-stub.xml Couldn't open temporary file: No such file or directory make[2]: *** [dbus-helper/dbus-helper-stub.h] Error 1 make[2]: Leaving directory `/home/thep/build/gnome_svn/ekiga/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/thep/build/gnome_svn/ekiga' make: *** [all] Error 2 ---8<--- This is because, under $(top_builddir)/src, the dbus-helper/ subdir was not created by the configure script, as it's not handled by normal autotools mechanism.
Thanks for the detailed report ; let me work on it (again...).
Note that I've been preparing a patch for this. Just finalizing something..
Oh... then I'll wait.
Uh... I just tried and had no problem building ekiga out-of-tree... I ran "make distclean" in my tree, then "mkdir /tmp/toto; cd /tmp/toto", then "~/Logiciels/Ekiga/ekiga/autogen.sh --prefix=/usr", finally "make"... and I have everything as normal. What did you do when it didn't work?
I built from SVN, not from tarball.
(In reply to comment #5) > I built from SVN, not from tarball. Umm.. Let me add that even from SVN, 'make distclean' is not clean enough in this case. You may need a clean checkout to reproduce it. In the Makefiles, the generated files are not cleaned. So, you will still have the files left under $(srcdir). In case of release tarballs, the generated files are shipped. So, it won't reproduced, either.
Created attachment 127633 [details] [review] Fix the Makefiles The change for lib/engine/components/hal-dbus/Makefile.am is quite straightforward: refer to $(top_builddir) version instead. Note that with the generated files listed under foo_SOURCES, they are distributed in the tarballs. So, I split them out into a nodist target. And I also add CLEANFILES so that 'make clean' cleans them. (Well, if you mean to distribute them, just merge them back, and use MAINTAINERCLEANFILES instead of CLEANFILES.) For src/Makefile.am, I add the 'build-subdir-stamp' target for one-time creation of the dbus-helper/ subdir. And also clean the stamp, along with the built sources. Note also that the '-I$(top_builddir)' is not sufficient to reach the "dbus-stub.h" under src/dbus-helper/ subdir. So, I append the path to it. I do this instead of adding a new entry because '-I$(top_srcdir)' is always supplied by autotools already (so the generated "config.h" is always reachable, for example).
(In reply to comment #6) Oooohhh... that explains why you see the out-of-tree build as broken although I already worked to make it succeed! Thanks, I applied your patch as-is.