GNOME Bugzilla – Bug 570080
empathy fails to build outside source tree
Last modified: 2009-02-02 11:43:00 UTC
When building empathy outside source tree, following errors were found: - In python/pyempathy and python/pyempathygtk, pygobject-codegen-2.0 complains that pyempathy.override is missing: ---8<--- Making all in pyempathy make[3]: Entering directory `/home/thep/build/gnome_svn/empathy/python/pyempathy' pygobject-codegen-2.0 \ --prefix empathy \ --register `pkg-config --variable=defsdir pygtk-2.0`/gdk-types.defs \ --register `pkg-config --variable=defsdir pygtk-2.0`/gtk-types.defs \ --override pyempathy.override \ pyempathy.defs > pyempathy.c Traceback (most recent call last):
+ Trace 212085
sys.exit(main(sys.argv))
o = override.Overrides(arg)
self.handle_file(filename)
fp = open(filename, 'r')
make[3]: *** [pyempathy.c] Error 1 make[3]: Leaving directory `/home/thep/build/gnome_svn/empathy/python/pyempathy' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/thep/build/gnome_svn/empathy/python' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/thep/build/gnome_svn/empathy' make: *** [all] Error 2 ---8<--- This is because 'pyempathy.override' is in $(srcdir). So, when making outside $(srcdir), it's lost unless its path is given. - Then, after fixing the previous issue, it still fails to build, due to some missing include: ---8<--- gcc -DHAVE_CONFIG_H -I. -I/home/thep/vcs/gnome_svn/empathy/python/pyempathy -I../.. -I. -I/home/thep/vcs/gnome_svn/empathy/libempathy -I/home/thep/vcs/gnome_svn/empathy -DDATADIR=\"/home/gnome2/share\" -DORBIT2=1 -pthread -I/home/gnome2/include/pygtk-2.0 -I/home/gnome2/include/glib-2.0 -I/home/gnome2/lib64/glib-2.0/include -I/home/gnome2/include/gconf/2 -I/home/gnome2/include/orbit-2.0 -I/home/gnome2/include/dbus-1.0 -I/home/gnome2/lib64/dbus-1.0/include -I/home/gnome2/include/libxml2 -I/home/gnome2/include/telepathy-1.0 -I/home/gnome2/include/gtk-2.0 -I/home/gnome2/lib64/gtk-2.0/include -I/home/gnome2/include/atk-1.0 -I/home/gnome2/include/cairo -I/home/gnome2/include/pango-1.0 -I/home/gnome2/include/pixman-1 -I/home/gnome2/include/libglade-2.0 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/python2.5 -I/usr/include/python2.5 -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wchar-subscripts -Wnested-externs -Wpointer-arith -Wno-sign-compare -Wno-pointer-sign -Wformat -Werror -g -O2 -I/home/gnome2/include -MT pyempathy.lo -MD -MP -MF .deps/pyempathy.Tpo -c pyempathy.c -fPIC -DPIC -o .libs/pyempathy.o /home/thep/vcs/gnome_svn/empathy/python/pyempathy/pyempathy.override:16:32: error: empathy-enum-types.h: No such file or directory /home/thep/vcs/gnome_svn/empathy/python/pyempathy/pyempathy.c: In function ‘_wrap_empathy_contact_get_capabilities’: /home/thep/vcs/gnome_svn/empathy/python/pyempathy/pyempathy.c:575: error: ‘EMPATHY_TYPE_CAPABILITIES’ undeclared (first use in this function) /home/thep/vcs/gnome_svn/empathy/python/pyempathy/pyempathy.c:575: error: (Each undeclared identifier is reported only once ... <many irrelevant errors snipped> ... make[4]: *** [pyempathy.lo] Error 1 make[4]: Leaving directory `/home/thep/build/gnome_svn/empathy/python/pyempathy' make[3]: *** [all] Error 2 make[3]: Leaving directory `/home/thep/build/gnome_svn/empathy/python/pyempathy' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/thep/build/gnome_svn/empathy/python' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/thep/build/gnome_svn/empathy' make: *** [all] Error 2 ---8<--- 'empathy-enum-types.h' appears to be a generated file. So, it's located under $(top_builddir) root. But no such -I option is given. Both errors above apply to python/pyempathygtk/ as well. - At 'make install' stage, in data/ subdir, it fails to install schemas because the file is missing: ---8<--- make[2]: Entering directory `/home/thep/build/gnome_svn/empathy/data' make[3]: Entering directory `/home/thep/build/gnome_svn/empathy/data' make[3]: Nothing to be done for `install-exec-am'. if test -z "" ; then \ for p in empathy.schemas ; do \ GCONF_CONFIG_SOURCE=xml:merged:/home/gnome2/etc/gconf/gconf.xml.defaults /home/gnome2/bin/gconftool-2 --makefile-install-rule /home/thep/vcs/gnome_svn/empathy/data/$p ; \ done \ fi I/O warning : failed to load external entity "/home/thep/vcs/gnome_svn/empathy/data/empathy.schemas" Failed to open `/home/thep/vcs/gnome_svn/empathy/data/empathy.schemas': No such file or directory make[3]: *** [install-data-local] Error 1 make[3]: Leaving directory `/home/thep/build/gnome_svn/empathy/data' make[2]: *** [install-am] Error 2 make[2]: Leaving directory `/home/thep/build/gnome_svn/empathy/data' make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory `/home/thep/build/gnome_svn/empathy/data' make: *** [install-recursive] Error 1 ---8<--- This is because the *.schemas files are generated files. So, they must be referenced from $(top_builddir) path. (In my case above, '/home/thep/vcs/gnome_svn/empathy/' is $(top_srcdir).)
Created attachment 127692 [details] [review] Summarized fixes This patch summarizes what I have done to make it build off-source-dir in my machine. Note that I also separate the generated sources from distribution, so that 'make dist' won't include them.
Thanks for the patch, I committed it to the "to-merge" branch and it will be there in 2.25.90. Closing as FIXED.