在Linux上安装PyLucene 6.5.0时出现问题
我最近转到了python3,所以我正在尝试安装Pylucene 6.5.0的最新版本,该版本与python3兼容在Linux上安装PyLucene 6.5.0时出现问题,linux,python-3.x,lucene,pylucene,jcc,Linux,Python 3.x,Lucene,Pylucene,Jcc,我最近转到了python3,所以我正在尝试安装Pylucene 6.5.0的最新版本,该版本与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)
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
但是,要安装jcc,我会遇到以下错误,我不知道为什么会发生这种错误:
你对这个问题有什么想法吗
提前谢谢大家,,
Amin我也遇到了同样的问题,通过设置u STDC_FORMAT_宏解决了这个问题: 我的JCC\u CFLAGS设置为:
export JCC_CFLAGS="-v;-fno-strict-aliasing;-Wno-write-strings;-D__STDC_FORMAT_MACROS"
JCC for conda的自动构建脚本示例可从以下网址获得: