【问题标题】:Clang build error when trying to install Jekyll尝试安装 Jekyll 时出现 Clang 构建错误
【发布时间】:2014-05-15 19:35:01
【问题描述】:

我正在尝试使用此页面 (https://help.github.com/articles/using-jekyll-with-pages) 上的说明安装 Jekyll。但是,在第二步,bundle install,输出如下

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb 
checking for main() in -lc... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling redcloth_attributes.c
compiling redcloth_inline.c
compiling redcloth_scan.c
linking shared-object redcloth_scan.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [redcloth_scan.bundle] Error 1

make failed, exit code 2

Gem files will remain installed in /var/folders/39/fxww36m16ddggmf4plpl3mv40000gn/T/bundler20140403-1735-6tlte3/RedCloth-4.2.9/gems/RedCloth-4.2.9 for inspection.
Results logged to /var/folders/39/fxww36m16ddggmf4plpl3mv40000gn/T/bundler20140403-1735-6tlte3/RedCloth-4.2.9/extensions/universal-darwin-13/2.0.0/RedCloth-4.2.9/gem_make.out
An error occurred while installing RedCloth (4.2.9), and Bundler cannot continue.
Make sure that `gem install RedCloth -v '4.2.9'` succeeds before bundling.

clang --version 输出

Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix

在我的机器上,Ruby 的版本是2.0.0p247。

我已经看到很多其他人对此提出的问题,但他们都没有同样的问题,而且向他们建议的解决方案似乎也不是特别相关,除了以某种方式让 bundler 使用 GCC 的想法之外Clang,我不知道如何完成。我的一个想法是让Clang 将此视为警告而不是错误,因为消息暗示在此版本中是可能的,但我也不知道该怎么做,尤其是在上下文中像bundle install 这样的终端命令。我该如何解决这个问题?

【问题讨论】:

标签: rubygems clang jekyll redcloth


【解决方案1】:
sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install jekyll

【讨论】:

    【解决方案2】:

    我使用ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future bundle install 将错误视为警告。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-12-16
      • 1970-01-01
      • 2023-01-03
      • 2020-12-24
      • 1970-01-01
      • 2020-12-04
      • 2021-11-18
      • 2014-05-01
      相关资源
      最近更新 更多