1

我通常可以使用 BitNami Rubystack Ruby 1.9.3p448 在我的 Windows 8 系统上安装本机扩展。Rubystack 集成了 DevKit。但是,我无法构建 ferret 和其他处理依赖项。这些错误看起来像编译错误,而不是制造错误。

虽然我在这种情况下指定了 ferret,但 Treat 所需的几个 gem 正在经历同样的错误。所以,应该是系统性的问题。事实上,我在 2008 年左右的 GNUstep 中发现了“在 svn 中修复”的完全相同的问题。到目前为止,我一直无法确定该修复程序。谈话发生在这里

在雪貂上,我尝试了 0.11.8.5、0.11.8.4 甚至 0.11.6 版本,每个版本都得到了与此处列出的基本相同的错误。我一直在寻找像 sdsykes-ferret 这样的替代品,但据我所知,它目前似乎不受支持。当前的雪貂活动叉似乎是HERE。同样,问题是系统性的,影响了几个治疗先决条件。

由于这些是 gem Treat NLP 的依赖项,所以我真的不想考虑非 PnP 替代方案,特别是因为有几个正在破坏。我必须一个一个地检查它们才能让它们起来。Treat 尝试动态安装它们,但也不锁定版本。我希望它会工作...

我最近尝试安装的雪貂如下。这只是几次尝试的最新迭代。在 SO 中的搜索发现了类似的问题,这些问题已经很老了,我已经尝试过了。

D:\BitNami\rubystack-1.9.3-12>call gem install ferret --version "0.11.8.5" --platform=mswin32 -- --with-ruby-include=D:\
Users\Richard\Downloads\Ruby\ruby-1.9.3-p448
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-ruby-include=D:\Users\Richard\Downloads\Ruby\ruby-1.9.3-p448'
This could take a while...
ERROR:  Error installing ferret:
        ERROR: Failed to build gem native extension.

    D:/BitNami/rubystack-1.9.3-12/ruby/bin/ruby.exe extconf.rb --with-ruby-include=D:\Users\Richard\Downloads\Ruby\ruby-
1.9.3-p448
creating Makefile

make
generating ferret_ext-i386-mingw32.def
compiling analysis.c
compiling array.c
compiling bitvector.c
bitvector.c: In function 'frt_bv_eq':
bitvector.c:54:5: warning: ISO C90 forbids mixed declarations and code
compiling BZLIB_blocksort.c
compiling BZLIB_bzlib.c
compiling BZLIB_compress.c
compiling BZLIB_crctable.c
compiling BZLIB_decompress.c
compiling BZLIB_huffman.c
compiling BZLIB_randtable.c
compiling compound_io.c
compound_io.c: In function 'cmpdi_read_i':
compound_io.c:136:9: warning: unknown conversion type character 'l' in format
compound_io.c:136:9: warning: unknown conversion type character 'l' in format
compound_io.c:136:9: warning: too many arguments for format
compound_io.c: In function 'cw_copy_file':
compound_io.c:325:9: warning: unknown conversion type character 'l' in format
compound_io.c:325:9: warning: too many arguments for format
compound_io.c:334:9: warning: unknown conversion type character 'l' in format
compound_io.c:334:9: warning: unknown conversion type character 'l' in format
compound_io.c:334:9: warning: too many arguments for format
compiling document.c
compiling except.c
except.c:23:37: warning: initialization discards qualifiers from pointer target type
except.c:24:29: warning: initialization discards qualifiers from pointer target type
compiling ferret.c
compiling field_index.c
field_index.c: In function 'string_handle_term':
field_index.c:237:23: warning: operation on 'index->values' may be undefined
compiling filter.c
compiling fs_store.c
fs_store.c: In function 'fso_seek_i':
fs_store.c:252:9: warning: unknown conversion type character 'l' in format
fs_store.c:252:9: warning: format '%s' expects type 'char *', but argument 4 has type 'long long int'
fs_store.c:252:9: warning: too many arguments for format
fs_store.c: In function 'fsi_seek_i':
fs_store.c:306:9: warning: unknown conversion type character 'l' in format
fs_store.c:306:9: warning: format '%s' expects type 'char *', but argument 4 has type 'long long int'
fs_store.c:306:9: warning: too many arguments for format
fs_store.c: In function 'fsi_length_i':
fs_store.c:322:5: warning: implicit declaration of function 'fstati64'
fs_store.c: In function 'fs_store_new':
fs_store.c:431:17: warning: unused variable 'stt'
compiling global.c
global.c: In function 'frt_vstrfmt':
global.c:190:23: warning: assignment discards qualifiers from pointer target type
global.c: In function 'signal_to_string':
global.c:412:14: error: 'SIGBUS' undeclared (first use in this function)
global.c:412:14: note: each undeclared identifier is reported only once for each function it appears in
global.c: In function 'frt_init':
global.c:436:22: error: storage size of 'action' isn't known
global.c:443:5: warning: implicit declaration of function 'sigemptyset'
global.c:446:5: error: storage size of '__old' isn't known
global.c:446:5: warning: implicit declaration of function 'sigaction'
global.c:446:5: warning: unused variable '__old'
global.c:447:5: error: storage size of '__old' isn't known
global.c:447:5: warning: unused variable '__old'
global.c:448:5: error: storage size of '__old' isn't known
global.c:448:5: warning: unused variable '__old'
global.c:449:5: error: storage size of '__old' isn't known
global.c:449:5: error: 'SIGBUS' undeclared (first use in this function)
global.c:449:5: warning: unused variable '__old'
global.c:450:5: error: storage size of '__old' isn't known
global.c:450:5: warning: unused variable '__old'
global.c:436:22: warning: unused variable 'action'
make: *** [global.o] Error 1


Gem files will remain installed in D:/BitNami/rubystack-1.9.3-12/ruby/lib/ruby/gems/1.9.1/gems/ferret-0.11.8.5 for inspe
ction.
Results logged to D:/BitNami/rubystack-1.9.3-12/ruby/lib/ruby/gems/1.9.1/gems/ferret-0.11.8.5/ext/gem_make.out

D:\BitNami\rubystack-1.9.3-12>

这个噩梦有什么解决办法吗?

4

1 回答 1

0

由于安装必备宝石看似无法克服的问题,我放弃了治疗并转向替代方案。现在,我正在研究 open-nlp,因为它是 OpenNLP 项目的当前 Ruby 包装器。我更喜欢 NLTK,因为它是黄金标准,但到目前为止我还没有找到任何 Ruby 包装器。

这只是在 Windows、IFAIK 下处理的问题,即使这样也只是由于先决条件。我没有看到任何东西说在其他环境中对待并不美妙。

于 2013-09-09T16:11:37.613 回答