archfan/infinality_bundle

./fcobjs.h:54:1: error: use of undeclared identifier 'PRI_CHAR_WIDTH_WEAK'

Opened this issue · 1 comments

RJVB commented

Invoking makepkg -s in the 02_fontconfig subdir I get the error above on KaOS (updated as of this morning).

A more verbose backtrace after makepkg failed:

> (cd src/fontconfig-2.12.1 ; make -w V=1 VERBOSE=1 
... SNIP ...
make[3]: Entering directory '/home/bertin/Desktop/Downloads/work/src/Scratch/Infinality/infinality_bundle-git/02_fontconfig-iu/src/fontconfig-2.12.1/src'
/bin/sh ../libtool  --tag=CC   --mode=compile /usr/bin/clang -DHAVE_CONFIG_H -I. -I..  -I.. -I../src -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include    -Wall -Wpointer-arith -Wstrict-prototypes     -Wmissing-prototypes -Wmissing-declarations     -Wnested-externs -fno-strict-aliasing -DFC_CACHEDIR='"/var/cache/fontconfig"' -DFONTCONFIG_PATH='"/etc/fonts"' -D_FORTIFY_SOURCE=2  -march=x86-64 -march=native -O3 -fstack-protector --param=ssp-buffer-size=4 -pthread -c -o fcmatch.lo fcmatch.c
libtool: compile:  /usr/bin/clang -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -DFC_CACHEDIR=\"/var/cache/fontconfig\" -DFONTCONFIG_PATH=\"/etc/fonts\" -D_FORTIFY_SOURCE=2 -march=x86-64 -march=native -O3 -fstack-protector --param=ssp-buffer-size=4 -pthread -c fcmatch.c  -fPIC -DPIC -o .libs/fcmatch.o
In file included from fcmatch.c:327:
./fcobjs.h:54:1: error: use of undeclared identifier 'PRI_CHAR_WIDTH_STRONG'
FC_OBJECT (CHAR_WIDTH,          FcTypeInteger,  NULL)
^
fcmatch.c:324:63: note: expanded from macro 'FC_OBJECT'
#define FC_OBJECT(NAME, Type, Cmp)      { FC_##NAME##_OBJECT,   Cmp,    PRI_##NAM...
                                                                        ^
<scratch space>:52:1: note: expanded from here
PRI_CHAR_WIDTH_STRONG
^
In file included from fcmatch.c:327:
./fcobjs.h:54:1: error: use of undeclared identifier 'PRI_CHAR_WIDTH_WEAK'
fcmatch.c:324:84: note: expanded from macro 'FC_OBJECT'
  ...Type, Cmp) { FC_##NAME##_OBJECT,   Cmp,    PRI_##NAME##_STRONG,    PRI_##NAM...
                                                                             ^
<scratch space>:52:1: note: expanded from here
PRI_CHAR_WIDTH_WEAK
^
2 errors generated.

Edit: NB: the same error occurs with GCC.

Googling the error does give some hints, and provides this patch which I haven't tested yet:
https://patchwork.openembedded.org/patch/135140/

RJVB commented

This patch fixed the build for me. I haven't tested it on systems with a pre-2.25 glibc.

fix-inf_bundle-fontconfig.diff.txt