0
我无法使链接解析器宝石在我的雪豹上工作。关于在雪豹上安装链接解析器宝石的问题
当我尝试做“sudo的创业板安装linkparser”,我得到:
Building native extensions. This could take a while...
ERROR: Error installing linkparser:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
checking for pkg-config... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
--with-link-grammar
--without-link-grammar
--with-pkg-config
--without-pkg-config
extconf.rb:18: Couldn't find your pkg-config binary (RuntimeError)
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/linkparser-1.1.0 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/linkparser-1.1.0/ext/gem_make.out
当我编译链接语法4.3.5从源代码(很顺利),然后尝试做“耙” :
Task library 'rake/manual.rb' failed to load: NameError: uninitialized constant MANUALDIR. Some tasks may not be available.
No DarkFish: LoadError: no such file to load -- darkfish-rdoc
Task library 'rake/rdoc.rb' failed to load: NameError: uninitialized constant RDOCDIR. Some tasks may not be available.
Task library 'rake/testing.rb' failed to load: NameError: uninitialized constant Spec. Some tasks may not be available.
rm -r coverage
rake clean
(in /Users/alan/linkparser/ext)
rm -r dictionary.o
rm -r linkage.o
rm -r linkparser.o
rm -r parseoptions.o
rm -r sentence.o
rake
(in /Users/alan/linkparser/ext)
gcc -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -Wall -DDEBUG -DHAVE_LINK_GRAMMAR_LINK_INCLUDES_H -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/include -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I/Library/Ruby/Site/1.8 -I. -c dictionary.c
gcc -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -Wall -DDEBUG -DHAVE_LINK_GRAMMAR_LINK_INCLUDES_H -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/include -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I/Library/Ruby/Site/1.8 -I. -c linkage.c
gcc -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -Wall -DDEBUG -DHAVE_LINK_GRAMMAR_LINK_INCLUDES_H -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/include -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I/Library/Ruby/Site/1.8 -I. -c linkparser.c
gcc -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -Wall -DDEBUG -DHAVE_LINK_GRAMMAR_LINK_INCLUDES_H -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/include -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I/Library/Ruby/Site/1.8 -I. -c parseoptions.c
gcc -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -Wall -DDEBUG -DHAVE_LINK_GRAMMAR_LINK_INCLUDES_H -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/include -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I/Library/Ruby/Site/1.8 -I. -c sentence.c
cc -arch i386 -arch x86_64 -pipe -bundle -undefined dynamic_lookup -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -o linkparser_ext.bundle dictionary.o linkage.o linkparser.o parseoptions.o sentence.o -lpthread -ldl -llink-grammar -lruby
ld: warning: in /usr/local/lib/liblink-grammar.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
Specification tasks not defined: no such file to load -- spec/rake/spectask
rake aborted!
Don't know how to build task 'rdoc'
如何解决这个问题?编译链接语法时是否需要指定特殊的编译选项?
谢谢。我通过macport安装。然后它抱怨链接语法版本太旧了。然后我下载了最新的源代码(4.7.1)并重新编译。它的作品~~~整齐! – lkahtz 2011-02-25 05:44:36
当然希望在Windows中有一个简单的方法来做到这一点。我真的需要linkparser gem,我希望它不依赖于pkg-config – Arcolye 2011-09-12 08:43:43