在 Linux 上安装 PyLucene 6.5.0 时出现问题
Issue with installing PyLucene 6.5.0 on Linux
我最近搬到了 python3,所以我正在尝试安装与 python3.
兼容的最新版本的 Pylucene(版本 6.5.0)
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,我收到以下错误,我不知道为什么会发生:
你对这个问题有什么想法吗?
提前谢谢你,
阿敏
我遇到了同样的问题,通过设置 __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
我最近搬到了 python3,所以我正在尝试安装与 python3.
兼容的最新版本的 Pylucene(版本 6.5.0)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,我收到以下错误,我不知道为什么会发生: 你对这个问题有什么想法吗?
提前谢谢你, 阿敏
我遇到了同样的问题,通过设置 __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