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 570327 - gnome-utils fails to build outside source tree
gnome-utils fails to build outside source tree
Status: RESOLVED OBSOLETE
Product: gnome-utils
Classification: Deprecated
Component: general
trunk
Other Linux
: Normal minor
: ---
Assigned To: gnome-utils Maintainers
gnome-utils Maintainers
Depends on:
Blocks: 569778
 
 
Reported: 2009-02-03 08:56 UTC by Theppitak Karoonboonyanan
Modified: 2011-10-06 19:04 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Summarized patch (1.04 KB, patch)
2009-02-03 09:06 UTC, Theppitak Karoonboonyanan
none Details | Review
Updated patch, using $(top_builddir) instead of $(builddir) (1.05 KB, patch)
2009-02-03 13:35 UTC, Theppitak Karoonboonyanan
none Details | Review
better yet, with $(builddir) totally omitted (1.03 KB, patch)
2009-02-03 16:32 UTC, Theppitak Karoonboonyanan
needs-work Details | Review
Fix the include flags instead (1.71 KB, patch)
2009-05-05 07:38 UTC, Theppitak Karoonboonyanan
none Details | Review
Add fixes for libeggsmclient and libgnomeui-deprecated (2.38 KB, patch)
2009-05-29 09:12 UTC, Theppitak Karoonboonyanan
none Details | Review
Updated patch, with autogen.sh change added (2.86 KB, patch)
2009-06-16 09:56 UTC, Theppitak Karoonboonyanan
none Details | Review

Description Theppitak Karoonboonyanan 2009-02-03 08:56:09 UTC
When building gnome-utils outside source tree, the following errors were found:

- In gnome-dictionary/src/, gdict-app.c fails to build due to missing gdict-enum-types.h and gdict-version.h:

---8<---
make[3]: Entering directory `/home/thep/build/gnome_svn/gnome-utils/gnome-dictionary/src'
gcc -DHAVE_CONFIG_H -I. -I/home/thep/vcs/gnome_svn/gnome-utils/gnome-dictionary/src -I../.. -DPREFIX=\""/home/gnome2"\" -DSYSCONFDIR=\""/home/gnome2/etc"\" -DLIBDIR=\""/home/gnome2/lib64"\" -DDATADIR=\""/home/gnome2/share"\" -DUIDATADIR=\""/home/gnome2/share/gnome-2.0/ui"\" -DPKGDATADIR=\""/home/gnome2/share/gnome-dictionary"\" -DGNOMELOCALEDIR=\""/home/gnome2/share/locale"\"    -I../../gnome-dictionary -I/home/thep/vcs/gnome_svn/gnome-utils/gnome-dictionary -DORBIT2=1 -pthread -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/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/usr/include/freetype2 -I/usr/include/libpng12   -I/home/gnome2/include/libglade-2.0 -I/home/gnome2/include/gtk-2.0 -I/home/gnome2/include/libxml2 -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/glib-2.0 -I/home/gnome2/lib64/glib-2.0/include -I/home/gnome2/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12    -g -O2 -I/home/gnome2/include -MT gnome_dictionary-gdict-app.o -MD -MP -MF .deps/gnome_dictionary-gdict-app.Tpo -c -o gnome_dictionary-gdict-app.o `test -f 'gdict-app.c' || echo '/home/thep/vcs/gnome_svn/gnome-utils/gnome-dictionary/src/'`gdict-app.c
In file included from /home/thep/vcs/gnome_svn/gnome-utils/gnome-dictionary/src/gdict-pref-dialog.h:27,
                 from /home/thep/vcs/gnome_svn/gnome-utils/gnome-dictionary/src/gdict-app.c:38:
/home/thep/vcs/gnome_svn/gnome-utils/gnome-dictionary/libgdict/gdict.h:33:30: error: gdict-enum-types.h: No such file or directory
/home/thep/vcs/gnome_svn/gnome-utils/gnome-dictionary/libgdict/gdict.h:34:27: error: gdict-version.h: No such file or directory
make[3]: *** [gnome_dictionary-gdict-app.o] Error 1
make[3]: Leaving directory `/home/thep/build/gnome_svn/gnome-utils/gnome-dictionary/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/thep/build/gnome_svn/gnome-utils/gnome-dictionary'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/thep/build/gnome_svn/gnome-utils'
make: *** [all] Error 2
---8<---

Both files are generated under $(top_builddir)/gnome-dictionary/libgdict/ So, libgdict/gdict.h cannot reach them with just #include "file.h" and '-I$(top_builddir)/gnome-dictionary' CFLAGS.

- In gsearchtool/, 'make install' fails due to missing schemas file:

---8<---
if test -z "" ; then \
                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/gnome-utils/gsearchtool/gnome-search-tool.schemas ; \
        fi
I/O warning : failed to load external entity "/home/thep/vcs/gnome_svn/gnome-utils/gsearchtool/gnome-search-tool.schemas"
Failed to open `/home/thep/vcs/gnome_svn/gnome-utils/gsearchtool/gnome-search-tool.schemas': No such file or directory
make[3]: *** [install-data-local] Error 1
make[3]: Leaving directory `/home/thep/build/gnome_svn/gnome-utils/gsearchtool'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory `/home/thep/build/gnome_svn/gnome-utils/gsearchtool'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/thep/build/gnome_svn/gnome-utils/gsearchtool'
make: *** [install-recursive] Error 1
---8<---

It tries to open the schemas file at $(srcdir), i.e. /home/thep/vcs/gnome_svn/... for my case, while the file is generated in $(builddir).
Comment 1 Theppitak Karoonboonyanan 2009-02-03 09:06:28 UTC
Created attachment 127818 [details] [review]
Summarized patch

This patch makes the build successful in my box.

For the first error, I don't think it makes much sense to change gnome_dictionary_CFLAGS in gnome-dictionary/src/Makefile.am. The details of file inclusion should be hidden under the libgdict/ subdir. So, I fix the #include instead. Only generated files are included differently from static files.
Comment 2 Theppitak Karoonboonyanan 2009-02-03 13:35:48 UTC
Created attachment 127834 [details] [review]
Updated patch, using $(top_builddir) instead of $(builddir)

Use $(top_builddir), as some automake versions do not provide $(builddir), e.g. Bug #570357.
Comment 3 Christian Persch 2009-02-03 14:25:01 UTC
Btw, builddir is always equal to '.' , so you can just omit it.
Comment 4 Theppitak Karoonboonyanan 2009-02-03 14:35:31 UTC
(In reply to comment #3)
> Btw, builddir is always equal to '.' , so you can just omit it.

Not for non-source-tree builds.

Comment 5 Theppitak Karoonboonyanan 2009-02-03 16:32:37 UTC
Created attachment 127853 [details] [review]
better yet, with $(builddir) totally omitted

(In reply to comment #4)
> (In reply to comment #3)
> > Btw, builddir is always equal to '.' , so you can just omit it.
> 
> Not for non-source-tree builds.

Having a break and I just got what you said.. Yes, why bothering adding the path?
Comment 6 Frederic Peters 2009-05-03 16:17:33 UTC
Anybody to review this fixed patch?
Comment 7 Emmanuele Bassi (:ebassi) 2009-05-04 07:22:07 UTC
Index: gnome-dictionary/libgdict/gdict.h
===================================================================
--- gnome-dictionary/libgdict/gdict.h	(revision 8392)
+++ gnome-dictionary/libgdict/gdict.h	(working copy)
@@ -30,7 +30,7 @@
 #include "gdict-speller.h"
 #include "gdict-strategy-chooser.h"
 #include "gdict-utils.h"
-#include "gdict-enum-types.h"
-#include "gdict-version.h"
+#include <libgdict/gdict-enum-types.h>
+#include <libgdict/gdict-version.h>

no, no, no. no. dear god, no. no.

this is utterly stupid. you should change the include path when building gnome-dictionary, not *ever* the global include header of a publicly installed library.

the second part of the patch looks all right, even though I would have used $(top_builddir)/gsearchtool instead.
Comment 8 Theppitak Karoonboonyanan 2009-05-05 07:38:38 UTC
Created attachment 133999 [details] [review]
Fix the include flags instead

(In reply to comment #7)

> no, no, no. no. dear god, no. no.
> 
> this is utterly stupid. you should change the include path when building
> gnome-dictionary, not *ever* the global include header of a publicly installed
> library.

Silly me. I must be in a hurry to make my whole build pass, and to file bugs against several packages, so I did't notice that it's an installed header.

> the second part of the patch looks all right, even though I would have used
> $(top_builddir)/gsearchtool instead.

Well, although it's not a practical benefit here, omitting the full path allows $(schema_DATA) to contain multiple files. I meaned, it's a safer form.
Comment 9 Theppitak Karoonboonyanan 2009-05-29 09:12:13 UTC
Created attachment 135546 [details] [review]
Add fixes for libeggsmclient and libgnomeui-deprecated

Update patch for recent build failures. Fixes for libeggsmclient and libgnomeui-deprecated are added.

* Error for libeggsmclient:

---8<---
In file included from /home/thep/vcs/gnome_git/gnome-utils/gsearchtool/gsearchtool-support.c:42:
/home/thep/vcs/gnome_git/gnome-utils/gsearchtool/gsearchtool-callbacks.h:36:25: error: eggsmclient.h: No such file or directory
In file included from /home/thep/vcs/gnome_git/gnome-utils/gsearchtool/gsearchtool-support.c:42:
/home/thep/vcs/gnome_git/gnome-utils/gsearchtool/gsearchtool-callbacks.h:39: error: expected ‘)’ before ‘*’ token
/home/thep/vcs/gnome_git/gnome-utils/gsearchtool/gsearchtool-callbacks.h:121: error: expected ‘)’ before ‘*’ token
---8<---

Headers for libeggsmclient are in srcdir, not builddir.

* Error for libgnomeui-deprecated

---8<---
make[3]: *** No rule to make target `/home/thep/vcs/gnome_git/gnome-utils/gsearchtool/libgnomeui-deprecated/libgnomeui-deprecated.la', needed by `gnome-search-tool'.  Stop.
---8<---

libgnomeui-deprecated.la is under builddir, not srcdir.
Comment 10 Theppitak Karoonboonyanan 2009-06-16 09:56:29 UTC
Created attachment 136708 [details] [review]
Updated patch, with autogen.sh change added

Updated patch, with recent conflict resolved.

Note that a fix for autogen.sh problem is also added. The error is:

---8<---
gnome-utils 2.27.3 configuration summary:

                   Compiler flags : -g -O2 -I/home/gnome2/include -g
                     Linker flags : -L/home/gnome2/lib64 
        Maintainer compiler flags : -Werror -Wall -Wshadow -Wcast-align -Wno-uninitialized -Wformat-security -Winit-self

                           prefix : /home/gnome2
                      sysconf dir : ${prefix}/etc
                          bin dir : ${exec_prefix}/bin
                         sbin dir : ${exec_prefix}/sbin
                         data dir : ${datarootdir}

        Debug messages (libgdict) : yes
         API Reference (libgdict) : no
  Logview built with ZLib support : yes

Now type `make' to compile GNOME Utilities
sed: can't read gtk-doc.make: No such file or directory
sed: can't read gtk-doc.make: No such file or directory
*** Error during phase configure of gnome-utils: ########## Error running /home/thep/vcs/gnome_git/gnome-utils/autogen.sh --prefix /home/gnome2 --libdir '/home/gnome2/lib64'  --disable-static --disable-gtk-doc  *** [1/1]
---8<---

In a clean builddir, gtk-doc.make is not available for the autogen.sh script. It needs to refer to $srcdir.
Comment 11 Cosimo Cecchi 2011-10-06 19:04:23 UTC
I don't think this is a problem anymore...anyway, gnome-utils as a meta-module is dissolving [1] now, so if it's still relevant for some of the split modules, should be filed as separate bugs.

[1] https://mail.gnome.org/archives/desktop-devel-list/2011-September/msg00121.html