GNOME Bugzilla – Bug 414159
Fails to build when srcdir != builddir
Last modified: 2014-03-24 16:38:45 UTC
Hi, Building sound-juicer out of tree from SVN results in: ... gcc -DHAVE_CONFIG_H -I. -I.. -I/home/lool/jhbuild-gnome-2.18/checkout/sound-juic er/tests -I/home/lool/jhbuild-gnome-2.18/checkout/sound-juicer/libjuicer -I/hom e/lool/jhbuild-gnome-2.18/checkout/sound-juicer/src -Wall -Wmissing-prototype s -Wnested-externs -Wpointer-arith -Wno-sign-compare -I/home/lool/jhbuild-gnome -2.18/prefix/include -pthread -I/home/lool/jhbuild-gnome-2.18/prefix/include/g streamer-0.10 -I/home/lool/jhbuild-gnome-2.18/prefix/include/glib-2.0 -I/home/lo ol/jhbuild-gnome-2.18/prefix/lib/glib-2.0/include -I/home/lool/jhbuild-gnome-2.1 8/prefix/include/libxml2 -DORBIT2=1 -pthread -I/home/lool/jhbuild-gnome-2.18/p refix/include/gnome-media -I/home/lool/jhbuild-gnome-2.18/prefix/include/gconf/2 -I/home/lool/jhbuild-gnome-2.18/prefix/include/gtk-2.0 -I/home/lool/jhbuild-gno me-2.18/prefix/include/libglade-2.0 -I/home/lool/jhbuild-gnome-2.18/prefix/inclu de/libgnome-2.0 -I/home/lool/jhbuild-gnome-2.18/prefix/include/orbit-2.0 -I/home /lool/jhbuild-gnome-2.18/prefix/include/glib-2.0 -I/home/lool/jhbuild-gnome-2.18 /prefix/lib/glib-2.0/include -I/home/lool/jhbuild-gnome-2.18/prefix/lib/gtk-2.0/ include -I/home/lool/jhbuild-gnome-2.18/prefix/include/atk-1.0 -I/home/lool/jhbu ild-gnome-2.18/prefix/include/cairo -I/home/lool/jhbuild-gnome-2.18/prefix/inclu de/pango-1.0 -I/home/lool/jhbuild-gnome-2.18/prefix/include -I/home/lool/jhbuild -gnome-2.18/prefix/include/libxml2 -I/home/lool/jhbuild-gnome-2.18/prefix/includ e/gnome-vfs-2.0 -I/home/lool/jhbuild-gnome-2.18/prefix/lib/gnome-vfs-2.0/include -I/home/lool/jhbuild-gnome-2.18/prefix/include/libbonobo-2.0 -I/home/lool/jhbui ld-gnome-2.18/prefix/include/bonobo-activation-2.0 -I/usr/include/freetype2 -I/u sr/include/libpng12 -pthread -DDBUS_API_SUBJECT_TO_CHANGE -I/home/lool/jhbuild -gnome-2.18/prefix/include/libnautilus-burn -I/home/lool/jhbuild-gnome-2.18/pref ix/include/glib-2.0 -I/home/lool/jhbuild-gnome-2.18/prefix/lib/glib-2.0/include -I/home/lool/jhbuild-gnome-2.18/prefix/include/gtk-2.0 -I/home/lool/jhbuild-gnom e-2.18/prefix/include/hal -I/home/lool/jhbuild-gnome-2.18/prefix/lib/gtk-2.0/inc lude -I/home/lool/jhbuild-gnome-2.18/prefix/include/atk-1.0 -I/home/lool/jhbuild -gnome-2.18/prefix/include/cairo -I/home/lool/jhbuild-gnome-2.18/prefix/include/pango-1.0 -I/home/lool/jhbuild-gnome-2.18/prefix/include -I/home/lool/jhbuild-gnome-2.18/prefix/include/dbus-1.0 -I/home/lool/jhbuild-gnome-2.18/prefix/lib/dbus-1.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -DORBIT2=1 -pthread -I/home/lool/jhbuild-gnome-2.18/prefix/include/gtk-2.0 -I/home/lool/jhbuild-gnome-2.18/prefix/lib/gtk-2.0/include -I/home/lool/jhbuild-gnome-2.18/prefix/include/atk-1.0 -I/home/lool/jhbuild-gnome-2.18/prefix/include/cairo -I/home/lool/jhbuild-gnome-2.18/prefix/include/pango-1.0 -I/home/lool/jhbuild-gnome-2.18/prefix/include/glib-2.0 -I/home/lool/jhbuild-gnome-2.18/prefix/lib/glib-2.0/include -I/home/lool/jhbuild-gnome-2.18/prefix/include -I/home/lool/jhbuild-gnome-2.18/prefix/include/libglade-2.0 -I/home/lool/jhbuild-gnome-2.18/prefix/include/libxml2 -I/home/lool/jhbuild-gnome-2.18/prefix/include/gconf/2 -I/home/lool/jhbuild-gnome-2.18/prefix/include/orbit-2.0 -I/home/lool/jhbuild-gnome-2.18/prefix/include/libgnomeui-2.0 -I/home/lool/jhbuild-gnome-2.18/prefix/include/libgnome-2.0 -I/home/lool/jhbuild-gnome-2.18/prefix/include/libgnomecanvas-2.0 -I/home/lool/jhbuild-gnome-2.18/prefix/include/libart-2.0 -I/home/lool/jhbuild-gnome-2.18/prefix/include/libbonoboui-2.0 -I/home/lool/jhbuild-gnome-2.18/prefix/include/gnome-vfs-2.0 -I/home/lool/jhbuild-gnome-2.18/prefix/lib/gnome-vfs-2.0/include -I/home/lool/jhbuild-gnome-2.18/prefix/include/gnome-keyring-1 -I/home/lool/jhbuild-gnome-2.18/prefix/include/libbonobo-2.0 -I/home/lool/jhbuild-gnome-2.18/prefix/include/bonobo-activation-2.0 -I/usr/include/freetype2 -I/home/lool/jhbuild-gnome-2.18/prefix/include/gnome-vfs-module-2.0 -I/usr/include/libpng12 -Os -MT mb_test-sj-metadata-musicbrainz.o -MD -MP -MF .deps/mb_test-sj-metadata-musicbrainz.Tpo -c -o mb_test-sj-metadata-musicbrainz.o `test -f '/home/lool/jhbuild-gnome-2.18/checkout/sound-juicer/libjuicer/sj-metadata-musicbrainz.c' || echo '/home/lool/jhbuild-gnome-2.18/checkout/sound-juicer/tests/'`/home/lool/jhbuild-gnome-2.18/checkout/sound-juicer/libjuicer/sj-metadata-musicbrainz.c make[2]: *** Pas de règle pour fabriquer la cible « /home/lool/jhbuild-gnome-2.18/checkout/sound-juicer/libjuicer/sj-metadata-marshal.c », nécessaire pour « mb_test-sj-metadata-marshal.o ». Arrêt. make[2]: *** Attente des tâches non terminées.... /home/lool/jhbuild-gnome-2.18/checkout/sound-juicer/libjuicer/sj-metadata.c:23:33: error: sj-metadata-marshal.h: Aucun fichier ou répertoire de ce type /home/lool/jhbuild-gnome-2.18/checkout/sound-juicer/libjuicer/sj-metadata.c: In function ‘sj_metadata_base_init’: This is due to the difficulty of finding the generated sources in the case of an out of tree SVN build. Please note that the behavior is different in the case of an out of tree _tarball_ build since the marshal .c and .h files are in srcdir and not in builddir in this case. I'll attach a patch which cheats by using relative path names instead of hardcoding $(top_srcdir); this is /ugly/, but should work in both cases thanks to VPATH. I'll also attach a different patch which IMO is better, but you might find more intrusive: it will simply link the test to libjuicer.la instead of referencing sources from libjuicer. Bye,
Created attachment 83793 [details] [review] Cheat by using VPATH to locate marshal .c and .h sources
Created attachment 83794 [details] [review] Link to libsoundjuicer.la instead (alternate solution I would prefer)
Created attachment 83796 [details] [review] Some cleanups to libjuicer/Makefile.am These are some cleanups you might want to apply to libjuicer/Makefile.am in all cases.
Committed, thanks!