简体   繁体   English

在perftools上捆绑安装失败

[英]Bundle install fails on perftools

I'm getting errors when installing perftools using bundle install. 使用捆绑安装安装perftools时出现错误。 I get: 我得到:

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
(I'm about to compile google-perftools.. this will definitely take a while)
  -- tar zpxvf gperftools-2.0.tar.gz
  -- patch -p1 < ../../../patches/perftools.patch
  -- patch -p1 < ../../../patches/perftools-notests.patch
  -- patch -p1 < ../../../patches/perftools-pprof.patch
  -- patch -p1 < ../../../patches/perftools-gc.patch
  -- patch -p1 < ../../../patches/perftools-debug.patch
  -- patch -p1 < ../../../patches/perftools-objects.patch
  -- patch -p1 < ../../../patches/perftools-frames.patch
  -- patch -p1 < ../../../patches/perftools-realtime.patch
  -- patch -p1 < ../../../patches/perftools-pause.patch
  -- sed -i -e 's,SpinLock,ISpinLock,g' src/*.cc src/*.h src/base/*.cc src/base/*.h
  -- ./configure --disable-heap-profiler --disable-heap-checker --disable-debugalloc --disable-shared
  -- make
checking for method.h... no
checking for vm_core.h... no
checking for method.h... no
checking for vm_core.h... no
checking for method.h... yes
checking for vm_core.h... yes
checking for iseq.h... no


***************************************************************************************
****************** Debugger::RubyCoreSource::create_makefile FAILED *******************
***************************************************************************************
*** 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/2.0/usr/bin/ruby


Gem files will remain installed in /var/folders/j9/ghqqd20n13q5kjn2w0btg18m0000gn/T/bundler20140505-18890-1n58ssn/perftools.rb-2.0.1/gems/perftools.rb-2.0.1 for inspection.
Results logged to /var/folders/j9/ghqqd20n13q5kjn2w0btg18m0000gn/T/bundler20140505-18890-1n58ssn/perftools.rb-2.0.1/gems/perftools.rb-2.0.1/ext/gem_make.out
An error occurred while installing perftools.rb (2.0.1), and Bundler cannot continue.
Make sure that `gem install perftools.rb -v '2.0.1'` succeeds before bundling.  

However, when I do gem install perftools.rb -v '2.0.1' it builds and installs correctly. 但是,当我执行gem install perftools.rb -v '2.0.1'它会正确构建和安装。

I am using ruby 2.0.0-p353, with rbenv 0.4.0. 我正在使用ruby 2.0.0-p353和rbenv 0.4.0。 I'm using gcc version 4.2.1 我正在使用gcc版本4.2.1

I tried bundle installing with ruby 1.9.3 as well and get the same error. 我也尝试使用ruby 1.9.3进行捆绑安装,并得到相同的错误。 What should I do to fix this? 我应该怎么做才能解决这个问题?

Could you post the mkmf.log file that the error mentions? 您可以张贴该错误提到的mkmf.log文件吗? Was there any other error about missing files in the error output? 关于错误输出中丢失文件是否还有其他错误? If it installs correctly without bundler, maybe bundler is operating in a different environment (looking at .bundle/config if it exists and comparing ruby -v and bundle exec ruby -v may be helpful, too)? 如果在没有捆绑程序的情况下正确安装,则捆绑程序可能在其他环境中运行(查看.bundle / config是否存在以及将ruby -v和bundle exec ruby​​ -v进行比较也可能会有所帮助)?

I ran into something similar trying to set up a project that used this version of the gem with the same ruby version on Ubuntu 14.04 with gcc v4.8.2, bundler version 1.7.4. 我遇到了类似的尝试,试图建立一个项目,在Ubuntu 14.04上使用gcc v4.8.2,捆绑程序版本1.7.4,将这个版本的gem与相同的ruby版本一起使用。 Oddly enough running bundle install again after it fails worked for me, but I haven't had a chance to dig deeper to figure out why. 奇怪的是,运行失败的捆绑软件安装失败后再次对我有用,但是我没有机会更深入地了解原因。 :/ :/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM