【问题标题】:Compiling Apache Lucy编译 Apache Lucy
【发布时间】:2016-09-29 01:30:19
【问题描述】:

我正在尝试编译 Apache Lucy。以下是我遵循的步骤:

  1. 已下载露西和小丑鱼
  2. 已编译的 Clownfish 运行时和编译器
  3. 配置露西
  4. 开始露西化妆

核心目录中文件的编译工作正常,但是当它到达模块时会引发错误:

$ make gcc -pedantic -Wall -Wextra -Wno-variadic-macros -std=gnu99 -D_GNU_SOURCE -D CFP_LUCY -D CFP_TESTLUCY -fvisibility=hidden -O2 -g -fno-strict-aliasing -fPIC -I . -I ../core -I autogen/include -I ../modules/analysis/snowstem/source/include -I ../modules/unicode/ucd -I ../modules/unicode/utf8proc -c ../modules/analysis/snowstem/source/libstemmer/libstemmer_utf8.c -o ../modules/analysis/snowstem/source/libstemmer/libstemmer_utf8.o ../modules/analysis/snowstem/source/libstemmer/libstemmer_utf8.c:4:35: fatal error: ../include/libstemmer.h: No such file or directory #include "../include/libstemmer.h" ^ compilation terminated. make: *** [../modules/analysis/snowstem/source/libstemmer/libstemmer_utf8.o] Error 1

问题似乎是模块中的代码文件包含具有类似#include "../include/libstemmer.h" 的相对路径的包含文件。即使生成的目录包含在包含文件目录中,即 -I ../modules/analysis/snowstem/source/include,但它不起作用

我开始修改源文件以删除相对路径,但更多内容开始出现。我认为必须有更好的方法。有关如何解决此问题的任何帮助都会非常有帮助。

【问题讨论】:

  • 您是否按照perl文件夹下的INSTALL文档中描述的安装步骤操作?
  • 我不希望 perl 绑定只是一个 C 库,所以我没有在 perl 子目录中执行这些步骤。我直接去了C子目录,然后在那里尝试了安装说明。
  • 我刚刚尝试在perl目录INSTALL文件下运行命令,但也失败了。

标签: c gcc makefile include apache-lucy


【解决方案1】:

https://github.com/cancerberoSgx/lucy.js/blob/master/scripts/build-lucy-c.sh

这是一个 shell 脚本,它将克隆 lucy .git 和依赖项,编译 lucy c 和 clownfish C,然后编译并运行其中一个 lucy/samples/c

这一切都在本地文件夹中完成,因此您无需以 root 身份全局安装任何东西。你需要像 gcc、make、configure 等 linux 构建工具。祝你好运

【讨论】:

    【解决方案2】:

    在我看来,还没有可用的 C 库。 上面的链接是旧的(2012 年),但解释了为什么它不明显。

    http://grokbase.com/t/lucy/user/12bp9rw0g7/lucy-user-using-lucy-directly-from-c

    【讨论】:

      【解决方案3】:

      如果你只做 cpan Lucy::Simple 就足够了

      【讨论】:

        猜你喜欢
        • 2017-07-27
        • 1970-01-01
        • 2020-08-13
        • 1970-01-01
        • 1970-01-01
        • 2017-10-09
        • 2014-07-23
        • 2021-07-01
        • 2014-10-12
        相关资源
        最近更新 更多