安装模糊的gem时,我会遇到以下问题。
供参考我正在使用: rvm 1.29.1 红宝石2.1.7p400 rails 3.2.22.5
我正试图盲目安装1.0.2。
错误:
/Users/jonkeenan/.rvm/rubies/ruby-2.1.7/bin/ruby -r ./siteconf20170525-
62993-1jexk35.rb extconf.rb
creating Makefile
current directory: /Users/jonkeenan/.rvm/gems/ruby-
2.1.7@introhive/gems/blurrily-1.0.2/ext/blurrily
make "DESTDIR=" clean
current directory: /Users/jonkeenan/.rvm/gems/ruby-
2.1.7@introhive/gems/blurrily-1.0.2/ext/blurrily
make "DESTDIR="
compiling map_ext.c
compiling search_tree.c
compiling storage.c
storage.c:283:43: error: taking address of packed member 'refs' of
class or structure 'trigram_map_t' may result in an unaligned pointer
value [-Werror,-Waddress-of-packed-member]
if (haystack->refs) blurrily_refs_free(&haystack->refs);
^~~~~~~~~~~~~~
storage.c:405:24: error: taking address of packed member 'refs' of
class or structure 'trigram_map_t' may result in an unaligned pointer
value [-Werror,-Waddress-of-packed-member]
blurrily_refs_new(&haystack->refs);
^~~~~~~~~~~~~~
2 errors generated.
make: *** [storage.o] Error 1
make failed, exit code 2
它看起来像是一个c编译问题,但我不确定。 我正在运行一个使用Apple LLVM版本8.1.0(clang-802.0.42)的xcode版本,如果有帮助的话。
答案 0 :(得分:0)
不幸的是,这似乎是宝石维护者尚未解决的known issue。
作为一种解决方法,在上游解决此问题之前,切换到Vagrant / Docker开发工作流程可能是值得的。