【问题标题】:Issue with installing PyLucene 6.5.0 on Linux在 Linux 上安装 PyLucene 6.5.0 的问题
【发布时间】:2018-04-04 08:35:43
【问题描述】:

我最近搬到了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,我会收到以下错误,我不知道它为什么会发生: 你对这个问题有什么想法吗?

提前谢谢你, 阿明

【问题讨论】:

    标签: linux python-3.x lucene pylucene jcc


    【解决方案1】:

    我遇到了同样的问题,通过设置 __STDC_FORMAT_MACROS 解决了:

    我的 JCC_CFLAGS 设置为:

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

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-05-25
      • 2016-08-19
      • 1970-01-01
      • 1970-01-01
      • 2011-07-30
      相关资源
      最近更新 更多