Trouble compiling with gcc 3.4.0

Discussion about official Mozilla Firefox builds
askwar
Posts: 45
Joined: April 25th, 2003, 12:29 am

Trouble compiling with gcc 3.4.0

Post by askwar »

Hi.

I'm trying to compile Firefox trunk on a Mandrake Cooker ("10.1") system with gcc 3.4.0 with GTK+2 & Xft. I'm getting an error.

Did anyone succeed in compiling Ff w/ GTK2+Xft @ gcc3.4?

Here's the error I get:

Code: Select all

gfxImageFrame.cpp: In member function `virtual nsresult gfxImageFrame::Init(nscoord, nscoord, nscoord, nscoord, gfx_format, gfx_depth)':
gfxImageFrame.cpp:103: warning: 'maskReq' might be used uninitialized in this function
rm -f libgfxshared_s.a
ar cr libgfxshared_s.a nsRenderingContextImpl.o gfxImageFrame.o 
ranlib libgfxshared_s.a
/opt/tmp/src/mozilla/firefox/mozilla/config/nsinstall -R -m 644 libgfxshared_s.a ../../../dist/lib
gmake[5]: Leaving directory `/opt/tmp/src/mozilla/firefox/mozilla/gfx/src/shared'
gmake[5]: Entering directory `/opt/tmp/src/mozilla/firefox/mozilla/gfx/src/freetype'
nsFreeType.cpp
g++-3.4.0 -o nsFreeType.o -c -DOSTYPE=\"Linux2.6\" -DOSARCH=\"Linux\" -I../.. -I../../../dist/include/xpcom -I../../../dist/include/string -I../../../dist/include/pref -I../../../dist/include/uconv -I../../../dist/include/unicharutil -I../../../dist/include/gfx -I../../../dist/include -I/opt/tmp/src/mozilla/firefox/mozilla/dist/include/nspr     -I/usr/include/freetype2 -I/usr/X11R6/include     -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -march=athlon-xp -msse -funit-at-a-time -funroll-loops -fpeel-loops -funswitch-loops -O3 -pipe -fomit-frame-pointer -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -march=athlon-xp -msse -funit-at-a-time -funroll-loops -fpeel-loops -funswitch-loops -O3 -pipe -fomit-frame-pointer  -I/usr/X11R6/include -DMOZILLA_CLIENT -include ../../../mozilla-config.h -Wp,-MD,.deps/nsFreeType.pp nsFreeType.cpp
In file included from nsFreeType.h:55,
                 from nsFreeType.cpp:48:
../../../dist/include/gfx/nsIFreeType2.h:53: error: `GetImageCache' declared as a `virtual' field
../../../dist/include/gfx/nsIFreeType2.h:53: warning: `visibility' attribute ignored
../../../dist/include/gfx/nsIFreeType2.h:53: error: expected `;' before '(' token
../../../dist/include/gfx/nsIFreeType2.h:92: error: `ImageCacheLookup' declared as a `virtual' field
../../../dist/include/gfx/nsIFreeType2.h:92: warning: `visibility' attribute ignored
../../../dist/include/gfx/nsIFreeType2.h:92: error: expected `;' before '(' token
../../../dist/include/gfx/nsIFreeType2.h:104: error: `FTC_Image_Cache' has not been declared
../../../dist/include/gfx/nsIFreeType2.h:104: error: ISO C++ forbids declaration of `cache' with no type
In file included from nsFreeType.cpp:48:
nsFreeType.h:123: error: typedef `FTC_Image_Cache_Lookup_t' is initialized (use __typeof__ instead)
nsFreeType.h:123: error: `FTC_Image_Cache' was not declared in this scope
nsFreeType.h:123: error: `FTC_Image_Desc' was not declared in this scope
nsFreeType.h:123: error: expected primary-expression before ',' token
nsFreeType.h:123: error: expected primary-expression before ',' token
nsFreeType.h:123: error: expected primary-expression before '*' token
nsFreeType.h:123: error: expected primary-expression before ')' token
nsFreeType.h:129: error: `FTC_Image_Cache' has not been declared
nsFreeType.h:129: error: ISO C++ forbids declaration of `parameter' with no type
nsFreeType.h:161: error: `GetImageCache' declared as a `virtual' field
nsFreeType.h:161: warning: `visibility' attribute ignored
nsFreeType.h:161: error: expected `;' before '(' token
nsFreeType.h:161: error: `ImageCacheLookup' declared as a `virtual' field
nsFreeType.h:161: warning: `visibility' attribute ignored
nsFreeType.h:161: error: expected `;' before '(' token
nsFreeType.h:161: error: `FTC_Image_Cache' has not been declared
nsFreeType.h:161: error: ISO C++ forbids declaration of `cache' with no type
nsFreeType.h:232: error: `FTC_Image_Cache' does not name a type
nsFreeType.cpp:101: warning: invalid access to non-static data member `nsFreeType2::nsFT_Done_Face' of NULL object
nsFreeType.cpp:101: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:102: warning: invalid access to non-static data member `nsFreeType2::nsFT_Done_FreeType' of NULL object
nsFreeType.cpp:102: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:103: warning: invalid access to non-static data member `nsFreeType2::nsFT_Done_Glyph' of NULL object
nsFreeType.cpp:103: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:104: warning: invalid access to non-static data member `nsFreeType2::nsFT_Get_Char_Index' of NULL objectnsFreeType.cpp:104: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:105: warning: invalid access to non-static data member `nsFreeType2::nsFT_Get_Glyph' of NULL object
nsFreeType.cpp:105: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:106: warning: invalid access to non-static data member `nsFreeType2::nsFT_Get_Sfnt_Table' of NULL objectnsFreeType.cpp:106: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:107: warning: invalid access to non-static data member `nsFreeType2::nsFT_Glyph_Get_CBox' of NULL objectnsFreeType.cpp:107: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:108: warning: invalid access to non-static data member `nsFreeType2::nsFT_Init_FreeType' of NULL object
nsFreeType.cpp:108: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:109: warning: invalid access to non-static data member `nsFreeType2::nsFT_Load_Glyph' of NULL object
nsFreeType.cpp:109: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:110: warning: invalid access to non-static data member `nsFreeType2::nsFT_New_Face' of NULL object
nsFreeType.cpp:110: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:111: warning: invalid access to non-static data member `nsFreeType2::nsFT_Outline_Decompose' of NULL object
nsFreeType.cpp:111: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:112: warning: invalid access to non-static data member `nsFreeType2::nsFT_Set_Charmap' of NULL object
nsFreeType.cpp:112: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:113: warning: invalid access to non-static data member `nsFreeType2::nsFTC_Image_Cache_Lookup' of NULL object
nsFreeType.cpp:113: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:114: warning: invalid access to non-static data member `nsFreeType2::nsFTC_Manager_Lookup_Size' of NULL object
nsFreeType.cpp:114: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:115: warning: invalid access to non-static data member `nsFreeType2::nsFTC_Manager_Done' of NULL object
nsFreeType.cpp:115: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:116: warning: invalid access to non-static data member `nsFreeType2::nsFTC_Manager_New' of NULL object
nsFreeType.cpp:116: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:117: warning: invalid access to non-static data member `nsFreeType2::nsFTC_Image_Cache_New' of NULL object
nsFreeType.cpp:117: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:119: warning: invalid access to non-static data member `nsFreeType2::nsFT_Glyph_Transform' of NULL object
nsFreeType.cpp:119: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:120: warning: invalid access to non-static data member `nsFreeType2::nsFT_Get_Kerning' of NULL object
nsFreeType.cpp:120: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:121: warning: invalid access to non-static data member `nsFreeType2::nsFT_Glyph_Copy' of NULL object
nsFreeType.cpp:121: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:122: warning: invalid access to non-static data member `nsFreeType2::nsFT_Glyph_To_Bitmap' of NULL object
nsFreeType.cpp:122: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:124: warning: invalid access to non-static data member `nsFreeType2::nsFT_Get_First_Char' of NULL objectnsFreeType.cpp:124: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:125: warning: invalid access to non-static data member `nsFreeType2::nsFT_Get_Next_Char' of NULL object
nsFreeType.cpp:125: warning: (perhaps the `offsetof' macro was used incorrectly)
nsFreeType.cpp:285: error: `nsresult nsFreeType2::ImageCacheLookup' is not a static member of `class nsFreeType2'
nsFreeType.cpp:285: error: `FTC_Image_Cache' was not declared in this scope
nsFreeType.cpp:285: error: `FTC_Image_Desc' was not declared in this scope
nsFreeType.cpp:285: error: `desc' was not declared in this scope
nsFreeType.cpp:286: error: expected primary-expression before "glyphID"
nsFreeType.cpp:286: error: expected primary-expression before '*' token
nsFreeType.cpp:286: error: `glyph' was not declared in this scope
nsFreeType.cpp:287: error: initializer expression list treated as compound expression
nsFreeType.cpp:287: error: expected `,' or `;' before '{' token
nsFreeType.cpp:323: error: `FTC_Image_Cache' has not been declared
nsFreeType.cpp:324: error: ISO C++ forbids declaration of `cache' with no type
nsFreeType.cpp:392: error: `nsresult nsFreeType2::GetImageCache' is not a static member of `class nsFreeType2'
nsFreeType.cpp:392: error: `FTC_Image_Cache' was not declared in this scope
nsFreeType.cpp:392: error: `aCache' was not declared in this scope
nsFreeType.cpp:393: error: expected `,' or `;' before '{' token
nsFreeType.cpp: In member function `void nsFreeType2::ClearGlobals()':
nsFreeType.cpp:429: error: `mImageCache' undeclared (first use this function)
nsFreeType.cpp:429: error: (Each undeclared identifier is reported only once for each function it appears in.)
nsFreeType.cpp: In member function `PRBool nsFreeType2::InitLibrary()':
nsFreeType.cpp:668: error: `mImageCache' undeclared (first use this function)
gmake[5]: *** [nsFreeType.o] Error 1
gmake[5]: Leaving directory `/opt/tmp/src/mozilla/firefox/mozilla/gfx/src/freetype'
gmake[4]: *** [libs] Error 2
gmake[4]: Leaving directory `/opt/tmp/src/mozilla/firefox/mozilla/gfx/src'
gmake[3]: *** [libs] Error 2
gmake[3]: Leaving directory `/opt/tmp/src/mozilla/firefox/mozilla/gfx'
gmake[2]: *** [tier_9] Error 2
gmake[2]: Leaving directory `/opt/tmp/src/mozilla/firefox/mozilla'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/opt/tmp/src/mozilla/firefox/mozilla'
make: *** [build] Error 2
Command exited with non-zero status 2
peeknpoke
Posts: 21
Joined: April 13th, 2004, 3:56 pm
Location: Germany

Post by peeknpoke »

whats your version of freetype src?
did you also try the latest development snapshots?

peek n´poke
Yek
Posts: 463
Joined: December 10th, 2002, 8:23 pm

Post by Yek »

This probably isn't an exclusive gcc 3.4 error, since I'm building with 3.4 without any problems. It reminds me of an older freetype error, as peeknpoke implies.

On an older version, this file "/usr/include/freetype2/freetype/freetype.h" was including ft2build.h twice (or not including it at all) because of incorrect #ifdef logic. It might be worth a try to comment out the include for the moment and try again. (depending upon your version of freetype)

See the gcc 3.4 thread from a couple days ago in this forum for gcc 3.4 experiences. My 3.4 builds are really bullding quick and even running a little more quickly. Good luck

**edit**

Don't know what I'm thinking but peek had the right idea since this problem is fixed in more recent builds of freetype. Try to update your freetype/xft pkg and see if it goes away before messing with the modify.

Code: Select all

freetype-devel-2.1.7-4
freetype-2.1.7-4

are the version I'm using without trouble.
askwar
Posts: 45
Joined: April 25th, 2003, 12:29 am

Post by askwar »

Code: Select all

[alexander@server ~]$ rpm -qa | grep -i freetype
freetype-1.3.1-22mdk
gimp2-freetype-0.5-3mdk
libfreetype6-2.1.8-1plf
freetype-tools-1.3.1-22mdk
libfreetype6-devel-2.1.8-1plf


I cannot remove freetype-1.3.1-22mdk, because a whole lot of applications require it.

Hm, are you sure that my installed version of freetype is causing problems? I'm not too sure, because there's this error message:

Code: Select all

../../../dist/include/gfx/nsIFreeType2.h:53: error: `GetImageCache' declared as a `virtual' field 


nsIFreeType2.h is a Mozilla file.
Yek
Posts: 463
Joined: December 10th, 2002, 8:23 pm

Post by Yek »

No, I'm not sure of anything when doing builds :)

Its difficult to say to which point the errors will bubble up. So they might appear at some higher level but nsIFreeType2.h is a 'make' generated file since it's in dist and isn't even part of the mozilla tree until build time. It's not pulled from CVS. If its made incorrectly, then it could have been anything along the line but freetype is still a suspect. It comes from this template: ./gfx/idl/nsIFreeType2.idl, which has as it's first line #include 'ft2build.h' which is the file (or line in xft.h) I was wondering about.

What dependencies are you seeing on that file? Is it nearly all of X? Just curious. This bug with freetype & mozilla went on for a couple version of freetype but I can't recall which they were at this point. Since I probably install new versions of X (and everything else for that matter) nearly 2 or 3 times a week, because I'm testing fedora core II, its no big thing, but I can understand not wanting to rip your system up. To do effectively the same thing I suggested, you could try commenting out "include ft2build.h" in the .idl file I mentioned above.
askwar
Posts: 45
Joined: April 25th, 2003, 12:29 am

Post by askwar »

Code: Select all

[root@server ~]# rpm -e freetype-1.3.1-22mdk
Fehler: Failed dependencies:
        libttf.so.2 is needed by (installed) ghostscript-7.07-15mdk
        libttf.so.2 is needed by (installed) libimlib2_1-1.0.6-4mdk
        libttf.so.2 is needed by (installed) libgiblib1-1.2.3-2mdk
        libttf.so.2 is needed by (installed) freetype-tools-1.3.1-22mdk
        freetype = 1.3.1-22mdk is needed by (installed) freetype-tools-1.3.1-22mdk
[root@server ~]# urpme freetype-1.3.1-22mdk
Um die Abhängigkeiten zu erfüllen, werden die folgenden Pakete entfernt (141 MB):
ImageMagick-5.5.7.17-2plf.i586 (due to missing ghostscript)
OpenOffice.org-1.1-11mdk.i586 (due to missing ghostscript, due to unsatisfied OpenOffice.org-l10n == 1.1)
OpenOffice.org-help-de-1.1-11mdk.i586 (due to unsatisfied OpenOffice.org == 1:1.1)
OpenOffice.org-l10n-de-1.1-11mdk.i586 (due to unsatisfied OpenOffice.org == 1:1.1)
a2ps-4.13b-4mdk.i586 (due to missing ImageMagick)
cups-drivers-1.1-134mdk.i586 (due to unsatisfied ghostscript >= 7.05)
drakconf-10-13mdk.i586 (due to unsatisfied drakxtools > 10-12mdk, due to unsatisfied userdrake >= 0.92-6mdk, due to unsatisfied harddrake-ui > 10-12mdk)
drakconf-themes-0.96-16plf.i586 (due to unsatisfied drakconf >= 0.96)
drakxtools-10-32mdk.i586 (due to missing font-tools, due to missing gurpmi)
font-tools-0.1-10mdk.i586 (due to missing freetype-tools)
foomatic-db-3.0.1-0.20040302.4mdk.i586 (due to missing ghostscript, due to missing printer-filters)
freetype-1.3.1-22mdk.i586
freetype-tools-1.3.1-22mdk.i586 (due to missing libttf.so.2, due to unsatisfied freetype == 1.3.1-22mdk)
ggv-2.6.1-2mdk.i586 (due to missing ghostscript-module-X)
ghostscript-7.07-15mdk.i586 (due to missing libttf.so.2)
ghostscript-module-X-7.07-15mdk.i586 (due to missing ghostscript[*])
gurpmi-4.4.5-10mdk.noarch (due to unsatisfied drakxtools > 10-0.4mdk)
gv-3.5.8-31mdk.i586 (due to missing ghostscript-module-X)
harddrake-ui-10-32mdk.i586 (due to unsatisfied drakxtools == 10-32mdk)
libgiblib1-1.2.3-2mdk.i586 (due to missing libttf.so.2, due to missing libImlib2.so.1)
libimlib2_1-1.0.6-4mdk.i586 (due to missing libttf.so.2, due to unsatisfied libimlib2_1-loaders == 1.0.6-4mdk, due to unsatisfied libimlib2_1-filters == 1.0.6-4mdk)
libimlib2_1-filters-1.0.6-4mdk.i586 (due to unsatisfied libimlib2_1 == 1.0.6-4mdk)
libimlib2_1-loaders-1.0.6-4mdk.i586 (due to missing libImlib2.so.1, due to unsatisfied libimlib2_1 == 1.0.6-4mdk)
mdk-check-update-gnome-0.1.0-2mdk.i586 (due to missing rpmdrake)
nautilus_thumbnailers-0.0.3-2mdk.noarch (due to missing ghostscript)
oooqs-2.0.3-3mdk.i586 (due to missing OpenOffice.org)
printer-filters-1.0-134mdk.i586 (due to missing ghostscript[*])
rpmdrake-2.1.2-12mdk.i586 (due to unsatisfied drakxtools > 10-23mdk, due to unsatisfied gurpmi >= 4.4.1)
userdrake-0.92-30mdk.i586 (due to unsatisfied drakxtools >= 9.2-0.15mdk)


I'll try remving that line from ./gfx/idl/nsIFreeType2.idl

Let's see if it works.

Could you try to update to freetype 2.1.8 and see if make failes for you as well?
Yek
Posts: 463
Joined: December 10th, 2002, 8:23 pm

Post by Yek »

I think we're looking at apples & oranges because of distro oddities, unfortunately. All freetype lib related build stuff is in freetype-devel on mine, which is at 2.1.8-pre (or *7-x) and yours doesn't appear to have freetype-devel installed. Have you built successfully on any version of mandrake cooker yet? I don't know whether you update the distro using apt, yum, rpm, whatever, but can you install freetype-devel? Otherwise we're just looking at things that are too different to test with because freetype itself includes nothing for building mozilla, but freetype-devel includes all of the freetype headers.

FC2 dev branch is updated daily or every other day, with nearly complete replacements for xorg(the free replacement for XFree) and too many other things to mention so 2.1.8 will likely appear this week.

To be more exact about what I suspected, this file:

/usr/include/freetype2/freetype/freetype.h

on my distro which is from freetype-devel, starts off with this clause:

Code: Select all

#ifndef FT_FREETYPE_H
#error "`ft2build.h' hasn't been included yet!"
#error "Please always use macros to include FreeType header files."
#error "Example:"
#error "  #include <ft2build.h>"
#error "  #include FT_FREETYPE_H"
#endif


Which is fairly new and is there because of incorrect ft2build.h includes.

That's why I thought playing with the include would be worth a try but now that I see your distro is so much different, I'm thinking you should just try to find freetype2.h before messing around with that. If its not there, then perhaps installing freetype-devel would help.
User avatar
vande198
Posts: 69
Joined: December 3rd, 2002, 7:31 am
Contact:

Post by vande198 »

Freetype1 and Freetype2 can coexist, btw. I believe that you only use freetype2 if you specify it in your mozconfig.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040303 Firefox/0.8 -- Celeron 2ghz; ArchLinux (current) [http://www.archlinux.org]
Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.6) Gecko/20040303 Firefox/0.8 -- PentiumMMX 266mhz; Slackware (current) [http://www.slackware.org]
webmedic
Posts: 2
Joined: January 20th, 2004, 10:29 pm

Post by webmedic »

Askwar has been building for a while so if he comes here asking it's not some simple stumper. But then again who knows.

Askwar could you send me the files I can test the build on my system also.
askwar
Posts: 45
Joined: April 25th, 2003, 12:29 am

Post by askwar »

webmedic: Thanks, I can "defend" myself just fine, if "attacked" *G* And I didn't feel "attacked" at all....
Which files do you need? Check out:
  • <a href="http://alexander.skwar.name/mozilla/20040426,0000/firefox-svg-libart_gtk2+xft_athlon-xp_sse_funit-at-a-time_funroll-loops_fpeel-loops_funswitch-loops_O3.20040426,0000.mozconfig">Todays mozconfig</a>
  • <a href="http://alexander.skwar.name/mozilla/BuildAll.sh">Build script</a>


vande198: My mozconfig contains: ac_add_options --enable-freetype2. So I suppose I'm fine.

Yek: I do have freetype-devel installed. Mandrake names library packages kinda like Debian does it, so freetype-devel is named <a href="http://rpms.mandrakeclub.com/rpms/Mandrake/devel/cooker/i586/Mandrake/RPMS/libfreetype6-devel-2.1.7-4mdk.i586.html">libfreetype6-devel-2.1.8-1plf</a> which is indeed installed. My freetype.h starts with (disregarding a multiline comment at the very top):

Code: Select all

#ifndef FT_FREETYPE_H
#error "`ft2build.h' hasn't been included yet!"
#error "Please always use macros to include FreeType header files."
#error "Example:"
#error "  #include <ft2build.h>"
#error "  #include FT_FREETYPE_H"
#endif


#ifndef __FREETYPE_H__
#define __FREETYPE_H__

Code: Select all

[alexander@server ~]$ wc -l /usr/include/freetype2/freetype/freetype.h
3015 /usr/include/freetype2/freetype/freetype.h
[alexander@server ~]$ md5sum /usr/include/freetype2/freetype/freetype.h
f09bc3e07ab190cb70ff8ed9f718143b  /usr/include/freetype2/freetype/freetype.h
Yek
Posts: 463
Joined: December 10th, 2002, 8:23 pm

Post by Yek »

Askwar: A few more questions lol :)

Has Mandrake gone over to using xorg, or is it still using the XFree86 branch?

How would you feel about trying it with a .mozconfig I made and tried which works with gcc 3.4? Its simple because I figured it out from an "about:buildconfig" on an official build a few days back. If for some reason, it worked, it'd let you add in your own config choices until something broke it. Just a thought. I've actually manage to break the build process with unfathomable errors by adding in compile time switches I wasn't entirely certain of, not that you're doing that.

Anyway, here's what I'm using that works fine on the last 3 day's builds:

Code: Select all

. $topsrcdir/browser/config/mozconfig
CC=gcc34
CXX=g++34
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --enable-xft
ac_add_options --enable-freetype2
ac_add_options --enable-default-toolkit=gtk2
ac_add_options --enable-official-branding
ac_add_options --enable-optimize="-Os -march=athlon-xp -msse -freorder-blocks -gstabs+"


** add or remove static/shared as you like, the official was static, I chose shared.
*** CC= & CXX= are specific to my multi-versioned gcc fedora II system. Probably there's no need or use in your setting them that way.
**** I added in freetype2 which is of course not enabled officially but works ok for me.

Wish I could be of more help, but when I get an error like you've got, it basically just drives me nuts until I figure out a workaround or figure out what I've done wrong. Never seems to be an easy way, but the solution always seems so damn obvious :)

g/l

btw: I'm testing today's build using a static build but otherwise like the above .mozconfig. I'll post back and edit this to mention whether it gave errors.
Yek
Posts: 463
Joined: December 10th, 2002, 8:23 pm

Post by Yek »

I was searching around for references to this type of error, having had a similar one but not on freetype in the past, and happened across this at URL: http://www.freetype.org/pipermail/freet ... 06633.html , which is a freetype.org forum.

It appears that FTC_Image_Cache is deprecated to what's in the quote below. Seems like this could possibly be at the core of your problems, and a firefox bug.

Now I've got to wonder why its not happening to me ? :) I'm still awaiting completion of the static build, and for all I know, my oddball fedora modified build of freetype2 is still using the older model. Anyway, maybe this is of use to you: If it turns out you can prove it, put up a bugzilla on it, or let me know and I will.



Hi,

While trying to figure out why Mozilla doesn't make use of freetype
printing code, I found that FTC_Image_Cache* had gone (I updated
freetype2 library a few days ago.) They are deprecated and I guess I
have to fix Mozilla to use new APIs (FTC_ImageCache*). Before doing
that, I'd like to know when (in what version of freetype2)
FTC_ImageCache* APIs were introduced. If it were introduced a long time
ago, I can exclusively use FTC_ImageCache*. Otherwise, I may have to add
a run-time check.

Thanks,

Jungshik

> [...] I'd like to know when (in what version of freetype2)
> FTC_ImageCache* APIs were introduced. If it were introduced a long
> time ago, I can exclusively use FTC_ImageCache*. Otherwise, I may
> have to add a run-time check.

The conversion FTC_Image_Cache* to FTC_ImageCache seems to have
happened on 2001-10-26; this corresponds to FreeTyoe version 2.0.6.
For a definite answer you could use the web interface to the CVS.



and also: I just realized I still had a built tree of yesterday (dynamic but otherwise as in my last post), so I looked at your errors

Code: Select all

In file included from nsFreeType.h:55,
                 from nsFreeType.cpp:48:
../../../dist/include/gfx/nsIFreeType2.h:53: error: `GetImageCache' declared as a `virtual' field
../../../dist/include/gfx/nsIFreeType2.h:53: warning: `visibility' attribute ignored
../../../dist/include/gfx/nsIFreeType2.h:53: error: expected `;' before '(' token
../../../dist/include/gfx/nsIFreeType2.h:92: error: `ImageCacheLookup' declared as a `virtual' field


and realized that in the dynamic build, those 'virtual' fields aren't declared as 'virtual' fields at all. I'm still holding out hopes that its broken in the static build only. I've had many problems with static builds from back 3-5 months ago before linux static builds worked at all, in fact I may have filed one of the first bug reports about that. Anyway, I'll try to update this post as soon as the static build test either finishes or fails.

No problems with statics for a few months, but perhaps gcc3.4 + freetype2 + static = trouble. :)
Yek
Posts: 463
Joined: December 10th, 2002, 8:23 pm

Post by Yek »

Ok, my last update here for a bit (have to actually work):

I built it static and it works fine on today's cvs, as with my .mozconfig above (somewhere). So much for that theory..
askwar
Posts: 45
Joined: April 25th, 2003, 12:29 am

Firefox/Mozilla vs. freetype 2.1.8?

Post by askwar »

I downgraded freetype to 2.1.7 (I had 2.1.8 ) and was able to build Mozilla with my usual "complicated" .mozconfig. Did you have a chance to upgrade your freetype to 2.1.8?

BTW: Could somebody please checkout my build? Since I don't have an Athlon XP, I cannot do it myself :( The build can be found here:

<a href="http://alexander.skwar.name/mozilla/20040426,0000/firefox-svg-libart_gtk2+xft_athlon-xp_sse_funit-at-a-time_funroll-loops_fpeel-loops_funswitch-loops_O3.20040426,0000.cpio.bz2">Firefox gcc3.4.0 Athlon XP GTK2 Xft Freetype 2.1.7</a>

That's a bzip2'd cpio file. To unpack, you download the file and then do:

Code: Select all

bzcat file.cpio.bz2 | cpio -idm

Instead of "file.cpio.bz2", you'd give the full file name. This will create a folder called "firefox" which contains, well, Firefox ;)

Mandake Cooker is still using XFree86.
askwar
Posts: 45
Joined: April 25th, 2003, 12:29 am

Post by askwar »

Ah, that's <a title="FreeType 2.1.8 compilation error again" href="http://bugzilla.mozilla.org/show_bug.cgi?id=241290">Bug 241290</a>, which I just discovered.
Post Reply