[Fontconfig] Errors building fontconfig-2.12.1: 'PRI_CHAR_WIDTH_STRONG' undeclared here (not in a function)
Klaus Dittrich
kladit at arcor.de
Tue Dec 20 09:05:23 UTC 2016
Am 11/14/16 um 12:22 schrieb Akira TAGOH:
> Dunno. there might be something changed in the newer gcc but no idea
> so far it works and apparently no fault we can see such errors. so
> just suggesting to see the outcome how it looks like with the newer gcc.
>
> On Mon, Nov 14, 2016 at 8:09 PM, Klaus Dittrich <kladit at arcor.de
> <mailto:kladit at arcor.de>> wrote:
>
>
>
> Am 11/14/16 um 09:38 schrieb Akira TAGOH:
>> Oops, you're right. but it is defined at
>> https://cgit.freedesktop.org/fontconfig/tree/src/fcmatch.c#n266
>> <https://cgit.freedesktop.org/fontconfig/tree/src/fcmatch.c#n266>
>> You can see how your gcc generate the preprocessed source code
>> with -E. I can build it with:
>> $ gcc --version
>> gcc (GCC) 6.2.1 20160916 (Red Hat 6.2.1-2)
>>
>>
>> On Mon, Nov 14, 2016 at 4:53 PM, Klaus Dittrich <kladit at arcor.de
>> <mailto:kladit at arcor.de>> wrote:
>>
>>
>>
>> Am 11/14/16 um 03:31 schrieb Akira TAGOH:
>>> That line isn't in 2.12.1. I guess you are applying a patch
>>> and it has an error. please check.
>>>
>>> On Sun, Nov 13, 2016 at 6:51 PM, Klaus Dittrich
>>> <kladit at arcor.de <mailto:kladit at arcor.de>> wrote:
>>>
>>> Building fontconfig-2.12.1 I get these errors ..
>>>
>>> CC fcmatch.lo
>>> fcmatch.c:324:63: error: 'PRI_CHAR_WIDTH_STRONG'
>>> undeclared here (not in a function)
>>> #define FC_OBJECT(NAME, Type, Cmp) {
>>> FC_##NAME##_OBJECT, Cmp, PRI_##NAME##_STRONG,
>>> PRI_##NAME##_WEAK },
>>> ^
>>> fcobjs.h:54:1: note: in expansion of macro 'FC_OBJECT'
>>> FC_OBJECT (CHAR_WIDTH, FcTypeInteger, NULL)
>>> ^~~~~~~~~
>>> fcmatch.c:324:84: error: 'PRI_CHAR_WIDTH_WEAK'
>>> undeclared here (not in a function)
>>> #define FC_OBJECT(NAME, Type, Cmp) {
>>> FC_##NAME##_OBJECT, Cmp, PRI_##NAME##_STRONG,
>>> PRI_##NAME##_WEAK },
>>> ^
>>> fcobjs.h:54:1: note: in expansion of macro 'FC_OBJECT'
>>> FC_OBJECT (CHAR_WIDTH, FcTypeInteger, NULL)
>>> ^~~~~~~~~
>>> make[3]: *** [Makefile:633: fcmatch.lo] Error 1
>>> make[3]: Leaving directory
>>> '/mnt/md1/sources/fontconfig/fontconfig-2.12.1/src'
>>>
>>>
>>> Compiler used is gcc (64 Bit) version 6.2.1 20161110 and
>>> before.
>>>
>>> --
>>>
>>> Klaus
>>>
>>> _______________________________________________
>>> Fontconfig mailing list
>>> Fontconfig at lists.freedesktop.org
>>> <mailto:Fontconfig at lists.freedesktop.org>
>>> https://lists.freedesktop.org/mailman/listinfo/fontconfig
>>> <https://lists.freedesktop.org/mailman/listinfo/fontconfig>
>>>
>>>
>>>
>>>
>>> --
>>> Akira TAGOH
>> Akira,
>>
>> I re-checked that no patches were applied.
>> I loaded a fresh tar package
>> http://fontconfig.org/release/fontconfig-2.12.1.tar.bz2
>> <http://fontconfig.org/release/fontconfig-2.12.1.tar.bz2>
>> and untared it.
>>
>> find . -name fcmatch.c
>> ./fontconfig-2.12.1/src/fcmatch.c
>>
>> vim ./fontconfig-2.12.1/src/fcmatch.c
>> : set number
>>
>> 319 /*
>> 320 * Order is significant, it defines the precedence of
>> 321 * each value, earlier values are more significant than
>> 322 * later values
>> 323 */
>> 324 #define FC_OBJECT(NAME, Type, Cmp) {
>> FC_##NAME##_OBJECT, Cmp, PRI_##NAME##_STRONG,
>> PRI_##NAME##_WEAK },
>> 325 static const FcMatcher _FcMatchers [] = {
>> 326 { FC_INVALID_OBJECT, NULL, -1, -1 },
>> 327 #include "fcobjs.h"
>> 328 };
>> 329 #undef FC_OBJECT
>> 330
>>
>> Note the PRI_##NAME##_STRONG, PRI_##NAME##_WEAK in line 324.
>>
>> Are you using a different source package?
>>
>> --
>>
>> Klaus
>>
>>
>>
>>
>> --
>> Akira TAGOH
>
> So this is a preprocessor problem of my newer gcc?
> --
> Klaus
>
>
>
>
> --
> Akira TAGOH
Akira,
your patch "Avoid conflicts with integer width macros from TS
18661-1:2014" of today
solved the problem.
Fontconfig git now compiles without error.
--
Klaus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/fontconfig/attachments/20161220/779d2b63/attachment-0001.html>
More information about the Fontconfig
mailing list