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 90181 - gtk+ fails to build for latest CVS head sources
gtk+ fails to build for latest CVS head sources
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2002-08-08 05:17 UTC by Ashok Venkiteswaran
Modified: 2011-02-04 16:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to reinstate xft1 codepatch for gdk_x11_drawable_get_picture (2.28 KB, patch)
2002-08-22 12:23 UTC, bill.haneman
none Details | Review
improved patch (fixes leaked 'picture') (3.59 KB, patch)
2002-08-22 16:25 UTC, bill.haneman
none Details | Review

Description Ashok Venkiteswaran 2002-08-08 05:17:58 UTC
gtk+ fails to get build for the latest CVS head for linux platform only.
see the error messages at time of make below. 

gcc -g -I/opt/gnome-2.0/include -Wall -Wl,--export-dynamic -o .libs/gtk-
query-immodules-2.0 queryimmodules.o -Wl,--export-dynamic  -L/opt/gnome-
2.0/lib -L/usr/X11R6/lib ./.libs/libgtk-x11-2.0.so /gnome/src-2.0n-
080802/gtk+/gdk/.libs/libgdk-x11-2.0.so /opt/gnome-2.0/lib/libatk-
1.0.so ../gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so ../gdk/.libs/libgdk-x11-
2.0.so /gnome/src-2.0n-080802/gtk+/gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so -
lXft -lXrender -lXext -lX11 /opt/gnome-2.0/lib/libfreetype.so /opt/gnome-
2.0/lib/libpangoxft-1.0.so /opt/gnome-2.0/lib/libpangox-1.0.so /opt/gnome-
2.0/lib/libpango-1.0.so /opt/gnome-2.0/lib/libgobject-2.0.so /opt/gnom
e-2.0/lib/libgmodule-2.0.so -ldl /opt/gnome-2.0/lib/libglib-2.0.so -
lpthread -lm /opt/gnome-2.0/lib/libintl.so -Wl,--rpath -Wl,/opt/gnome-
2.0/lib/gnome/src-2.0n-080802/gtk+/gdk/.libs/libgdk-x11-2.0.so: undefined 
reference to`pango_xft_shutdown_display'
/gnome/src-2.0n-080802/gtk+/gdk/.libs/libgdk-x11-2.0.so: undefined 
reference to`XftDrawPicture'
collect2: ld returned 1 exit status
make[3]: *** [gtk-query-immodules-2.0] Error 1
make[3]: Leaving directory `/gnome/src-2.0n-080802/gtk+/gtk'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/gnome/src-2.0n-080802/gtk+/gtk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/gnome/src-2.0n-080802/gtk+'
make: *** [all-recursive-am] Error 2
--->8--- output of make command ends ------

ERROR: Failed to compile package gtk+ (2)
Comment 1 Owen Taylor 2002-08-09 03:58:54 UTC
Fixed as a side-effect of:

Thu Aug  8 23:26:05 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkmain-x11.c gdk/x11/gdkscreen-x11.c: Remove
        explicit calls to pango_x/xft_shutdown_display() since
        Pango now does it by itself on XCloseDisplay().

Thanks.
Comment 2 Ashok Venkiteswaran 2002-08-09 07:20:11 UTC
Still getting an undefined reference to `XftDrawPicture' as below.
Request your attention into this. 

/gnome/src-2.0n-090802/gtk+/gdk/.libs/libgdk-x11-2.0.so: undefined 
reference to `XftDrawPicture'
collect2: ld returned 1 exit status
make[3]: *** [gtk-query-immodules-2.0] Error 1
make[3]: Leaving directory `/gnome/src-2.0n-090802/gtk+/gtk'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/gnome/src-2.0n-090802/gtk+/gtk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/gnome/src-2.0n-090802/gtk+'
make: *** [all-recursive-am] Error 2
--->8--- output of make command ends ------

ERROR: Failed to compile package gtk+ (2)
Comment 3 bill.haneman 2002-08-20 19:47:01 UTC
I have confirmed that gdk/x11/gdk-x11-drawable.c now explicitly calls
Xft API that my older version of Xft (the one distributed with RH7.1)
does not contain; i.e. it calls
XftDrawPicture.

So although gtk+ HEAD can use pango 1.0, this change introduces a
(new) dependency on Xft2 in gtk+ HEAD.  Isn't this a problem?
Comment 4 Owen Taylor 2002-08-20 20:42:40 UTC
Hmm, I guess I was deluded to think that Xft1 had DrawPicture
since it *could* have had XftDrawPicture.

It should be straighforward enough to dig the old code 
from before my changes of 2 Aug and conditionalize on
HAVE_XFT2. 

I'd take such a patch, though, since I don't have Xft1 around 
any more, it would be hard for me to develop/test it.

(A simpler change would to not define HAVE_XFT unless Xft2
is found, but if it's easy enough, it would be nice
to retain Xft1 support until we kill pango-1.0 support)
Comment 5 bill.haneman 2002-08-22 12:23:49 UTC
Created attachment 10640 [details] [review]
patch to reinstate xft1 codepatch for gdk_x11_drawable_get_picture
Comment 6 bill.haneman 2002-08-22 12:29:13 UTC
this patch has been tested on linux+xft2, and does not alter the
non-xft codepath.  It awaits testing on linux+xft1 (the stack where
the problem first was reported).
Comment 7 bill.haneman 2002-08-22 16:25:27 UTC
Created attachment 10649 [details] [review]
improved patch (fixes leaked 'picture')
Comment 8 bill.haneman 2002-08-23 11:21:43 UTC
confirmed that the patch above works on Solaris without XFT, on Linux
(RH7.1) with Xft1, and on Linux (RH7.1) with Xft2.
Comment 9 Ashok Venkiteswaran 2002-08-26 12:34:15 UTC
With this patch I found that gtk+ is getting build successfully in 
RH7.1 and hence I am closing this bug. 
Comment 10 Laszlo (Laca) Peter 2002-08-26 14:01:58 UTC
Please NEVER close a bug just because the proposed fix works!
A bug is fixed if it's fixed in CVS.

Reopening this until either this or another fix is integrated.
Comment 11 David Lazaro 2002-08-30 05:28:30 UTC
Hope this bug gets fixed soon...

I have also checked that the patch works with Red Hat 7.3 with the
autoconf links changed to point to the autoconf 2.53 that comes with
the distribution.

Every string from other charset doesn't appear correctly, thouhg it
can be a problem of configuration, don't know.

It is also giving me problems building gdkenumtypes.h and
gdkenumtypes.c in the correct order. But this problem should go in
another bug-report, I suppose.
Comment 12 David Lazaro 2002-08-30 06:08:56 UTC
Could somebody mark the OS field as Linux, please?
Comment 13 troy 2002-09-30 16:16:27 UTC
This bug is reoccurring trying to compile gtk+-2.1.0 released
on September 30th 2002.  Xfree86-4.2.1 present.
Comment 14 Steve Griff 2002-09-30 21:38:25 UTC
Yep, I tried to compile gtk+2.1 and get the same gdk undefined
reference using XFree 4.2.1

Steve Griff
Comment 15 Owen Taylor 2002-10-03 21:18:53 UTC
I've committed an (untested) change now that should fix
the problem. It differs from Bill's patch in that it
more literally goes back to the old code for the non-Xft2
case, instead of creating a picture as well as the XftDraw.

Testing appreciated.

Thu Oct  3 17:09:23 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/{gdkdrawable-x11.[ch],gdkpixmap-x11.c,
        gdkwindow-x11.c}: Restore the pre-Xft2 code to
        render text directly via RENDER, conditionalized
        with !HAVE_XFT2 so that we'll build again on Xft1
        systems. (#90181)
Comment 16 marco 2002-10-11 22:39:12 UTC
I've tried changing the 
#ifdef HAVE_XFT
to
#if !HAVE_XFT2
and it didn't worked for me, although i'm not really sure if this is
what you meant by 'conditionalizing'.
My distr is RH7.3 and i'm trying to install gnome from cvs tree.

/tmp/gnome/gtk+-2.1.0/gdk/.libs/libgdk-x11-2.0.so: undefined reference
to `XftDrawPicture'
collect2: ld returned 1 exit status
make[3]: *** [gtk-query-immodules-2.0] Error 1
make[3]: Leaving directory `/tmp/gnome/gtk+-2.1.0/gtk'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/gnome/gtk+-2.1.0/gtk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/gnome/gtk+-2.1.0'
make: *** [all-recursive-am] Error 2
Comment 17 Owen Taylor 2002-10-11 23:50:48 UTC
It's not a simple change - it's a whole big bunch of code
changes.

You'll either need to install from CVS or wait for 2.1.1.
(Probably sometime early next week)