Subject: Re: has anyone else built firefox-1.5.0.1 with xsrc-current? (blows
To: NetBSD Packages Technical Discussion List <tech-pkg@NetBSD.org>
From: Tobias Nygren <tnn+nbsd@nygren.pp.se>
List: tech-pkg
Date: 07/27/2006 14:23:35
Greg A. Woods wrote:
> I'm trying to do what's probably a rather unorthodox build of
> firefox-1.5.0.1 (from pkgsrc-2005Q4) on some netbsd-1-6 i386 and alpha
> machines with xsrc-current installed on them.
>
> The very same pkgsrc source tree built working installs of both
> www/firefox and www/firefox-gtk1 fine on an i386 system built from the
> netbsd-3 and xsrc-3 branches though.
>
> I blows up while trying to compile the same file on both Alpha and i386=
=2E
>
> # www/firefox blows on alpha:
>
> c++ -o nsDeviceContextPS.o -c  -DMOZILLA_INTERNAL_API -DOSTYPE=3D\"NetB=
SD1.6\" -DOSARCH=3D\"NetBSD\" -DBUILD_ID=3D0000000000 -I../.. -I./..  -I.=
/../shared -I../../../dist/include/xpcom -I../../../dist/include/string -=
I../../../dist/include/widget -I../../../dist/include/pref -I../../../dis=
t/include/caps -I../../../dist/include/locale -I../../../dist/include/uco=
nv -I../../../dist/include/view -I../../../dist/include/necko -I../../../=
dist/include/imglib2 -I../../../dist/include/unicharutil -I../../../dist/=
include/gfx -I../../../dist/include -I../../../dist/include/nspr -I/usr/p=
kg/include -I/usr/pkg/include  -I../../../dist/sdk/include -I/usr/pkg/inc=
lude -I/usr/pkg/include/freetype2 -I/usr/X11R6/include   -I/usr/X11R6/inc=
lude   -fPIC -DPIC  -I/usr/pkg/include -I/usr/include -I/usr/X11R6/includ=
e -DGLX_GLXEXT_LEGACY -I/usr/pkg/include/freetype2  -I/usr/X11R6/include =
-fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align=
 -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dto=
r -Wno-long-long -O2 -mno-soft-float -mcpu=3D21164a -g -I/usr/pkg/include=
 -I/usr/include -I/usr/X11R6/include -DGLX_GLXEXT_LEGACY -I/usr/pkg/inclu=
de/freetype2 -Dunix -mieee -pipe  -DNDEBUG -DTRIMMED -pipe -O2 -mno-soft-=
float -mcpu=3D21164a -g -mieee -pipe -I/usr/pkg/include/gtk-2.0 -I/usr/pk=
g/lib/gtk-2.0/include -I/usr/pkg/include/atk-1.0 -I/usr/pkg/include/cairo=
 -I/usr/pkg/include/pango-1.0 -I/usr/pkg/include -I/usr/X11R6/include -I/=
usr/pkg/include/glib/glib-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/=
include/freetype2    -I/usr/pkg/include -I/usr/include -I/usr/X11R6/inclu=
de -DGLX_GLXEXT_LEGACY -I/usr/pkg/include/freetype2  -I/usr/X11R6/include=
 -DMOZILLA_CLIENT -include ../../../mozilla-config.h -Wp,-MD,.deps/nsDevi=
ceContextPS.pp nsDeviceContextPS.cpp
> In file included from nsDeviceContextPS.h:50,
>                  from nsDeviceContextPS.cpp:55:
> nsFontMetricsPS.h: In method `PRInt32 nsFontPS::SupportsChar(short unsi=
gned int)':
> nsFontMetricsPS.h:194: warning: cast increases required alignment of ta=
rget type
> In file included from nsDeviceContextPS.h:50,
>                  from nsDeviceContextPS.cpp:55:
> nsFontMetricsPS.h: At top level:
> nsFontMetricsPS.h:285: ANSI C++ forbids data member `fontps' with same =
name as enclosing class
> make[4]: *** [nsDeviceContextPS.o] Error 1
> make[4]: Leaving directory `/build/package-obj/www/firefox/work/mozilla=
/gfx/src/ps'
> make[3]: *** [libs] Error 2
>
>
>  =20
I've seen this but didn't bother reporting it. I have some local patches =

that take care of it for me.
These apply to the MOZILLA_1_8_BRANCH (will become firefox 2.0) but I=20
think they are
valid for 1.5* as well.

-Tobias

Index: gfx/src/ps/nsFontMetricsPS.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/mozilla/gfx/src/ps/nsFontMetricsPS.h,v
retrieving revision 1.31
diff -u -r1.31 nsFontMetricsPS.h
--- gfx/src/ps/nsFontMetricsPS.h    28 Jun 2005 18:29:10 -0000    1.31
+++ gfx/src/ps/nsFontMetricsPS.h    27 Jul 2006 12:20:38 -0000
@@ -282,7 +282,7 @@
=20
 struct fontps {
   nsXftEntry *entry;
-  nsFontPS   *fontps;
+  nsFontPS   *_fontps;
   FcCharSet  *charset;
 };
=20
Index: gfx/src/ps/nsFontMetricsPS.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/mozilla/gfx/src/ps/nsFontMetricsPS.cpp,v
retrieving revision 1.57
diff -u -r1.57 nsFontMetricsPS.cpp
--- gfx/src/ps/nsFontMetricsPS.cpp    28 Apr 2005 08:04:00 -0000    1.57
+++ gfx/src/ps/nsFontMetricsPS.cpp    27 Jul 2006 12:20:38 -0000
@@ -102,8 +102,8 @@
       fontps *fontPS =3D (fontps *)mFontsPS->ElementAt(i);
       if (!fontPS)
         continue;
-      if (fontPS->fontps)
-        delete fontPS->fontps;
+      if (fontPS->_fontps)
+        delete fontPS->_fontps;
 #ifdef MOZ_ENABLE_XFT
       if (fontPS->entry)
         delete fontPS->entry;
@@ -183,12 +183,12 @@
     fontps *font =3D (fontps*)mFontsPS->ElementAt(0);
 #if defined(MOZ_ENABLE_FREETYPE2) || defined(MOZ_ENABLE_XFT)
     NS_ASSERTION(font && font->entry, "no font available");
-    if (font && !font->fontps && font->entry)
-      font->fontps =3D CreateFontPS(font->entry, mFont, this);
+    if (font && !font->_fontps && font->entry)
+      font->_fontps =3D CreateFontPS(font->entry, mFont, this);
 #endif
     NS_ASSERTION(font && font->fontps, "no font available");
-    if (font && font->fontps)
-      font->fontps->RealizeFont(this, dev2app);
+    if (font && font->_fontps)
+      font->_fontps->RealizeFont(this, dev2app);
   }
 }
=20
@@ -494,13 +494,13 @@
   if (aFontMetrics->GetFontsPS()->Count() > 0) {
     fontps *fps =3D (fontps*)aFontMetrics->GetFontsPS()->ElementAt(0);
     NS_ENSURE_TRUE(fps, nsnull);
-    fontPS =3D fps->fontps;
+    fontPS =3D fps->_fontps;
   }
   else {
     fontPS =3D nsFontPSAFM::FindFont(aFont, aFontMetrics);
     fontps *fps =3D new fontps;
     NS_ENSURE_TRUE(fps, nsnull);
-    fps->fontps =3D fontPS;
+    fps->_fontps =3D fontPS;
 #if defined(MOZ_ENABLE_XFT) || defined(MOZ_ENABLE_FREETYPE2)
     fps->entry  =3D nsnull;
 #ifdef MOZ_ENABLE_XFT
@@ -832,17 +832,17 @@
         continue;
       }
       if (FcCharSetHasChar(fi->charset, aChar)) {
-        if (!fi->fontps) {
+        if (!fi->_fontps) {
 #ifdef PR_LOGGING
           if (PR_LOG_TEST(gFontMetricsPSM, PR_LOG_DEBUG)) {
             PR_LogPrint("CreateFontPS %s/%s\n",
                 fi->entry->mFamilyName.get(), fi->entry->mStyleName.get(=
));
           }
 #endif
-          fi->fontps =3D CreateFontPS(fi->entry, aFont, aFontMetrics);
+          fi->_fontps =3D CreateFontPS(fi->entry, aFont, aFontMetrics);
         }
-        if (fi->fontps)
-          return fi->fontps;
+        if (fi->_fontps)
+          return fi->_fontps;
       }
     }
=20
@@ -987,7 +987,7 @@
         fontps *fps =3D new fontps;
         fps->entry =3D xftEntry;
         fps->charset =3D fc_charset;
-        fps->fontps =3D nsnull;
+        fps->_fontps =3D nsnull;
         fpi.fontps->AppendElement(fps);
     }
=20
Index: gfx/cairo/cairo/src/cairoint.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/mozilla/gfx/cairo/cairo/src/cairoint.h,v
retrieving revision 1.9.4.3
diff -u -r1.9.4.3 cairoint.h
--- gfx/cairo/cairo/src/cairoint.h    4 Oct 2005 04:18:06 -0000    1.9.4.=
3
+++ gfx/cairo/cairo/src/cairoint.h    27 Jul 2006 12:20:39 -0000
@@ -254,6 +254,14 @@
 } cairo_direction_t;
=20
 typedef struct _cairo_path_fixed cairo_path_fixed_t;
+#ifndef TNN_WORKAROUND
+enum _cairo_clip_mode {
+    CAIRO_CLIP_MODE_PATH,
+    CAIRO_CLIP_MODE_REGION,
+    CAIRO_CLIP_MODE_MASK
+};
+#define TNN_WORKAROUND
+#endif
 typedef enum _cairo_clip_mode cairo_clip_mode_t;
 typedef struct _cairo_clip_path cairo_clip_path_t;
 typedef struct _cairo_clip cairo_clip_t;
Index: gfx/cairo/cairo/src/cairo-clip-private.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/mozilla/gfx/cairo/cairo/src/cairo-clip-private.h,v
retrieving revision 1.1.6.2
diff -u -r1.1.6.2 cairo-clip-private.h
--- gfx/cairo/cairo/src/cairo-clip-private.h    27 Sep 2005 23:09:01=20
-0000    1.1.6.2
+++ gfx/cairo/cairo/src/cairo-clip-private.h    27 Jul 2006 12:20:39 -000=
0
@@ -38,11 +38,14 @@
=20
 #include "cairo-path-fixed-private.h"
=20
+#ifndef TNN_WORKAROUND
 enum _cairo_clip_mode {
     CAIRO_CLIP_MODE_PATH,
     CAIRO_CLIP_MODE_REGION,
     CAIRO_CLIP_MODE_MASK
 };
+#define TNN_WORKAROUND
+#endif
=20
 struct _cairo_clip_path {
     unsigned int    ref_count;