[Fontconfig] fontconfig issue
xslom03 at vse.cz
Sun May 2 17:47:34 EST 2004
This mail contains fontconfig build error issue + possible solution.
Sorry for bothering anyone, who has nothing in common with fontconfig
library, but those two emails were the only ones i have found (and that
has looked good). (joining mailing lists is a bit complicated for just
reporting such a stupid error)
i used to compile gtk for myself for many years since gtk+-1.2 release.
with newer gtk releases i always do the sequence of compiling:
fontconfig + xft
i always compile these libraries into separete directory not to destroy my
debian stable dependencies. so far so good.
now im upgrading to gtk-2.4.1 and i downloaded the latest releases of
compiling of a fontconfig library ended with an error like that one
reported on url:
it looks like this:
gcc -g -O2 -o .libs/fc-cache fc-cache.o ../src/.libs/libfontconfig.so
../src/.libs/libfontconfig.so: undefined reference to `MAX'
../src/.libs/libfontconfig.so: undefined reference to `ABS'
../src/.libs/libfontconfig.so: undefined reference to `MIN'
collect2: ld returned 1 exit status
make: *** [fc-cache] Error 1
make: Leaving directory
make: *** [all-recursive] Error 1
make: Leaving directory `/home/prickett/build/fontconfig-2.2.94'
make: *** [all] Error 2
im not a good C programmer, but i can define MACROS like MAX and MIN :),
anyway, to solve this with no effort, i just copied the definitions of
those macros from glib release 2.4.1 (file gmacros.h) and i put them to
/* ....... */
/* macros taken from glib -- gmacros.h (2.4.1) -- martin 20040502 */
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#define ABS(a) (((a) < 0) ? -(a) : (a))
#endif /* _FONTCONFIG_H_ */
once i did that, everything was ok.
what i was wondering is how possible you don't have this error? anyway,
this a solution for me and maybe for others?
hope this will reach the right person
greeting from czech republic.
More information about the Fontconfig