Closed Bug 214959 Opened 21 years ago Closed 21 years ago

Xdefs.h not found while building with xft support on solaris

Categories

(Core Graveyard :: GFX: Gtk, defect)

Sun
SunOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: selsky, Assigned: selsky)

Details

(Keywords: fixed1.4.2)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4b) Gecko/20030517 Mozilla Firebird/0.6
Build Identifier: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.5a) Gecko/20030803 Mozilla Firebird/0.6.1

I'm building firebird-0.6.1 on Solaris 9 with gcc-2.95.2, glib-2.2.2, atk-1.2.4,
    pango-1.2.3, gtk+-2.2.2, fontconfig-2.2.90, and xft-2.1.2

I configured firebird as follows:

$ export MOZILLA_OFFICIAL=1
$ export BUILD_OFFICIAL=1
$ export MOZ_PHOENIX=1
$ export LD=/usr/ccs/bin/ld
$ export AR=/usr/ccs/bin/ar
$ export AS=/usr/ccs/bin/as
$ export STRIP=/usr/ccs/bin/strip
$ export RANLIB=/usr/ccs/bin/ranlib
$ LDFLAGS='-R/opt/local/lib -L/opt/local/lib' \
  ./configure \
    --prefix=/opt/firebird-0.6.1 \
    --enable-default-toolkit=gtk2 \
    --disable-mailnews \
    --disable-composer \
    --disable-ldap \
    --enable-crypto \
    --disable-xprint \
    --enable-xft \
    --enable-extensions=default,-irc,-venkman,-inspector,-content-packs,-help \
    --with-system-jpeg \
    --with-system-png \
    --with-system-zlib \
    --with-pthreads \
    --disable-debug \
    --disable-tests \
    --disable-logging \
    --enable-strip \
    --disable-jsd \
    --enable-optimize

After a while, I get the following error message:

nsDeviceContextGTK.cpp
c++ -o nsDeviceContextGTK.o -c -DNATIVE_THEME_SUPPORT -DOSTYPE=\"SunOS5\"
-DOSARCH=\"SunOS\" -DUSE_POSTSCRIPT -I../.. -I./. -I./.. -I./../shared
-I./../freetype -I./../x11shared -I/opt/xft-2.1.2/include
-I/opt/freetype-2.1.4/include -I/opt/freetype-2.1.4/include/freetype2
-I/opt/xrender-0.8.3/include -I/opt/render-0.8/include
-I/opt/fontconfig-2.2.90/include    -I../../../dist/include/xpcom
-I../../../dist/include/string -I../../../dist/include/widget
-I../../../dist/include/view -I../../../dist/include/util
-I../../../dist/include/pref -I../../../dist/include/uconv
-I../../../dist/include/unicharutil -I../../../dist/include/locale
-I../../../dist/include/necko -I../../../dist/include/content
-I../../../dist/include/layout -I../../../dist/include/imglib2
-I../../../dist/include/gfx -I../../../dist/include
-I/hmt/chinchin/src/web/firebird-0.6.1/obj/solaris8/dist/include/nspr    
-I/opt/freetype-2.1.4/include -I/opt/freetype-2.1.4/include/freetype2
-I/usr/openwin/include   -fPIC  -I/usr/openwin/include -fno-rtti -fno-exceptions
-pedantic -Wno-long-long -pthreads  -DNDEBUG -DTRIMMED -O 
-I/opt/gtk+-2.2.2/include/gtk-2.0 -I/opt/gtk+-2.2.2/lib/gtk-2.0/include
-I/opt/atk-1.2.4/include/atk-1.0 -I/opt/pango-1.2.3/include/pango-1.0
-I/opt/xft-2.1.1/include -I/opt/freetype-2.1.4/include
-I/opt/freetype-2.1.4/include/freetype2 -I/opt/xrender-0.8/include
-I/opt/render-0.8/include -I/opt/fontconfig-2.2.0/include -I/usr/openwin/include
-I/opt/glib-2.2.2/include/glib-2.0 -I/opt/glib-2.2.2/lib/glib-2.0/include   
-I/usr/openwin/include -DMOZILLA_CLIENT -include ../../../mozilla-config.h
-Wp,-MD,.deps/nsDeviceContextGTK.pp nsDeviceContextGTK.cpp
In file included from /opt/glib-2.2.2/include/glib-2.0/glib.h:50,
                 from /opt/gtk+-2.2.2/include/gtk-2.0/gdk/gdktypes.h:32,
                 from /opt/gtk+-2.2.2/include/gtk-2.0/gdk/gdkcolor.h:4,
                 from /opt/gtk+-2.2.2/include/gtk-2.0/gdk/gdk.h:30,
                 from /opt/gtk+-2.2.2/include/gtk-2.0/gtk/gtk.h:31,
                 from nsDrawingSurfaceGTK.h:48,
                 from nsRenderingContextGTK.h:54,
                 from nsDeviceContextGTK.h:48,
                 from nsDeviceContextGTK.cpp:48:
/opt/glib-2.2.2/include/glib-2.0/glib/gmessages.h:129: warning: ANSI C does not
allow macro with variable arguments
/opt/glib-2.2.2/include/glib-2.0/glib/gmessages.h:132: warning: ANSI C does not
allow macro with variable arguments
/opt/glib-2.2.2/include/glib-2.0/glib/gmessages.h:135: warning: ANSI C does not
allow macro with variable arguments
/opt/glib-2.2.2/include/glib-2.0/glib/gmessages.h:138: warning: ANSI C does not
allow macro with variable arguments
nsDeviceContextGTK.cpp:78: X11/Xdefs.h: No such file or directory
make[4]: *** [nsDeviceContextGTK.o] Error 1
make[4]: Leaving directory
`/hmt/chinchin/src/web/firebird-0.6.1/obj/solaris8/gfx/src/gtk'
make[3]: *** [libs] Error 2
make[3]: Leaving directory
`/hmt/chinchin/src/web/firebird-0.6.1/obj/solaris8/gfx/src'
make[2]: *** [libs] Error 2
make[2]: Leaving directory `/hmt/chinchin/src/web/firebird-0.6.1/obj/solaris8/gfx'
make[1]: *** [tier_9] Error 2
make[1]: Leaving directory `/hmt/chinchin/src/web/firebird-0.6.1/obj/solaris8'
make: *** [default] Error 2

I don't have X11/Xdefs.h on my system.  That file comes from XFree86.  I'm
building against /usr/openwin for X libraries.  One of the things that's defined
in Xdefs.h on my linux box is "Bool".  Perhaps <X11/Xlib.h> should be used instead?

Reproducible: Always

Steps to Reproduce:
I read the code a little more carefully, and I don't think X11/Xdefs.h is
actually needed.

I've testing this patch on Solaris 9 and a Linux box with comparable versions
of Xft, gtk2, etc.
-> GFX:Gtk
Assignee: mozbugs-build → blizzard
Component: Build Config → GFX: Gtk
QA Contact: ian
I also run into this, compiling with similar config options with gcc-3.2.3 on
Solaris 8.  My previous workaround was to make available a copy of Xdefs.h from
XFree86.  The patch seems to work for me also.
Any chance this will make it to v1.5?
Attachment #129134 - Flags: review?(blizzard)
Comment on attachment 129134 [details] [diff] [review]
Don't use Xdefs.h, and don't #undef Bool

I'm pretty sure that undef was there for a reason.  The blame includes a lot of
"Bool" things.
Attachment #129134 - Flags: review?(blizzard) → review-
The "#undef Bool" was for SUNWspro4.2, which had a C++ header which didn't
play nicely with X's Bool (typeinfo.h).  This appears to have been fixed
since SUNWspro5.0 and we officially killed the 4.2 build of mozilla more
than three years ago (bug 40748).
Comment on attachment 129134 [details] [diff] [review]
Don't use Xdefs.h, and don't #undef Bool

If the SUNWspro 4.2 build is dead, are there other objections?
Attachment #129134 - Flags: review- → review?(blizzard)
Comment on attachment 129134 [details] [diff] [review]
Don't use Xdefs.h, and don't #undef Bool

No, none.  r=blizzard
Attachment #129134 - Flags: review?(blizzard) → review+
Attachment #129134 - Flags: superreview?(rbs)
Attachment #129134 - Flags: superreview?(rbs) → superreview+
Comment on attachment 129134 [details] [diff] [review]
Don't use Xdefs.h, and don't #undef Bool

This patch will succeed for 1.4.x with a 1 line offset.   I can make a new
patch for 1.4.x, if needed.
Attachment #129134 - Flags: approval1.4.2?
checked in
Assignee: blizzard → selsky
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 129134 [details] [diff] [review]
Don't use Xdefs.h, and don't #undef Bool

Let's take this since sun does 1.4 stuff

a=mkaply
Attachment #129134 - Flags: approval1.4.2? → approval1.4.2+
Can someone throw this on the branch and mark fixed1.4.2 please?
Incidentally, any reason this was never marked fixed?
Status: NEW → RESOLVED
Closed: 21 years ago
Keywords: fixed1.4.2
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: