Re: Problems with OBJDIR != SRCDIR



Daniel Egger <degger fhm edu> writes:

> Hija,
> 
> I just wanted to compile Gtk+ (head) again and stumbled over a small
> dependency problem:
> 
> /opt/gcc/bin/gcc -DHAVE_CONFIG_H -I. -I../../../gtk+/gdk/x11 -I../..
> -DG_LOG_DOMAIN=\"Gdk\" -DINSIDE_GDK_X11 -I../../../gtk+
> -I../../../gtk+/gdk -I../../gdk -DG_ENABLE_DEBUG -D_REENTRANT
> -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
> -I/usr/include/pango-1.0 -I/usr/include/freetype2 -O2 -pg -g -Wall -c
> ../../../gtk+/gdk/x11/gdkcolor-x11.c -MT gdkcolor-x11.lo -MD -MP -MF
> .deps/gdkcolor-x11.TPlo -o gdkcolor-x11.o
> In file included from ../../../gtk+/gdk/x11/gdkdisplay-x11.h:33,
>                  from ../../../gtk+/gdk/x11/gdkprivate-x11.h:38,
>                  from ../../../gtk+/gdk/x11/gdkx.h:75,
>                  from ../../../gtk+/gdk/x11/gdkcolor-x11.c:31:
> ../../../gtk+/gdk/gdk.h:35:30: gdk/gdkenumtypes.h: No such file or
> directory
> ../../../gtk+/gdk/x11/gdkcolor-x11.c: In function `gdkx_colormap_get':
> ../../../gtk+/gdk/x11/gdkcolor-x11.c:1131: warning: `colormap' might be
> used uninitialized in this function
> 
> 
> For some reason gdk/gdkenumtypes.h hadn't been built in the OBJDIR
> and thus the compilation failed. 'Make'ing it from hand did the job
> though so it seems that there needs to be some hard dependency in the
> Makefiles somewhere but this is for sure not one of my expertareas so
> I couldn't figure out where to do it cleanly.

Some SRCDIR != BUILDDIR problems are to be expected with GTK+
because:
 
 A) We do generated file generation in srcdir because we
    distribute them.
 B) We have automake-1.4 workaround hacks
 C) GTK+'s build process exceeds the complexity that make can
    handle easily.
 D) Nobody tests it 

I _suspect_ that if you typed make again, things problem would
have worked. One thing that might help is makeing the 
rebuild-in-sourcedir rules more like the way Pango does
them (using 'GPATH'  ... see pango/pango/Makefile.am). But
that isn't very reloiable either.
 
When I have time (hah!) I plan on redoing all the generation rules in
the gdk/ gtk/ makefiles over with automake-1.6.

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]