LoginSignup
2
2

More than 5 years have passed since last update.

Mac の libtool を glibtool に差し替えていたら gem install libv8 に失敗した

Last updated at Posted at 2016-04-21

1ヶ月近く前のことで、個人メモに書いていたのですが、libv8 のインストールに失敗する問題は割とあるようなので、自分の環境で発生した問題とその対応もこちらで公開しておきます。

少し前提が特殊だと思っており、当てはまらない人が多いかと思いますが、もし参考になれば幸い。

前提

この問題の約2月前に、こちらの記事の要領で、Mac の libtool を GNU libtool に差し替えるという作業を行っていました。
実行したコマンドを下に抜粋します。

brew install libtool
cd /usr/local/bin
ln -s glibtool libtool
ln -s glibtoolize libtoolize

自分の場合、これが問題の原因となったようです。

発生した問題

gem install libv8 に失敗しました。
ログの一部を下に貼ります。

ERROR:  Error installing libv8:
        ERROR: Failed to build gem native extension.

:
creating Makefile
Compiling v8 for x64
Using python 2.7.7
Using compiler: /usr/bin/c++ (clang version 7.0.2)
libtool:   error: unrecognised option: '-static'
make[1]: *** [/Users/key-amb/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/libpreparser_lib.a] Error 1
make: *** [x64.release] Error 2
:

解決方法

上で作成した symlink を削除したところ、install に成功するようになりました。

rm /usr/local/bin/libtool*

以上です。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2