I wanted to remerge mozilla-firefox 1.0-r3 today, and it failed. I did build it before, where it worked, though. Looking at the error messages, I thought it was some cairo (mozsvg) related problem, and was able to fix it. I got this error now and not before because the other time I had Cairo 0.2.0 on my system, 0.3.0 now. Adding an inclusion of "cairo-xlib.h" to one file and "stdlib.h" to another one fixed all issues. I cannot remember which files though, sorry. I did not try to "reproduce" this because building firefox is a terrible thing ;)
Beware mozilla folks, cairo-0.3.0 changed the header layout significantly to break out the various components.
Actual error: pe2 -I/usr/include/cairo -I/usr/include/libpng12 -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtk- 2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/in clude/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DMOZILLA_CLIENT -include ../../.. /../../mozilla-config.h -Wp,-MD,.deps/nsSVGCairoGlyphMetrics.pp nsSVGCairoGlyphMetrics.cpp nsSVGCairoGlyphMetrics.cpp: In member function `virtual nsresult nsSVGCairoGlyphMetrics::Update(PRUint32, PRBool* )': nsSVGCairoGlyphMetrics.cpp:324: error: `free' undeclared (first use this function) nsSVGCairoGlyphMetrics.cpp:324: error: (Each undeclared identifier is reported only once for each function it app freetype2/config -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DMOZILLA_CLIENT -include ../../../../../mozilla-config.h -Wp,-MD,.deps/nsSVGCairoPathBuilder.pp nsSVGCairoPathBuilder.cpp nsSVGCairoRegion.cpp c++ -o nsSVGCairoRegion.o -c -DOSTYPE=\"Linux2.6\" -DOSARCH=\"Linux\" -I../../../../../gfx/src -I../../../../../gfx/src/gtk -I../../../../../dist/include/xpcom -I../../../../../dist/include/widget -I../../../../../dist/include/pref -I../../../../../dist/include/gfx -I../../../../../dist/include/imglib2 -I../../../../../dist/include/string -I../../../../../dist/include/dom -I../../../../../dist/include/content -I../../../../../dist/include/necko -I../../../../../dist/include/util -I../../../../../dist/include/uconv -I../../../../../dist/include/windowwatcher -I../../../../../dist/include/layout -I../../../../../dist/include -I/var/tmp/portage/mozilla-firefox-1.0-r3/work/mozilla/dist/include/nspr -fPIC -fno-rtti -fno-exceptions -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -march=athlon-xp -pipe -Wno-deprecated -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -ffunction-sections -O2 -I/usr/include/freetype2 -I/usr/include/cairo -I/usr/include/libpng12 -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DMOZILLA_CLIENT -include ../../../../../mozilla-config.h -Wp,-MD,.deps/nsSVGCairoRegion.pp nsSVGCairoRegion.cpp nsSVGCairoGlyphMetrics.cpp c++ -o nsSVGCairoGlyphMetrics.o -c -DOSTYPE=\"Linux2.6\" -DOSARCH=\"Linux\" -I../../../../../gfx/src -I../../../../../gfx/src/gtk -I../../../../../dist/include/xpcom -I../../../../../dist/include/widget -I../../../../../dist/include/pref -I../../../../../dist/include/gfx -I../../../../../dist/include/imglib2 -I../../../../../dist/include/string -I../../../../../dist/include/dom -I../../../../../dist/include/content -I../../../../../dist/include/necko -I../../../../../dist/include/util -I../../../../../dist/include/uconv -I../../../../../dist/include/windowwatcher -I../../../../../dist/include/layout -I../../../../../dist/include -I/var/tmp/portage/mozilla-firefox-1.0-r3/work/mozilla/dist/include/nspr -fPIC -fno-rtti -fno-exceptions -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -march=athlon-xp -pipe -Wno-deprecated -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -ffunction-sections -O2 -I/usr/include/freetype2 -I/usr/include/cairo -I/usr/include/libpng12 -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DMOZILLA_CLIENT -include ../../../../../mozilla-config.h -Wp,-MD,.deps/nsSVGCairoGlyphMetrics.pp nsSVGCairoGlyphMetrics.cpp nsSVGCairoGlyphMetrics.cpp: In member function `virtual nsresult nsSVGCairoGlyphMetrics::Update(PRUint32, PRBool*)': nsSVGCairoGlyphMetrics.cpp:324: error: `free' undeclared (first use this function) nsSVGCairoGlyphMetrics.cpp:324: error: (Each undeclared identifier is reported only once for each function it appears in.) gmake[6]: *** [nsSVGCairoGlyphMetrics.o] Error 1 gmake[6]: *** Waiting for unfinished jobs.... nsSVGCairoCanvas.cpp: In member function `nsresult nsSVGCairoCanvas::Init(nsIRenderingContext*, nsIPresContext*, const nsRect&)': nsSVGCairoCanvas.cpp:121: error: `cairo_set_target_drawable' undeclared (first use this function) nsSVGCairoCanvas.cpp:121: error: (Each undeclared identifier is reported only once for each function it appears in.) gmake[6]: *** [nsSVGCairoCanvas.o] Error 1 gmake[6]: Leaving directory `/var/tmp/portage/mozilla-firefox-1.0-r3/work/mozilla/layout/svg/renderer/src/cairo' gmake[5]: *** [libs] Error 2 gmake[5]: Leaving directory `/var/tmp/portage/mozilla-firefox-1.0-r3/work/mozilla/layout/svg/renderer/src' gmake[4]: *** [libs] Error 2 gmake[4]: Leaving directory `/var/tmp/portage/mozilla-firefox-1.0-r3/work/mozilla/layout/svg/renderer' gmake[3]: *** [libs] Error 2 gmake[3]: Leaving directory `/var/tmp/portage/mozilla-firefox-1.0-r3/work/mozilla/layout/svg' gmake[2]: *** [libs] Error 2 gmake[2]: Leaving directory `/var/tmp/portage/mozilla-firefox-1.0-r3/work/mozilla/layout' gmake[1]: *** [tier_9] Error 2 gmake[1]: Leaving directory `/var/tmp/portage/mozilla-firefox-1.0-r3/work/mozilla' make: *** [default] Error 2
Please see bug #80301 for a patch to the mozilla sources to work with cairo-0.3.0. @Mozilla herd: can we consolidate bugs #80301, #80637, and this bug, as they are all the same problem due to the new cairo version?
This one specifically has been resolved - looking at incorporating the same fix into mozilla itself.