Bug 204703 - net-libs/xulrunner-1.8.1.11 GCC 4.3 build failure
Bug#: 204703 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: mozilla@gentoo.org Reported By: dirtyepic@gentoo.org
Component: GCC Porting
URL: 
Summary: net-libs/xulrunner-1.8.1.11 GCC 4.3 build failure
Keywords:  
Status Whiteboard: 
Opened: 2008-01-07 05:10 0000
Description:   Opened: 2008-01-07 05:10 0000
this is what i'm using so far to build xulrunner with GCC 4.3 svn.  The
preprocessor in 4.3 is a lot more strict for C++, turning most -pendantic
warnings into errors.  xulrunner has a couple places where NS_DECL_IMGIENCODER
is redefined which is no longer allowed.  (see
http://www.cyrius.com/journal/gcc/gcc-4.3-pedwarn.html).

this patch is from opensuse
(http://lists.opensuse.org/opensuse-commit/2007-11/msg00823.html) and was
originally for firefox-2.0.0.10, so it should be applicable to most mozilla
stuff with minor changes.

i think xulrunner HEAD (or whatever will be 1.9) builds with GCC 4.3, so if
that will be released any time soon we might just want to wait.

there is one other problem, a conflict between popt and glib that has to be
fixed first before xulrunner will build completely.  but that has nothing to do
with you guys ;)

x86_64-pc-linux-gnu-g++ -o nsIconChannel.o -c -fvisibility=hidden
-DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API
-DEXPORT_XPTI_API -D_IMPL_NS_COM_OBSOLETE -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET
-DIMPL_XULAPI -DIMPL_NS_NET  -DOSTYPE=\"Linux2.6\" -DOSARCH=\"Linux\"
-DBUILD_ID=2008010622 -DORBIT2=1 -pthread -I/usr/include/libgnomeui-2.0
-I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1
-I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0
-I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0
-I/usr/include/gnome-vfs-2.0 -I/usr/lib64/gnome-vfs-2.0/include
-I/usr/include/orbit-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0
-I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/freetype2
-I/usr/include/gail-1.0 -I/usr/include/atk-1.0 -I/usr/lib64/gtk-2.0/include
-I/usr/include/cairo -I/usr/include/libpng12  
-I../../../../../dist/include/xpcom -I../../../../../dist/include/string
-I../../../../../dist/include/necko -I../../../../../dist/include/intl
-I../../../../../dist/include/mimetype -I../../../../../dist/include/imgicon
-I../../../../../dist/include -I/usr/include/nspr   
-I../../../../../dist/sdk/include    -fPIC 
-DGENTOO_NSPLUGINS_DIR=\"/usr/lib64/nsplugins\"
-DGENTOO_NSBROWSER_PLUGINS_DIR=\"/usr/lib64/nsbrowser/plugins\"  -fno-rtti
-fno-handle-exceptions  -Wconversion -Wpointer-arith -Wcast-align
-Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor
-Wno-long-long -g -march=native -pipe -fPIC -Wno-return-type -w -fshort-wchar
-pthread -pipe  -DNDEBUG -DTRIMMED -ffunction-sections -O2 
-DGENTOO_NSPLUGINS_DIR=\"/usr/lib64/nsplugins\"
-DGENTOO_NSBROWSER_PLUGINS_DIR=\"/usr/lib64/nsbrowser/plugins\" 
-DMOZILLA_CLIENT -include ../../../../../mozilla-config.h
-Wp,-MD,.deps/nsIconChannel.pp nsIconChannel.cpp
In file included from /usr/include/libbonobo-2.0/bonobo/bonobo-i18n.h:39,
                 from /usr/include/libgnome-2.0/libgnome/gnome-i18n.h:41,
                 from /usr/include/libgnome-2.0/libgnome/libgnome.h:30,
                 from nsIconChannel.cpp:43:
/usr/include/glib-2.0/glib/gi18n.h:30:1: error: "N_" redefined
In file included from /usr/include/libgnome-2.0/libgnome/gnome-program.h:41,
                 from /usr/include/libgnome-2.0/libgnome/libgnome.h:29,
                 from nsIconChannel.cpp:43:
/usr/include/popt.h:161:1: error: this is the location of the previous
definition
gmake[4]: *** [nsIconChannel.o] Error 1
gmake[4]: Leaving directory
`/var/tmp/portage/net-libs/xulrunner-1.8.1.11/work/mozilla/modules/libpr0n/decoders/icon/gtk'

------- Comment #1 From Ryan Hill 2008-01-07 05:11:04 0000 -------
Created an attachment (id=140355) [details]
xulrunner-1.8.1.11-gcc-4.3.patch

------- Comment #2 From Raúl Porcel 2008-01-23 17:43:28 0000 -------
Fixed in patchset 0.2.

So i believe everything else (firefox, thunderbird) fail at the moment?

Thanks for the patch!

------- Comment #3 From Raúl Porcel 2008-01-28 19:38:32 0000 -------
Fixed in all mozilla products:

app-office/mozilla-sunbird-0.7 patchset 0.4
mail-client/mozilla-thunderbird-2.0.0.9 patchset 0.3
www-client/mozilla-firefox-2.0.0.11 patchset 0.4
www-client/seamonkey-1.1.7 patchset 0.4