xstroke seems to expect different contents in the headers files for Xft.h (I have X-4.2.99.4, and the newest fontconfig, freetypes and xft2, yadayada) Reproducible: Always Steps to Reproduce: 1.emerge xstroke 2. 3. Actual Results: >>> Source unpacked. gcc -g -ansi -ansi-error -Wall -pedantic -I/usr/X11R6/include -I/usr/X11R6/include -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE=500L -D_BSD_SOURCE -D_SVID_SOURCE -DFUNCPROTO=15 -DNARROWPROTO -c -o xstroke.o xstroke.c In file included from control_win.h:19, from xstroke.h:36, from xstroke.c:33: /usr/X11R6/include/X11/Xft/Xft.h:52: parse error before "_XftFTlibrary" /usr/X11R6/include/X11/Xft/Xft.h:52: warning: type defaults to `int' in declaration of `_XftFTlibrary' /usr/X11R6/include/X11/Xft/Xft.h:52: ISO C forbids data definition with no type or storage class /usr/X11R6/include/X11/Xft/Xft.h:86: parse error before "FT_UInt" /usr/X11R6/include/X11/Xft/Xft.h:86: warning: no semicolon at end of struct or union /usr/X11R6/include/X11/Xft/Xft.h:89: parse error before '}' token /usr/X11R6/include/X11/Xft/Xft.h:89: warning: type defaults to `int' in declaration of `XftGlyphSpec' /usr/X11R6/include/X11/Xft/Xft.h:89: ISO C forbids data definition with no type or storage class /usr/X11R6/include/X11/Xft/Xft.h:93: parse error before "FT_UInt" /usr/X11R6/include/X11/Xft/Xft.h:93: warning: no semicolon at end of struct or union /usr/X11R6/include/X11/Xft/Xft.h:96: parse error before '}' token /usr/X11R6/include/X11/Xft/Xft.h:96: warning: type defaults to `int' in declaration of `XftGlyphFontSpec' /usr/X11R6/include/X11/Xft/Xft.h:96: ISO C forbids data definition with no type or storage class /usr/X11R6/include/X11/Xft/Xft.h:190: warning: type defaults to `int' in declaration of `FT_UInt' /usr/X11R6/include/X11/Xft/Xft.h:190: parse error before '*' token /usr/X11R6/include/X11/Xft/Xft.h:256: warning: type defaults to `int' in declaration of `XftGlyphSpec' /usr/X11R6/include/X11/Xft/Xft.h:256: parse error before '*' token /usr/X11R6/include/X11/Xft/Xft.h:262: warning: type defaults to `int' in declaration of `XftGlyphFontSpec' /usr/X11R6/include/X11/Xft/Xft.h:262: parse error before '*' token /usr/X11R6/include/X11/Xft/Xft.h:295: warning: type defaults to `int' in declaration of `FT_UInt' /usr/X11R6/include/X11/Xft/Xft.h:295: parse error before '*' token /usr/X11R6/include/X11/Xft/Xft.h:354: parse error before "XftLockFace" /usr/X11R6/include/X11/Xft/Xft.h:354: warning: type defaults to `int' in declaration of `XftLockFace' /usr/X11R6/include/X11/Xft/Xft.h:354: ISO C forbids data definition with no type or storage class /usr/X11R6/include/X11/Xft/Xft.h:393: warning: type defaults to `int' in declaration of `FT_UInt' /usr/X11R6/include/X11/Xft/Xft.h:393: parse error before '*' token /usr/X11R6/include/X11/Xft/Xft.h:399: warning: type defaults to `int' in declaration of `FT_UInt' /usr/X11R6/include/X11/Xft/Xft.h:399: parse error before '*' token /usr/X11R6/include/X11/Xft/Xft.h:408: parse error before "FT_UInt" /usr/X11R6/include/X11/Xft/Xft.h:418: parse error before "XftCharIndex" /usr/X11R6/include/X11/Xft/Xft.h:420: warning: type defaults to `int' in declaration of `XftCharIndex' /usr/X11R6/include/X11/Xft/Xft.h:420: ISO C forbids data definition with no type or storage class /usr/X11R6/include/X11/Xft/Xft.h:461: warning: type defaults to `int' in declaration of `FT_UInt' /usr/X11R6/include/X11/Xft/Xft.h:461: parse error before '*' token /usr/X11R6/include/X11/Xft/Xft.h:472: warning: type defaults to `int' in declaration of `XftGlyphSpec' /usr/X11R6/include/X11/Xft/Xft.h:472: parse error before '*' token /usr/X11R6/include/X11/Xft/Xft.h:493: warning: type defaults to `int' in declaration of `XftGlyphFontSpec' /usr/X11R6/include/X11/Xft/Xft.h:493: parse error before '*' token make: *** [xstroke.o] Error 1 !!! ERROR: x11-misc/xstroke-0.5.12 failed. !!! Function src_compile, Line 29, Exitcode 2 !!! (no error message) Expected Results: successful emerge
what if you (quick hack) try it like this : CFLAGS="${CFLAGS} -I/usr/include" emerge xstroke ?
i just solved a similar Xft problem when compiling something else (jed) by adding -I/usr/include/freetype2 to the CFLAGS. I've never tried xstroke, so dunno if that helps. But the problem is that by default, without the correct CFLAGS, it sources freetype1 headers rather than the popular freetype2 ones.
alastair, tackle this too, please.
Well, the actual problem is that the build assumes the freetype headers are also in /usr/X11R6/include , like they used to be/are in a lot of distros.
Well, I can confirm that RedHat 7.3 doesn't put freetype headers in /usr/X11R6/include. Anyway, I've gone through and found: make INCLUDES="-I/usr/include/freetype2" fixes the compile errors. I'm cleaning up the ebuild because there's some non-standard syntax in there. I'll commit the changes when I've tested it enough.
Created attachment 8313 [details] cleaned up ebuild for xstroke haven't got access to commit yet, so here's the new xstroke ebuild for reference. changes include removing the pregenerated Makefile (use xmkmf -a instead), touches up the freetype2 bug and other meta info clean ups.
fixed bug. also removed patch requirements by generating the Makefile dynamically using xmkmf.