Can't install perftools.rb 2.0.4 with ruby 2.3.1 on Mac 10.11.2
Opened this issue ยท 5 comments
samboylett commented
$ gem install perftools.rb -v '2.0.4'
Building native extensions. This could take a while...
ERROR: Error installing perftools.rb:
ERROR: Failed to build gem native extension.
current directory: /Users/samboylett/.rvm/gems/ruby-2.3.1/gems/perftools.rb-2.0.4/ext
/Users/samboylett/.rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20160504-90402-dy962a.rb 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... yes
checking for insns.inc... yes
checking for insns_info.inc... yes
creating Makefile
current directory: /Users/samboylett/.rvm/gems/ruby-2.3.1/gems/perftools.rb-2.0.4/ext
make "DESTDIR=" clean
current directory: /Users/samboylett/.rvm/gems/ruby-2.3.1/gems/perftools.rb-2.0.4/ext
make "DESTDIR="
compiling perftools.c
In file included from perftools.c:5:
In file included from /Users/samboylett/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0/ruby.h:33:
In file included from /Users/samboylett/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0/ruby/ruby.h:24:
/Users/samboylett/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0/x86_64-darwin15/ruby/config.h:17:9: warning: '_GNU_SOURCE' macro redefined [-Wmacro-redefined]
#define _GNU_SOURCE 1
^
perftools.c:2:9: note: previous definition is here
#define _GNU_SOURCE
^
perftools.c:173:18: warning: initializing 'rb_iseq_t *' (aka 'struct rb_iseq_struct *') with an expression of type 'const rb_iseq_t *' (aka 'const struct rb_iseq_struct *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
rb_iseq_t *iseq = cfp->iseq;
^ ~~~~~~~~~
perftools.c:175:25: error: no member named 'type' in 'struct rb_iseq_struct'
if (iseq && iseq->type == ISEQ_TYPE_METHOD) {
~~~~ ^
perftools.c:177:23: error: no member named 'klass' in 'struct rb_iseq_struct'
klass = iseq->klass;
~~~~ ^
perftools.c:178:24: error: no member named 'defined_method_id' in 'struct rb_iseq_struct'
method = iseq->defined_method_id;
~~~~ ^
perftools.c:190:21: error: no member named 'me' in 'struct rb_control_frame_struct'
if (!cfp->me) break;
~~~ ^
perftools.c:192:24: error: no member named 'me' in 'struct rb_control_frame_struct'
klass = cfp->me->klass;
~~~ ^
perftools.c:193:25: error: no member named 'me' in 'struct rb_control_frame_struct'
method = cfp->me->called_id;
~~~ ^
2 warnings and 6 errors generated.
make: *** [perftools.o] Error 1
make failed, exit code 2
nanne007 commented
same error here.
arturtr commented
+1
BryanAntell commented
Same issue.
gate8team commented
Same one :(
IllyaMoskvin commented
It was perftools.rb 2.0.5 with ruby 2.4.0p0 on macOS 10.12.6 for me. Aside from minor differences in paths, errors and warnings were identical.
I solved it by removing the perftools dependency. I don't have that kind of time. For other poor souls who wander through here while maintaining legacy apps, see the comments in #80:
perftools isn't working or needed on rubies newer than 2.1