Closed
Bug 375506
Opened 18 years ago
Closed 18 years ago
Fix for bug 372629 breaks Mingw - build error in gfxWindowsFonts.cpp
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bengt.erik.soderstrom, Assigned: martijn.martijn)
References
Details
(Keywords: regression)
Attachments
(2 files, 1 obsolete file)
2.57 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
2.32 KB,
patch
|
Details | Diff | Splinter Review |
I think the fix for bug 372629 broke Mingw builds:
d:/mozilla/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp: In member function `HFONT
__* gfxWindowsFont::MakeHFONT()':
d:/mozilla/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp:232: warning: comparison b
etween signed and unsigned integer expressions
d:/mozilla/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp: In function `PRBool Setup
TextRunFromGlyphs(gfxTextRun*, WCHAR*, HDC__*, gfxWindowsFont*)':
d:/mozilla/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp:662: error: `GetTextExtent
ExPointI' was not declared in this scope
d:/mozilla/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp:662: warning: unused varia
ble 'GetTextExtentExPointI'
d:/mozilla/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp: In member function `void
gfxWindowsFontGroup::InitTextRunGDI(gfxContext*, gfxTextRun*, const char*, PRUin
t32)':
d:/mozilla/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp:706: error: invalid conver
sion from `WCHAR*' to `WORD*'
d:/mozilla/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp: In member function `void
gfxWindowsFontGroup::InitTextRunGDI(gfxContext*, gfxTextRun*, const PRUnichar*,
PRUint32)':
d:/mozilla/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp:730: error: invalid conver
sion from `WCHAR*' to `WORD*'
d:/mozilla/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp: In constructor `Uniscribe
Item::UniscribeItem(gfxContext*, HDC__*, const PRUnichar*, PRUint32, SCRIPT_ITEM
*, gfxWindowsFontGroup*)':
d:/mozilla/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp:1426: warning: `UniscribeI
tem::mAlternativeString' will be initialized after
d:/mozilla/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp:1420: warning: `SCRIPT_I
TEM*UniscribeItem::mScriptItem'
d:/mozilla/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp:894: warning: when initi
alized here
d:/mozilla/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp:1435: warning: `UniscribeI
tem::mNumGlyphs' will be initialized after
d:/mozilla/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp:1434: warning: `int Unis
cribeItem::mMaxGlyphs'
d:/mozilla/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp:894: warning: when initi
alized here
d:/mozilla/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp: In member function `void
gfxWindowsFontGroup::InitTextRunUniscribe(gfxContext*, gfxTextRun*, const PRUnic
har*, PRUint32)':
d:/mozilla/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp:1538: warning: unused vari
able 'fontIndex'
../../../dist/include/thebes/gfxWindowsFonts.h: At global scope:
../../../dist/include/thebes/gfxWindowsFonts.h:232: warning: 'PRUint8 CharRangeB
it(PRUint32)' defined but not used
make[6]: *** [gfxWindowsFonts.o] Error 1
make[6]: Leaving directory `/cygdrive/d/mozilla/mozilla/object-mingw/gfx/thebes/
src'
make[5]: *** [libs] Error 2
make[5]: Leaving directory `/cygdrive/d/mozilla/mozilla/object-mingw/gfx/thebes'
make[4]: *** [libs] Error 2
make[4]: Leaving directory `/cygdrive/d/mozilla/mozilla/object-mingw/gfx'
make[3]: *** [libs_tier_gecko] Error 2
make[3]: Leaving directory `/cygdrive/d/mozilla/mozilla/object-mingw'
make[2]: *** [tier_gecko] Error 2
make[2]: Leaving directory `/cygdrive/d/mozilla/mozilla/object-mingw'
make[1]: *** [alldep] Error 2
make[1]: Leaving directory `/cygdrive/d/mozilla/mozilla/object-mingw'
make: *** [alldep] Error 2
Updated•18 years ago
|
Component: Build Config → GFX: Thebes
Product: Firefox → Core
QA Contact: build.config → thebes
Updated•18 years ago
|
Blocks: 372629
Keywords: regression
I don't have mingw installed, can someone give me a patch? It shouldn't be hard except I'm not sure why GetTextExtentExPointI is undefined.
Assignee | ||
Comment 2•18 years ago
|
||
Sorry for the delay, this is a fix similar to the one in bug 373010.
This doesn't fix the 'GetTextExtentExPointI' issue. It seems to me that part should be fixed in wingdi.h.
Attachment #260344 -
Flags: review?(roc)
Assignee | ||
Comment 3•18 years ago
|
||
Like this, the wingdi.h file resides (for me) in c:\mozilla\mingw\include\
Hans-Andreas, is this a correct patch? Or should this be somewhere fixed in Mozilla's repository? I have no idea where/how to submit patches to mingw.
This patch, combined with the previous patch makes thebes compile again.
Comment 4•18 years ago
|
||
Indeed wingdi.h is not part of the mozilla repository, http://lxr.mozilla.org/seamonkey/find?string=wingdi.h
You can submit patches to MinGW/w32api to its sourceforge page. As an example you might take a look at one of the patches I have submitted there.
http://sourceforge.net/tracker/index.php?func=detail&aid=1456159&group_id=2435&atid=302435
Submitting went very smooth and Danny Smith's responses were timely.
As soon as a w32api version containing your patch comes out, it would be useful if you post the version number here.
There is no unique location wingdi.h, it depends how you have configured your build environment. It is just important that one only has it in ONE location, to be sure that one patches the right file :)
Thank you for keeping the MinGW build alive!
Assignee | ||
Comment 5•18 years ago
|
||
Thanks for the info.
It's pure self interest to keep the mingw build alive.
Apparently, something is missing in my patches, I get this build error (a linker error?):
rm -f thebes.dll
/cygdrive/c/mozilla/mozilla/build/cygwin-wrapper g++ -mno-cygwin -shared -Wl,--o
ut-implib -Wl,libthebes.dll.a -o thebes.dll gfxASurface.o gfxAlphaRecovery.o gf
xContext.o gfxImageSurface.o gfxFont.o gfxFontTest.o gfxMatrix.o gfxFontMissingG
lyphs.o gfxPattern.o gfxPlatform.o gfxRect.o gfxSkipChars.o gfxTextRunCache.o gf
xWindowsFonts.o gfxWindowsPlatform.o gfxWindowsSurface.o gfxWindowsNativeDrawing
.o nsUnicodeRange.o gfxPDFSurface.o ./module.res -Wl,--whole-archive
../../../gfx/cairo/cairo/src/libmozcairo.a ../../../gfx/cairo/libpixman/src/libm
ozlibpixman.a -Wl,--no-whole-archive ../../../dist/lib/libunicharutil_s.a -L../
../../dist/lib -lxpcom -lxpcom_core -L../../../dist/lib -lnspr4 -lplc4 -lplds4 -
L../../../modules/zlib/src -lmozz -lm -lgdi32 -lwinmm -lwsock32 -lusp10 -luui
d -lgdi32
Creating library file: libthebes.dll.a
gfxWindowsFonts.o: In function `Z22SetupTextRunFromGlyphsP10gfxTextRunPwP5HDC(gf
xWindowsFont *)':c:/mozilla/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp:662: unde
fined reference to `GetTextExtentExPointI@28'
collect2: ld returned 1 exit status
make[3]: *** [thebes.dll] Error 1
make[3]: Leaving directory `/cygdrive/c/mozilla/mozilla/gfx/thebes/src'
make[2]: *** [libs] Error 2
make[2]: Leaving directory `/cygdrive/c/mozilla/mozilla/gfx/thebes'
make[1]: *** [libs] Error 2
make[1]: Leaving directory `/cygdrive/c/mozilla/mozilla/gfx'
make: *** [all] Error 2
C:\mozilla\mozilla\gfx>
Comment 6•18 years ago
|
||
Probably you have to update the .def file as well, see e.g. my patch/file usp10.h at http://sourceforge.net/tracker/index.php?func=detail&aid=1456654&group_id=2435&atid=302435
Then you have to rebuild (make) the w32api.
I do not remember the details, but with these hints you should be able to fix your problem quickly.
Assignee | ||
Comment 7•18 years ago
|
||
Thanks! This makes it work.
For people who want to know how to download and build the w32api from source, see the instructions from Hans-Andreas in bug 328499, comment 48.
Attachment #260346 -
Attachment is obsolete: true
Assignee | ||
Comment 8•18 years ago
|
||
Indeed, submitting to the sourceforge page went very smooth:
http://sourceforge.net/tracker/index.php?func=detail&aid=1693515&group_id=2435&atid=302435
Reporter | ||
Comment 9•18 years ago
|
||
I have now tested your patch for Mingw and for gfxWindowsFonts.cpp. It works fine!
Maybe we can ask Pavlov who has lately made changes to gfxWindowsFonts.cpp to review and after OK check-in. (I have put him on the cc list.)
Hopefully the Mingw will be checked in soon.
Thanks again, Martijn.
Attachment #260344 -
Flags: review?(roc) → review+
Assignee | ||
Comment 10•18 years ago
|
||
Checking in gfxWindowsFonts.cpp;
/cvsroot/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp,v <-- gfxWindowsFonts.cpp
new revision: 1.106; previous revision: 1.105
done
Checked into trunk.
Assignee: nobody → martijn.martijn
Assignee | ||
Updated•18 years ago
|
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•18 years ago
|
Attachment #260442 -
Attachment is patch: true
Attachment #260442 -
Attachment mime type: application/octet-stream → text/plain
Assignee | ||
Comment 11•18 years ago
|
||
I haven't heard back from ming sourceforge yet. (see comment 8). Not idea what's going on there.
Comment 12•18 years ago
|
||
Martijn, you might try to ask Danny Smith [dannysmith () clear.net.nz] to commit your patches. He was very friendly and helpful with my patches about a year ago.
Assignee | ||
Comment 13•18 years ago
|
||
Ok, thanks. Indeed that helped. He responded almost immediately and it's now checked into the mingw repository.
You need to log in
before you can comment on or make changes to this bug.
Description
•