If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

‘cairo_font_type_t’ was not declared in this scope (or does not name a type)




Build Config
10 years ago
4 years ago


(Reporter: Marc-Andre Lureau, Unassigned)


1.8 Branch

Firefox Tracking Flags

(Not tracked)





10 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20061201 Firefox/ (Ubuntu-feisty)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20061201 Firefox/ (Ubuntu-feisty)

Cannot compile mozilla and with various version of gcc/g++
and recent versions of cairo&pango.

Reproducible: Always

Steps to Reproduce:
mozilla or source tarball + recents pango&cairo installed + gcc 4.1.2 (or lower)

with configure:
--enable-default-toolkit=gtk2 --disable-mailnews --disable-ldap --disable-debug --enable-optimize --disable-tests --enable-crypto --enable-xft --with-system-zlib --disable-freetype2 --enable-application=browser --disable-javaxpcom --enable-application=browser --enable-extensions=default,cookie,permissions --with-default-mozilla-five-home=${libdir}/firefox-2.0

Actual Results:  
‘cairo_font_type_t’ was not declared in this scope (or does not name a type)

Expected Results:  
(should compile successfuly)

Comment 1

10 years ago
By default, mozilla uses its own cairo version which is 1.0.0. However recent pango versions requires cairo 1.2 or greater

To use your own cairo version, you should use the configure's option: --enable-system-cairo
this bug is visible to Ubuntu Gutsy Gibbon (7.10) users.
Ever confirmed: true

Comment 3

10 years ago
Verify that this bug is also seen in gnome release 2.10 -- Cairo 1.4.10.  Mozilla  / seamonkey release 1.1.6 tarball.   System build is on an smp X64 machine running SUSE 10.2   Suggested cure "--enable-system-cairo"  has no effect.

Comment 4

10 years ago
I have the same problem using OpenSUSE 10.3

after trying the propesed workaround (--enable-system-cairo) I get the following errors:

../../dist/lib/libgkconcvs_s.a(nsCanvasRenderingContext2D.o): In function `nsCanvasRenderingContext2D::Destroy()':
nsCanvasRenderingContext2D.cpp:(.text+0x7464): undefined reference to `XFreePixmap'
../../dist/lib/libgkconcvs_s.a(nsCanvasRenderingContext2D.o): In function `nsCanvasRenderingContext2D::SetDimensions(int, int)':
nsCanvasRenderingContext2D.cpp:(.text+0x7529): undefined reference to `XRenderFindStandardFormat'
nsCanvasRenderingContext2D.cpp:(.text+0x7554): undefined reference to `XListPixmapFormats'
nsCanvasRenderingContext2D.cpp:(.text+0x7596): undefined reference to `XFree'
nsCanvasRenderingContext2D.cpp:(.text+0x75fa): undefined reference to `XCreatePixmap'

any help appreciated!


10 years ago
Duplicate of this bug: 386679

Comment 6

10 years ago
I'm seeing this on Gutsy too. A make clean followed by adding
ac_add_options --enable-system-cairo
to .mozconfig solved it for me.

It still seems like a bug that the default configuration doesn't work -- if
--enable-system-cairo is required to build now, shouldn't it be the default?

Comment 7

10 years ago
I used that --enable-system-cairo too and got the same error . I found this at clfs   sed -i "s:@MOZ_GTK2_LIBS@:& -L/usr/lib64 -lX11 -lXrender:g" config/autoconf.mk.in  they had ${XORG_PREFIX} where I have usr :D 

build looked good (I use the 2>&1 | tee log-version-64-1 ) andit looked good . 
Thats was with seamonkey just going to try ff.
Probably a dupe of Bug 344818.
Component: Build Config → Build Config
Product: Firefox → Core
QA Contact: build.config → build-config
Version: unspecified → 1.8 Branch
Currently, this bug is preventing me from compiling Firefox 2 / mozilla 1.8 branch.

OS:   Ubuntu 8.04
mozconfig contents:
  mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj
  mk_add_options MOZ_CO_PROJECT=browser
  ac_add_options --enable-application=browser
  ac_add_options --enable-debug --disable-optimize

I tried adding --enable-system-cairo per comment 6 and comment 7, but then I hit different errors like those in bug 344818 comment 2, below the heading "Erorrlog for xft:"[sic], starting with "undefined reference to `XFreePixmap'"

And as Vlad says in Bug 344818 comment 18, "Sorry, not interested in supporting system-cairo on the 1.8 branch at this point".  So I don't think the solution to this bug should depend on --enable-system-cairo.

IMHO this bug is a pretty major issue -- we'd like Firefox 2 to be buildable on modern linux distributions, right?
  --> Nominating for "wanted1.8.1.x"
Flags: wanted1.8.1.x?
--disable-canvas helps if there is urgency.
Ah, good to know -- thanks! I'll try that.
(In reply to comment #10)
> --disable-canvas helps if there is urgency.

Cool -- that flag does let me successfully compile a build, when I add the fix for another unrelated build issue, bug 432899.

Comment 13

10 years ago
My 1.8 build seems to be working on ubuntu hardy with cairo. My ac_add_options in ~/.mozconfig are:

ac_add_options --enable-application=browser
ac_add_options --disable-mailnews
ac_add_options --enable-canvas
ac_add_options --enable-svg
ac_add_options --disable-debug
ac_add_options --enable-optimize=-O2
ac_add_options --enable-system-cairo

I wonder if I have different fontconfig/pango libraries or something? (re your xft error when enabling cairo)
I think it may be due to your --disable-debug vs. my --enable-debug.

I'll try a disable-debug build to see if that changes anything for me.
(In reply to comment #14)
> I think it may be due to your --disable-debug vs. my --enable-debug.
> I'll try a disable-debug build to see if that changes anything for me.

Weird -- disabling debug doesn't fix it for me.  I still hit the issue I described in comment 9 (undefined reference to `XFreePixmap' etc).

Comment 16

10 years ago
Did you make clean first? I'm pretty sure I had to do that to make the error go away.

Long shot: do you have <X11/Xlib.h> ? That s where XFreePixmap is defined (on Ubuntu it's from the libx11-dev package). The bug is presumably that something doesn't #include <X11/Xlib.h> when it should, so including it might get around the errors.

Comment 17

10 years ago
what I did in Comment #7 worked for me with ff too

and I still kept in the --enable-system-cairo and I have --disable-debug
sed -i "s:@MOZ_GTK2_LIBS@:& -L/usr/lib64 -lX11 -lXrender:g" config/autoconf.mk.in

i use configure <options> too and its well you can see there my x86_64 system

Comment 18

10 years ago
whops and I don't have --disable-canvas

Comment 19

9 years ago
Whoops, I spoke too soon. The build was still working for me (with --enable-canvas) when I wrote comment #16, but it isn't any more (under ubuntu hardy) even with --enable-system-cairo and a make clean.

The patch included at the end of bug 344818 fixes it here (after touch configure then make -f client.mk build).
(Canceling my "wanted1.8.1.x?" request, since Firefox 2.0 will no longer be supported quite soon, anyway.)
Flags: wanted1.8.1.x?
This seems pretty old, should we close this?

Comment 22

4 years ago
(In reply to Sankha Narayan Guria [:sankha93] from comment #21)
> This seems pretty old, should we close this?

yes indeed
Last Resolved: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.