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 551225 - Gthumb will not build against GTK/Quartz (Mac OS), requires X11
Gthumb will not build against GTK/Quartz (Mac OS), requires X11
Status: RESOLVED FIXED
Product: gthumb
Classification: Other
Component: general
2.10.x
Other All
: Normal enhancement
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
Depends on:
Blocks:
 
 
Reported: 2008-09-07 13:45 UTC by W. Michael Petullo
Modified: 2008-11-13 23:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix building gthumb on Mac OS X GTK/Quartz (8.87 KB, patch)
2008-10-09 02:18 UTC, W. Michael Petullo
needs-work Details | Review
Patch to fix building gthumb on Mac OS X GTK/Quartz, modified per comment #6 (8.58 KB, patch)
2008-11-09 00:33 UTC, W. Michael Petullo
none Details | Review
Patch to fix building gthumb on Mac OS X GTK/Quartz, attempt 3 (7.76 KB, patch)
2008-11-12 19:05 UTC, Michael Chudobiak
none Details | Review

Description W. Michael Petullo 2008-09-07 13:45:05 UTC
GTK has a Quartz backend that allows one to build against Mac OS X's native GUI API. In this case, X11 is not used. Gthumb seems to be directly dependent on GDK/X11 and fails to build against GTK/Quartz. 

When I try to build gthumb against GTK/Quartz, I get:

/usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -DXTHREADS -DORBIT2=1 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/freetype2 -I/opt/local/include/libpng12 -I/usr/X11R6/include -I/opt/local/include/pixman-1 -I/opt/local/include/libgnome-2.0 -I/opt/local/include/orbit-2.0 -I/opt/local/include/gconf/2 -I/opt/local/include/gnome-vfs-2.0 -I/opt/local/lib/gnome-vfs-2.0/include -I/opt/local/include/libbonobo-2.0 -I/opt/local/include/bonobo-activation-2.0 -I/opt/local/include/libgnomeui-2.0 -I/opt/local/include/libart-2.0 -I/opt/local/include/gnome-keyring-1 -I/opt/local/include/libbonoboui-2.0 -I/opt/local/include/libgnomecanvas-2.0 -I/opt/local/include/libxml2 -I/opt/local/include/gail-1.0 -I/opt/local/include/gnome-vfs-module-2.0 -I/opt/local/include/libglade-2.0 -DGTHUMB_MODULEDIR=\"/opt/local/lib/gthumb/modules\" -DGTHUMB_GLADEDIR=\"/opt/local/share/gthumb/glade\" -I/opt/local/include -O2 -no-cpp-precomp -flat_namespace -undefined suppress -MT eel-canvas-rect.lo -MD -MP -MF .deps/eel-canvas-rect.Tpo -c eel-canvas-rect.c -fno-common -DPIC -o .libs/eel-canvas-rect.o

eel-canvas-rect.c:32:22: error: gdk/gdkx.h: No such file or directory eel-canvas-rect.c: In function 'eel_canvas_rect_realize': eel-canvas-rect.c:376: error: 'gdk_display' undeclared (first use in this function) eel-canvas-rect.c:376: error: (Each undeclared identifier is reported only once eel-canvas-rect.c:376: error: for each function it appears in.) eel-canvas-rect.c:383: warning: assignment makes pointer from integer without a cast eel-canvas-rect.c:385: warning: assignment makes pointer from integer without a cast eel-canvas-rect.c: In function 'render_rect_alpha': eel-canvas-rect.c:504: warning: assignment makes pointer from integer without a cast make[3]: *** [eel-canvas-rect.lo] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
Comment 1 W. Michael Petullo 2008-09-08 23:56:36 UTC
Performing the following steps fixed this issue for me:

1. Configure using the "--disable-render" option.

2. Remove "#include <gdk/gdkx.h>" from:

src/gs-fade.c
src/main.c
src/catalog-png-exporter.c
src/totem-scrsaver.c
libgthumb/eel-canvas-rect.c
libgthumb/gth-image-list.c

Comment 2 Michael Chudobiak 2008-09-10 19:44:40 UTC
Well, gs-fade.c is gone from trunk, and I've removed the includes from main.c and catalog-png-exporter.c. So that should simplify things a little bit.

- Mike
Comment 3 W. Michael Petullo 2008-09-14 00:50:03 UTC
I just took a look at svn trunk.

I still need to remove "#include <gdkx.h>" from libgthumb/gth-image-list.c, libgthumb/eel-canvas-rect.c and src/gth-application.c.

I also found that src/totem-screensaver.c is directly dependent on X. Can this component to made optional?
Comment 4 Michael Chudobiak 2008-10-08 19:20:51 UTC
I don't think it would be hard to make the totem-screensaver stuff optional. Patch welcome.

- Mike
Comment 5 W. Michael Petullo 2008-10-09 02:18:22 UTC
Created attachment 120248 [details] [review]
Patch to fix building gthumb on Mac OS X GTK/Quartz

This patch adds a new parameter to the configure script, --disable-totem-screensaver. This disables the X11-specific screensaver and fade code and allows gthumb to build against Mac OS X GTK/Quartz (no X11).
Comment 6 Michael Chudobiak 2008-10-09 12:42:36 UTC
I think it would be better and simpler to use AC_CHECK_HEADER against gdkx.h, and automatically disable the X11-dependent parts that way. No need for a --disable-xxxx parameter then. Something like this (untested) code:

HAVE_GDKX=no
AC_CHECK_HEADER(gdk/gdkx.h,
                [HAVE_GDKX=yes]
                [AC_MSG_WARN(Disabling GDK/X11-dependent features.)])

Can you re-work the patch that way?

Your patch didn't quite work on my system anyway. This:

PKG_CHECK_MODULES(TOTEM_SCREENSAVER, libX11

had to be changed to:

PKG_CHECK_MODULES(TOTEM_SCREENSAVER, x11

to work on my computer.


- Mike
Comment 7 W. Michael Petullo 2008-11-09 00:33:33 UTC
Created attachment 122246 [details] [review]
Patch to fix building gthumb on Mac OS X GTK/Quartz, modified per comment #6

This patch applies the recommendation from comment #6.

The totem screensaver code is now dependent on gdkx.h. I also added a check so that the render code would not be built if gdkx.h was missing, even if --disable-render was not used.
Comment 8 Michael Chudobiak 2008-11-12 17:54:38 UTC
Hmm... the patch looks good, but it doesn't actually work for me. It doesn't find gdk/gdkx.h on my linux system. Sigh, I never fully grokked makefiles.

- Mike
Comment 9 Michael Chudobiak 2008-11-12 19:05:48 UTC
Created attachment 122521 [details] [review]
Patch to fix building gthumb on Mac OS X GTK/Quartz, attempt 3

Does this patch work for you? I changed the configure.in tests a bit.

- Mike
Comment 10 Michael Chudobiak 2008-11-13 13:46:57 UTC
I have committed modified versions of the patch to both gthumb-2-10 and trunk. Please test and report back. Thanks!

- Mike
Comment 11 W. Michael Petullo 2008-11-13 23:04:08 UTC
I just build trunk for Mac OS X 10.4. Thanks!

Configuration:

        Source code location:     .
        Compiler:                 gcc
        Have gdk-x11:             no
        Have XRender:             no
        Have XTest:               true
        Have libtiff:             yes
        Have libgphoto:           yes
        Have libopenraw:          no
        Have exiv2 xmp support:   no
        Have gstreamer:           no