GNOME Bugzilla – Bug 161568
pango compilation broken
Last modified: 2005-03-01 14:58:07 UTC
Compilation of pango (1.8 and CVS) keeps breaking for me with : pangofc-fontmap.c:27:24: fontconfig.h: No such file or directory pangofc-fontmap.c: In function `pango_fc_convert_weight_to_fc': pangofc-fontmap.c:585: error: `FC_WEIGHT_NORMAL' undeclared (first use in this function) pangofc-fontmap.c:585: error: (Each undeclared identifier is reported only once pangofc-fontmap.c:585: error: for each function it appears in.) make[4]: *** [pangofc-fontmap.lo] Error 1 make[4]: Leaving directory `/home/noel/Documents/install/pango/pango' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/noel/Documents/install/pango/pango' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/noel/Documents/install/pango/pango' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/noel/Documents/install/pango' make: *** [all] Error 2 I checked and I have the last fontconfig (2.2.96). I even tried reinstall it, but it still breaks.
Well, your latest fontconfig definitely isn't in the right place, since FC_WEIGHT_NORMAL has been there since before 2.2. But there does seem to be a bug in the /* fontconfig < 2.2 */ case ... return FC_WEIGHT_NORMAL should be return FC_WEIGHT_MEDIUM. (If you could test that fix, before you fix your fontconfig installation, that would be appreciated.)
That fixed it. Thanks a lot. I'm dubious wether my fontconfig installation is really broken or not -- I never had any problem compiling pango since this commit : http://cvs.gnome.org/viewcvs/pango/pango/pangofc-fontmap.c?r1=1.26&r2=1.27 Anyway, that doesn't really matter, and it compiles now.
By the way, I checked fontconfig.h (which is correctly located in /usr/include/fontconfig/) and FC_WEIGHT_NORMAL is indeed defined inside (as an alias for FC_WEIGHT_REGULAR). I don't really understand what's going on here. Oh well.
Ok, this was indeed something strange in my config : I changed #include <fontconfig/fontconfig.h> in pangofc-fontmap.h to #include "/usr/include/fontconfig/fontconfig.h" and it worked. There's nothing wrong with pango per se. I'm closing this bug.
No, there is a bug, it's just only with old versions of fontconfig. You presumably have one in /usr/X11R6 or /usr/local or somewhere else on your system.
Yeah, that's exactly it - there was an old /usr/X11R6/include/fontconfig/fontconfig.h that was picked up before the /usr/include/fontconfig one and screwed everything up. I just removed it and everything was fine. I wonder if that was causing any other kind of damage.
Fri Dec 17 14:37:49 2004 Owen Taylor <otaylor@redhat.com> * pango/pangofc-fontmap.c (pango_fc_convert_weight_to_fc): Use FC_WEIGHT_MEDIUM, not FC_WEIGHT_NORMAL in old-fontconfig case. (#161568, Vincent Noel)
*** Bug 161783 has been marked as a duplicate of this bug. ***
*** Bug 161893 has been marked as a duplicate of this bug. ***
Strange, I could swear that the bugzilla search for FC_WEIGHT_NORMAL returned "zarro boogs", oh well; maybe I need to improve my bugzilla query skills :)
*** Bug 163231 has been marked as a duplicate of this bug. ***
*** Bug 168669 has been marked as a duplicate of this bug. ***