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 325588 - Build stops on Solaris 9 because XTrapezoid is not defined
Build stops on Solaris 9 because XTrapezoid is not defined
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
1.10.x
Other All
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2006-01-03 08:53 UTC by Matt Selsky
Modified: 2006-01-18 02:37 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matt Selsky 2006-01-03 08:53:51 UTC
Please describe the problem:
I'm building pango 1.10.2 on Solaris 9 (gcc 2.95.3, glib 2.8.4, atk 1.10.3,
renderext 0.9, libXrender 0.9.0, libXft 2.1.7, cairo 1.0.2) and the build stops
with the following error:

make[2]: Entering directory `/hmt/chinchin/src/X/pango-1.10.2/obj/solaris9/examples'
source='xftview.c' object='xftview.o' libtool=no \
depfile='.deps/xftview.Po' tmpdepfile='.deps/xftview.TPo' \
depmode=gcc /bin/bash ../depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I.. -DG_DISABLE_DEPRECATED
-DPANGO_DISABLE_DEPRECATED -DG_DISABLE_CAST_CHECKS -I..
-I/opt/freetype-2.1.4/include -I/opt/freetype-2.1.4/include/freetype2
-I/opt/cairo-1.0.2/include/cairo   -threads -I/opt/glib-2.8.4/include/glib-2.0
-I/opt/glib-2.8.4/lib/glib-2.0/include   -I/usr/openwin/include -DXTHREADS
-I/opt/libXft-2.1.7/include -I/opt/freetype-2.1.4/include
-I/opt/freetype-2.1.4/include/freetype2 -I/opt/libXrender-0.9.0/include
-I/opt/renderext-0.9/include -I/usr/openwin/include
-I/opt/fontconfig-2.2.90/include   -I/opt/fontconfig-2.2.90/include  
-I/opt/freetype-2.1.4/include -I/opt/freetype-2.1.4/include/freetype2    -g -O2
-Wall -c `test -f 'xftview.c' || echo './'`xftview.c
In file included from ../pango/pangoxft-render.h:31,
                 from ../pango/pangoxft.h:30,
                 from xftview.c:31:
/usr/openwin/include/X11/Xlib.h:32: warning: ignoring pragma: "@(#)Xlib.h      
1.9     00/07/05 SMI
In file included from /usr/openwin/include/X11/extensions/Xrender.h:33,
                 from /opt/libXft-2.1.7/include/X11/Xft/Xft.h:44,
                 from ../pango/pangoxft-render.h:32,
                 from ../pango/pangoxft.h:30,
                 from xftview.c:31:
/usr/openwin/include/X11/Xutil.h:56: warning: ignoring pragma: "@(#)Xutil.h    
1.2     00/07/05 SMI
In file included from ../pango/pangoxft.h:30,
                 from xftview.c:31:
../pango/pangoxft-render.h:91: parse error before `XTrapezoid'
make[2]: *** [xftview.o] Error 1
make[2]: Leaving directory `/hmt/chinchin/src/X/pango-1.10.2/obj/solaris9/examples'

It seems like the #include of X11/extensions/Xrender.h is missing since that's
where `XTrapezoid' is defined on my system.

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Behdad Esfahbod 2006-01-03 15:09:32 UTC
Hum, that is supposed to be included through X11/Xft/Xft.h I *guess*.  You are on your own I'm afraid.
Comment 2 Matt Selsky 2006-01-04 00:22:38 UTC
X11/Xft/Xft.h does include X11/extensions/Xrender.h
Comment 3 Matt Selsky 2006-01-04 06:01:21 UTC
/usr/openwin/include has a copy of Xrender.h that doesn't define XTrapezoid. /opt/libXft-2.1.7/include needs to come first in the CFLAGS.  My CFLAGS are defined as follows:

CAIRO_CFLAGS = -I/opt/freetype-2.1.4/include -I/opt/freetype-2.1.4/include/freetype2 -I/opt/cairo-1.0.2/include/cairo
FONTCONFIG_CFLAGS = -I/opt/fontconfig-2.2.90/include
FREETYPE_CFLAGS = -I/opt/fontconfig-2.2.90/include   -I/opt/freetype-2.1.4/include -I/opt/freetype-2.1.4/include/freetype2
GLIB_CFLAGS = -threads -I/opt/glib-2.8.4/include/glib-2.0 -I/opt/glib-2.8.4/lib/glib-2.0/include
XFT_CFLAGS = -DXTHREADS -I/opt/libXft-2.1.7/include -I/opt/freetype-2.1.4/include -I/opt/freetype-2.1.4/include/freetype2 -I/opt/libXrender-0.9.0/include -I/opt/renderext-0.9/include -I/usr/openwin/include -I/opt/fontconfig-2.2.90/include
X_CFLAGS =  -I/usr/openwin/include

Does this look correct?
Comment 4 Matt Selsky 2006-01-09 20:40:33 UTC
The problem seems to be an incorrect ordering of CFLAGS in Makefile.am

Current:

INCLUDES =                              \
        -DG_DISABLE_DEPRECATED          \
        -DPANGO_DISABLE_DEPRECATED      \
        $(PANGO_DEBUG_FLAGS)            \
        -I$(top_srcdir)                 \
        $(CAIRO_CFLAGS)                 \
        $(GLIB_CFLAGS)                  \
        $(X_CFLAGS)                     \
        $(XFT_CFLAGS)                   \
        $(FREETYPE_CFLAGS)

Should be:

INCLUDES =                              \
        -DG_DISABLE_DEPRECATED          \
        -DPANGO_DISABLE_DEPRECATED      \
        $(PANGO_DEBUG_FLAGS)            \
        -I$(top_srcdir)                 \
        $(CAIRO_CFLAGS)                 \
        $(XFT_CFLAGS)                   \
        $(X_CFLAGS)                       \
        $(GLIB_CFLAGS)                  \
        $(FREETYPE_CFLAGS)          

Basically X_CFLAGS should be after XFT_CFLAGS
Comment 5 Behdad Esfahbod 2006-01-16 10:44:02 UTC
This should fix it.  Please test.

2006-01-16  Behdad Esfahbod  <behdad@gnome.org>

        * docs/Makefile.am, examples/Makefile.am, pango/Makefile.am,
        tests/Makefile.am: Adjust the order of *_CFLAGS to the same order
        known to work. (Fixes bug #325588)

Comment 6 Matt Selsky 2006-01-18 02:37:17 UTC
Works like a charm.  Thanks!