在Linux上安装PyLucene 6.5.0的问题 [英] Issue with installing PyLucene 6.5.0 on Linux
问题描述
我最近迁移到python3,因此我试图安装与python3兼容的最新版本的Pylucene(版本6.5.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
但是,要安装jcc,我会收到以下错误,但我不知道为什么会发生:您对这个问题有任何想法吗?
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?
预先感谢您,阿敏
推荐答案
我有同样的问题,可以通过设置__STDC_FORMAT_MACROS来解决:
I had the same problem, was solved by setting __STDC_FORMAT_MACROS:
我的JCC_CFLAGS设置为:
My JCC_CFLAGS is set to:
export JCC_CFLAGS="-v;-fno-strict-aliasing;-Wno-write-strings;-D__STDC_FORMAT_MACROS"
有关conda的JCC自动化构建脚本示例,请参见:
An example of an automated build script of JCC for conda is available at:
https://github.com/conda-forge/jcc-feedstock/blob/master/recipe/build.sh
这篇关于在Linux上安装PyLucene 6.5.0的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!