Last Comment Bug 448197 - compilation error in gfxFontTest.cpp on AIX 5.1
: compilation error in gfxFontTest.cpp on AIX 5.1
Status: RESOLVED FIXED
: verified1.9.0.19, verified1.9.1
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: 1.9.0 Branch
: PowerPC AIX
: -- major (vote)
: ---
Assigned To: Uli Link (:ul-mcamafia)
:
: Milan Sreckovic [:milan]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-27 11:37 PDT by Uli Link (:ul-mcamafia)
Modified: 2010-04-25 07:28 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
unaffected
.9-fixed


Attachments
using get() makes operator [] available (2.00 KB, patch)
2008-10-20 01:00 PDT, Uli Link (:ul-mcamafia)
vladimir: review+
Details | Diff | Splinter Review
revised patch for Mozilla 1.9.1.4 (1.78 KB, patch)
2009-10-22 09:23 PDT, Uli Link (:ul-mcamafia)
no flags Details | Diff | Splinter Review
revised patch for 1.9.1 branch (1.78 KB, patch)
2010-02-23 10:30 PST, Uli Link (:ul-mcamafia)
roc: superreview+
mbeltzner: approval1.9.1.9+
mbeltzner: approval1.9.0.19+
Details | Diff | Splinter Review

Description Uli Link (:ul-mcamafia) 2008-07-27 11:37:55 PDT
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 -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ANNEL=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
Comment 1 Uli Link (:ul-mcamafia) 2008-10-20 01:00:27 PDT
Created attachment 343867 [details] [diff] [review]
using get() makes operator [] available
Comment 2 Vladimir Vukicevic [:vlad] [:vladv] 2008-10-22 12:08:12 PDT
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.
Comment 3 Uli Link (:ul-mcamafia) 2009-01-04 03:23:56 PST
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
Comment 4 Uli Link (:ul-mcamafia) 2009-10-22 09:23:37 PDT
Created attachment 407778 [details] [diff] [review]
revised patch for Mozilla 1.9.1.4

Patch with extra parens
Compiler Update to IBM XLC/C++ 7.0 with newest service pack also needs this patch
Comment 5 Shailen 2009-10-22 21:28:21 PDT
I believe this issue is similar to 
https://bugzilla.mozilla.org/show_bug.cgi?id=405426
Comment 6 Uli Link (:ul-mcamafia) 2009-10-22 23:19:18 PDT
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.
Comment 7 Uli Link (:ul-mcamafia) 2009-11-01 02:42:50 PST
(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
Comment 8 Frank Everdij 2009-12-30 01:37:31 PST
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
Comment 9 Uli Link (:ul-mcamafia) 2009-12-30 02:15:11 PST
(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.
Comment 10 Uli Link (:ul-mcamafia) 2010-02-23 10:30:17 PST
Created attachment 428475 [details] [diff] [review]
revised patch for 1.9.1 branch
Comment 11 Uli Link (:ul-mcamafia) 2010-02-23 10:48:05 PST
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
Comment 12 Uli Link (:ul-mcamafia) 2010-02-23 11:37:34 PST
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.
Comment 13 Uli Link (:ul-mcamafia) 2010-02-23 11:40:35 PST
(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#)
Comment 14 Mike Beltzner [:beltzner, not reading bugmail] 2010-02-26 13:11:59 PST
Should this be fixed on trunk before we check it into the branches? Is it also needed on mozilla-1.9.2?
Comment 15 Uli Link (:ul-mcamafia) 2010-02-26 13:35:28 PST
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 16 Mike Beltzner [:beltzner, not reading bugmail] 2010-03-01 10:24:07 PST
Comment on attachment 428475 [details] [diff] [review]
revised patch for 1.9.1 branch

a1919 and a19019
Comment 17 :Gavin Sharp [email: gavin@gavinsharp.com] 2010-03-08 11:18:18 PST
https://hg.mozilla.org/releases/mozilla-1.9.1/rev/503dedfd656d
mozilla/gfx/thebes/public/gfxFont.h 	1.106

Note You need to log in before you can comment on or make changes to this bug.