Closed Bug 448197 Opened 16 years ago Closed 14 years ago

compilation error in gfxFontTest.cpp on AIX 5.1

Categories

(Core :: Graphics, defect)

1.9.0 Branch
PowerPC
AIX
defect
Not set
major

Tracking

()

RESOLVED FIXED
Tracking Status
status1.9.2 --- unaffected
status1.9.1 --- .9-fixed

People

(Reporter: ul-mcamafia, Assigned: ul-mcamafia)

Details

(Keywords: verified1.9.0.19, verified1.9.1)

Attachments

(2 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; AIX 5.1; en-US; rv:1.8.1.16) Gecko/20080711 SeaMonkey/1.1.11
Build Identifier: cvs tag FIREFOX_3_0_1_RELEASE

parameter list in gfxFont.h not matching to gfxFontTest.cpp for "operator[]"

Reproducible: Always

Steps to Reproduce:
1. compile on AIX 5.1 with VACPP 6.0

Actual Results:  
xlC_r -o gfxFontTest.o -c  -DIMPL_THEBES -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_COM_OBSOLETE -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES  -DOSTYPE=\"AIX5.1\" -DOSARCH=AIX  -I/home/ulink/Src/mozilla/gfx/thebes/src -I. -I../../../dist/include/cairo -I../../../dist/include/string -I../../../dist/include/pref -I../../../dist/include/xpcom -I../../../dist/include/unicharutil -I../../../dist/include/lcms -I../../../dist/include   -I../../../dist/include/thebes -I../../../dist/include/nspr     -I../../../dist/sdk/include   -qflag=w:w      -DNDEBUG -DTRIMMED -O2 -q32 -qarch=com -qalign=full -qalias=noansi -qlanglvl=stdc99 -qmaxmem=-1 -I../../../dist/include/cairo -I/opt/freeware/include/gtk-2.0 -I/opt/freeware/lib/gtk-2.0/include -I/opt/freeware/include/atk-1.0 -I/opt/freeware/include/cairo -I/opt/freeware/include/pango-1.0 -I/opt/freeware/include/glib-2.0 -I/opt/freeware/lib/glib-2.0/include -I/opt/freeware/include/gtk-unix-print-2.0   -I/opt/freeware/include/pango-1.0 -I/opt/freeware/include/glib-2.0 -I/opt/freeware/lib/glib-2.0/include -I/opt/freeware/include/cairo -I/opt/freeware/include -I/opt/freeware/include/fontconfig -I/opt/freeware/include/freetype2/freetype -I/opt/freeware/include/freetype2     -DMOZILLA_VERSION=\"1.9.0.1\" -DMOZILLA_VERSION_U=1.9.0.1 -DAIX=1 -DHAVE_SYS_INTTYPES_H=1 -DNSCAP_DISABLE_DEBUG_PTR_TYPES=1 -DD_INO=d_ino -DSTDC_HEADERS=1 -DHAVE_ST_BLKSIZE=1 -DHAVE_SIGINFO_T=1 -DHAVE_INT16_T=1 -DHAVE_INT32_T=1 -DHAVE_INT64_T=1 -DHAVE_INT64=1 -DHAVE_UINT=1 -DHAVE_UINT_T=1 -DHAVE_UINT16_T=1 -DHAVE_DIRENT_H=1 -DHAVE_MEMORY_H=1 -DHAVE_UNISTD_H=1 -DHAVE_NL_TYPES_H=1 -DHAVE_MALLOC_H=1 -DHAVE_X11_XKBLIB_H=1 -DHAVE_SYS_STATVFS_H=1 -DHAVE_SYS_STATFS_H=1 -DHAVE_LIBC_R=1 -DHAVE_LIBM=1 -DHAVE_LIBDL=1 -DHAVE_LIBC_R=1 -DFUNCPROTO=15 -DHAVE_XSHM=1 -DHAVE_FT_BITMAP_SIZE_Y_PPEM=1 -DHAVE_FT_LOAD_SFNT_TABLE=1 -D_REENTRANT=1 -DHAVE_RANDOM=1 -DHAVE_STRERROR=1 -DHAVE_LCHOWN=1 -DHAVE_FCHMOD=1 -DHAVE_SNPRINTF=1 -DHAVE_MEMMOVE=1 -DHAVE_RINT=1 -DHAVE_STAT64=1 -DHAVE_LSTAT64=1 -DHAVE_TRUNCATE64=1 -DHAVE_FLOCKFILE=1 -DHAVE_LOCALTIME_R=1 -DHAVE_STRTOK_R=1 -DHAVE_RES_NINIT=1 -DHAVE_LANGINFO_CODESET=1 -DHAVE_I18N_LC_MESSAGES=1 -DMOZ_EMBEDDING_LEVEL_DEFAULT=1 -DMOZ_EMBEDDING_LEVEL_BASIC=1 -DMOZ_EMBEDDING_LEVEL_MINIMAL=1 -DMOZ_PHOENIX=1 -DMOZ_BUILD_APP=browser -DMOZ_XUL_APP=1 -DMOZ_DEFAULT_TOOLKIT=\"cairo-gtk2\" -DMOZ_WIDGET_GTK2=1 -DMOZ_ENABLE_XREMOTE=1 -DMOZ_X11=1 -DMOZ_DISTRIBUTION_ID=\"org.mozilla\" -DMOZ_ENABLE_GCONF=1 -DMOZ_ENABLE_GNOMEUI=1 -DMOZ_ENABLE_DBUS=1 -DOJI=1 -DIBMBIDI=1 -DMOZ_VIEW_SOURCE=1 -DACCESSIBILITY=1 -DMOZ_XPINSTALL=1 -DMOZ_JSLOADER=1 -DNS_PRINTING=1 -DNS_PRINT_PREVIEW=1 -DMOZ_NO_XPCOM_OBSOLETE=1 -DMOZ_XTF=1 -DMOZ_CRASHREPORTER_ENABLE_PERCENT=100 -DMOZ_MATHML=1 -DMOZ_ENABLE_CANVAS=1 -DMOZ_SVG=1 -DMOZ_SVG_FOREIGNOBJECT=1 -DMOZ_UPDATE_CHANNEL=default -DMOZ_PLACES=1 -DMOZ_FEEDS=1 -DMOZ_STORAGE=1 -DMOZ_SAFE_BROWSING=1 -DMOZ_URL_CLASSIFIER=1 -DMOZ_LOGGING=1 -DMOZ_USER_DIR=\".mozilla\" -DMOZ_ENABLE_LIBXUL=1 -DHAVE_INTTYPES_H=1 -DMOZ_TREE_CAIRO=1 -DHAVE_UINT64_T=1 -DMOZ_XUL=1 -DMOZ_PROFILELOCKING=1 -DMOZ_RDF=1 -DMOZ_MORKREADER=1 -DMOZ_DLL_SUFFIX=\".so\" -DXP_UNIX=1 -DUNIX_ASYNC_DNS=1 -DJS_THREADSAFE=1 -DMOZ_ACCESSIBILITY_ATK=1 -DATK_MAJOR_VERSION=1 -DATK_MINOR_VERSION=12 -DATK_REV_VERSION=3 -DMOZILLA_LOCALE_VERSION=\"1.9a1\" -DMOZILLA_REGION_VERSION=\"1.9a1\" -DMOZILLA_SKIN_VERSION=\"1.8\"  -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT /home/ulink/Src/mozilla/gfx/thebes/src/gfxFontTest.cpp
"../../../dist/include/thebes/gfxFont.h", line 1221.28: 1540-0218 (S) The call does not match any parameter list for "operator[]".
"../../../dist/include/thebes/gfxFont.h", line 1241.49: 1540-0218 (S) The call does not match any parameter list for "operator[]".
gmake[6]: *** [gfxFontTest.o] Error 1
gmake[6]: Leaving directory `/home/ulink/Src/mozilla/AIX-51/com/gfx/thebes/src'
gmake[5]: *** [libs] Error 2

Expected Results:  
successful compilation
Keywords: helpwanted, platform
Version: unspecified → 1.9.0 Branch
Severity: normal → major
Keywords: helpwanted
Attachment #343867 - Flags: review?(vladimir)
Comment on attachment 343867 [details] [diff] [review]
using get() makes operator [] available

Ok with extra parens -- e.g. (mDetailedGlyphs.get())[aCharIndex]

But no promise that something similar won't reappear elsewhere in the code; you should upgrade compilers instead.
Still working on the AIX5 port:
After applying the extra parens as suggested I recently got a debug build that kindof works, only configured with --enable-system-cairo
after upgrading system cairo to ver 1.6.4 (which means upgrading Freetype and Fontconfig, too!)
When using the in tree cairo, the build crashes before the first windows appears.

The kindof working debug build refuses displaying the Help  -> About Firefox screen und on some Websites fonts are missing and I get PANGO error messages in the console from where I started Firefox.

Firefox 3.0.5 Release source
Pango is at 1.14 level
cairo is at 1.6.4
freetype is at 2.3.7
fontconfig is at 2.6.0
Hardware: Other → PowerPC
Patch with extra parens
Compiler Update to IBM XLC/C++ 7.0 with newest service pack also needs this patch
Attachment #343867 - Attachment is obsolete: true
Attachment #407778 - Flags: superreview?
Attachment #407778 - Flags: superreview? → superreview?(vladimir)
I believe this issue is similar to 
https://bugzilla.mozilla.org/show_bug.cgi?id=405426
This is the same bug, different solution.
Since it appears only in gfxFont.h / gfxFontTest.cpp fixing it here is more straightforward.
I don't agree, that it is a Compiler bug with AIX' C++ compiler: it's a GCC bug if it compiles without at least a warning, as there is implicit(!!!) overloading. What about type safety?

Updating the Compiler also means shipping an updated C++ runtime lib (xlC.aix50.rte) with Firefox/Seamonkey/Thunderbird. AIX 5.3 ships with xlC.aix50.rte version 6.0.0.13 which is the April 2004 fix set for VACPP 6.0.
This is what I try to use. And the only compiler problem I found is about initialization of static const member variables with forward declarations.
Also you must maintain ABI compatibility for the Java plugin.
(In reply to comment #5)
> I believe this issue is similar to 
> https://bugzilla.mozilla.org/show_bug.cgi?id=405426

I can confirm that with XLC/C++ 8.0.0.24 I don't need this patch any longer.
XLC/C++ does not imply other runtime dependencies than XLC/C++ 7 with latest fixes.

So it's ok to close this bug RESOLVED/WORKSFORME
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
IRIX MIPSPro 7.4.4m on IRIX 6.5.30 still gives an error on this exact same issue in gfxFont.h and since there is no newer compiler available, i would vote to include the patch
(In reply to comment #8)
> IRIX MIPSPro 7.4.4m on IRIX 6.5.30 still gives an error on this exact same
> issue in gfxFont.h and since there is no newer compiler available, i would vote
> to include the patch

Plz cc me for your porting bugs.
I'm happy to know of others not believing in GCC standards instead of ANSI standards, being blamed for using dumb compilers.
I'm a little tired of seeing C++ code hand-optimized for GCC 4.x on x86 >=i688 only.
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: nobody → ul.mcamafia
Status: NEW → ASSIGNED
Attachment #407778 - Attachment is obsolete: true
Attachment #407778 - Flags: superreview?(vladimir)
Comment on attachment 428475 [details] [diff] [review]
revised patch for 1.9.1 branch

copy review+ from https://bugzilla.mozilla.org/attachment.cgi?id=343867
Attachment #428475 - Flags: superreview?(roc)
Attachment #343867 - Attachment is obsolete: false
Attachment #428475 - Flags: superreview?(roc) → superreview+
Attachment #428475 - Flags: approval1.9.1.9?
Attachment #428475 - Flags: approval1.9.0.19?
This patch is helpful on branches 1.9.0 and 1.9.1 to support AIX 5.1

Makes no sense for branch 1.9.2 and trunk as they also need much newer versions of IBM XLC/C++ compiler, which will need minimum AIX 5.2.

Risc: no code change for everything but AIX.
This patch was locally applied for the SeaMonkey contributed builds and is well tested on AIX.
(In reply to comment #12)
> This patch is helpful on branches 1.9.0 and 1.9.1 to support AIX 5.1
> 
> Makes no sense for branch 1.9.2 and trunk as they also need much newer versions
> of IBM XLC/C++ compiler, which will need minimum AIX 5.2.
> 
> Risc: no code change for everything but AIX.
> This patch was locally applied for the SeaMonkey contributed builds and is well
> tested on AIX.

Sorry, plz forget bogus comment #12 (wrong bug#)
Should this be fixed on trunk before we check it into the branches? Is it also needed on mozilla-1.9.2?
The fix is needed as a quite clean workaround for older compilers, so I still can support AIX 4.3.3 and AIX 5.1.
I have built on CentOS 5.3 and WinXP with the above patch locally applied and not breaking anything.

Trunk and 1.9.2 js dir need to be compiled with (much) newer compiler versions  which won't need this fix, as mentioned in #c7.
Comment on attachment 428475 [details] [diff] [review]
revised patch for 1.9.1 branch

a1919 and a19019
Attachment #428475 - Flags: approval1.9.1.9?
Attachment #428475 - Flags: approval1.9.1.9+
Attachment #428475 - Flags: approval1.9.0.19?
Attachment #428475 - Flags: approval1.9.0.19+
Keywords: platformcheckin-needed
Status: ASSIGNED → RESOLVED
Closed: 15 years ago14 years ago
Resolution: --- → FIXED
Whiteboard: checkin needed to 1.9.1 and 1.9.0
https://hg.mozilla.org/releases/mozilla-1.9.1/rev/503dedfd656d
mozilla/gfx/thebes/public/gfxFont.h 	1.106
Whiteboard: checkin needed to 1.9.1 and 1.9.0
Keywords: verified1.9.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: