0

I recently moved to python3, so I'm trying to install the recent version of Pylucene (version 6.5.0) which is compatible with python3.

jcc3/sources/jcc.cpp: In function ‘PyObject* t_jccenv_strhash(PyObject*, PyObject*)’:
jcc3/sources/jcc.cpp:214:27: error: expected ‘)’ before ‘PRIxMAX’
     sprintf(buffer, "%0*" PRIxMAX, (int) hexdig, hash);
                           ^
jcc3/sources/jcc.cpp:214:54: warning: conversion lacks type at end of format [-Wformat=]
     sprintf(buffer, "%0*" PRIxMAX, (int) hexdig, hash);
                                                      ^
jcc3/sources/jcc.cpp:214:54: warning: too many arguments for format [-Wformat-extra-args]
error: command 'gcc' failed with exit status 1

But, to install the jcc I get the following error which I have no idea why it occurs: Do you have any idea about this issue?

Thank you in advance, Amin

4

1 回答 1

1

我有同样的问题,通过设置 __STDC_FORMAT_MACROS 解决:

我的 JCC_CFLAGS 设置为:

export JCC_CFLAGS="-v;-fno-strict-aliasing;-Wno-write-strings;-D__STDC_FORMAT_MACROS"

用于 conda 的 JCC 自动构建脚本的示例可在以下位置获得:

https://github.com/conda-forge/jcc-feedstock/blob/master/recipe/build.sh

于 2017-12-10T09:26:20.443 回答