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 570080 - empathy fails to build outside source tree
empathy fails to build outside source tree
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: General
2.25.x
Other Linux
: Normal minor
: ---
Assigned To: empathy-maint
empathy-maint
Depends on:
Blocks: 569778
 
 
Reported: 2009-02-01 12:27 UTC by Theppitak Karoonboonyanan
Modified: 2009-02-02 11:43 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Summarized fixes (2.70 KB, patch)
2009-02-01 12:37 UTC, Theppitak Karoonboonyanan
none Details | Review

Description Theppitak Karoonboonyanan 2009-02-01 12:27:56 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):
  • File "/home/gnome2/share/pygobject/2.0/codegen/codegen.py", line 1717 in <module>
    sys.exit(main(sys.argv))
  • File "/home/gnome2/share/pygobject/2.0/codegen/codegen.py", line 1669 in main
    o = override.Overrides(arg)
  • File "/home/gnome2/share/pygobject/2.0/codegen/override.py", line 52 in __init__
    self.handle_file(filename)
  • File "/home/gnome2/share/pygobject/2.0/codegen/override.py", line 57 in handle_file
    fp = open(filename, 'r')
IOError: [Errno 2] No such file or directory: 'pyempathy.override'
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).)
Comment 1 Theppitak Karoonboonyanan 2009-02-01 12:37:45 UTC
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.
Comment 2 Cosimo Cecchi 2009-02-02 11:43:00 UTC
Thanks for the patch, I committed it to the "to-merge" branch and it will be there in 2.25.90. Closing as FIXED.