fontconfig issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:

freetype
fontconfig + xft
glib
atk
pango
gtk

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 
fontconfig.

compiling of a fontconfig library ended with an error like that one 
reported on url: 

http://freedesktop.org/pipermail/fontconfig/2004-April/000896.html

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[2]: *** [fc-cache] Error 1
make[2]: Leaving directory
`/home/prickett/build/fontconfig-2.2.94/fc-cache'
make[1]: *** [all-recursive] Error 1
make[1]: 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 
fontconfig.h:

/* ....... */

/* macros taken from glib -- gmacros.h (2.4.1) -- martin 20040502 */

#undef	MAX
#define MAX(a, b)  (((a) > (b)) ? (a) : (b))

#undef	MIN
#define MIN(a, b)  (((a) < (b)) ? (a) : (b))

#undef	ABS
#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.

Regards, martin.



[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux