[Rubygems-developers] [ rubygems-Patches-27795 ] ruby-prof on Windows

noreply at rubyforge.org noreply at rubyforge.org
Sun Feb 7 22:59:43 EST 2010


Patches item #27795, was opened at 2010-02-07 19:59
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=577&aid=27795&group_id=126

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Greg Hazel (ghazel)
Assigned to: Nobody (None)
Summary: ruby-prof on Windows

Initial Comment:
Trying to install ruby-prof on Windows (msvc6) I get:

S:\>gem install ruby-prof
Building native extensions.  This could take a while...
ERROR:  Error installing ruby-prof:
        ERROR: Failed to build gem native extension.

C:/Ruby/bin/ruby.exe extconf.rb
checking for sys/times.h... no
checking for rb_os_allocated_objects()... no
checking for rb_gc_allocated_size()... no
checking for rb_gc_collections()... no
checking for rb_gc_time()... no
checking for rb_heap_total_mem()... no
checking for rb_gc_heap_info()... no
checking for rb_gc_malloc_allocations()... no
checking for rb_gc_malloc_allocated_size()... no
creating Makefile

nmake

Microsoft (R) Program Maintenance Utility   Version 6.00.9782.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

        C:\Ruby\bin\ruby -e "puts 'EXPORTS', 'Init_ruby_prof'"  > ruby_prof-i386-mswin32.def
        cl -nologo -I. -I. -IC:/Ruby/lib/ruby/1.8/i386-mswin32 -I. -MD -Zi -O2b2xg- -G6  -c -Tcruby_prof.c
ruby_prof.c
measure_cpu_time.h(32) : error C2632: 'long' followed by 'long' is illegal
measure_cpu_time.h(96) : error C2632: 'long' followed by 'long' is illegal
measure_cpu_time.h(98) : error C2632: 'long' followed by 'long' is illegal
measure_cpu_time.h(99) : error C2632: 'long' followed by 'long' is illegal
ruby_prof.c(1150) : error C2275: 'prof_call_info_t' : illegal use of this type as an expression
        ruby_prof.h(130) : see declaration of 'prof_call_info_t'
ruby_prof.c(1150) : error C2065: 'call_info' : undeclared identifier
ruby_prof.c(1151) : error C2275: 'prof_method_t' : illegal use of this type as an expression
        ruby_prof.h(116) : see declaration of 'prof_method_t'
ruby_prof.c(1151) : error C2065: 'method' : undeclared identifier
ruby_prof.c(1164) : warning C4047: '=' : 'int ' differs in levels of indirection from 'struct prof_method_t *'
ruby_prof.c(1167) : error C2223: left of '->active' must point to struct/union
ruby_prof.c(1173) : error C2223: left of '->key' must point to struct/union
ruby_prof.c(1173) : warning C4047: 'function' : 'int ' differs in levels of indirection from 'struct st_table *'
ruby_prof.c(1173) : warning C4024: 'get_method' : different types for formal and actual parameter 5
ruby_prof.c(1173) : error C2198: 'get_method' : too few actual parameters
ruby_prof.c(1173) : warning C4047: '=' : 'int ' differs in levels of indirection from 'struct prof_method_t *'
ruby_prof.c(1176) : error C2223: left of '->active' must point to struct/union
ruby_prof.c(1180) : warning C4047: 'function' : 'struct prof_method_t *' differs in levels of indirection from 'int '
ruby_prof.c(1180) : warning C4024: 'prof_call_info_create' : different types for formal and actual parameter 1
ruby_prof.c(1180) : warning C4047: '=' : 'int ' differs in levels of indirection from 'struct prof_call_info_t *'
ruby_prof.c(1181) : error C2223: left of '->call_infos' must point to struct/union
ruby_prof.c(1181) : warning C4047: 'function' : 'struct prof_call_infos_t *' differs in levels of indirection from 'int '
ruby_prof.c(1181) : warning C4024: 'prof_add_call_info' : different types for formal and actual parameter 1
ruby_prof.c(1181) : error C2198: 'prof_add_call_info' : too few actual parameters
ruby_prof.c(1185) : error C2223: left of '->key' must point to struct/union
ruby_prof.c(1185) : error C2198: 'call_info_table_lookup' : too few actual parameters
ruby_prof.c(1185) : warning C4047: '=' : 'int ' differs in levels of indirection from 'struct prof_call_info_t *'
ruby_prof.c(1189) : warning C4047: 'function' : 'struct prof_method_t *' differs in levels of indirection from 'int '
ruby_prof.c(1189) : warning C4024: 'prof_call_info_create' : different types for formal and actual parameter 1
ruby_prof.c(1189) : warning C4047: '=' : 'int ' differs in levels of indirection from 'struct prof_call_info_t *'
ruby_prof.c(1190) : error C2223: left of '->key' must point to struct/union
ruby_prof.c(1190) : warning C4047: 'function' : 'const struct prof_method_key_t *' differs in levels of indirection from 'int '
ruby_prof.c(1190) : warning C4024: 'call_info_table_insert' : different types for formal and actual parameter 2
ruby_prof.c(1190) : error C2198: 'call_info_table_insert' : too few actual parameters
ruby_prof.c(1191) : error C2223: left of '->call_infos' must point to struct/union
ruby_prof.c(1191) : warning C4047: 'function' : 'struct prof_call_infos_t *' differs in levels of indirection from 'int '
ruby_prof.c(1191) : warning C4024: 'prof_add_call_info' : different types for formal and actual parameter 1
ruby_prof.c(1191) : error C2198: 'prof_add_call_info' : too few actual parameters
ruby_prof.c(1197) : warning C4047: '=' : 'struct prof_call_info_t *' differs in levels of indirection from 'int '
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.


Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.8/gems/ruby-prof-0.8.1 for inspection.
Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/ruby-prof-0.8.1/ext/gem_make.out



These look mostly like errors from coding in C99, when Visual Studio (even the latest version) only supports C89. Probably all of these fixes are easy - move the variable declarations to the top of the functions/scope they are in.

http://ruby-prof.rubyforge.org/ mentions a "Win32 RubyGem which includes a pre-built binary". I do not see such a gem anywhere: http://gemcutter.org/search?query=ruby-prof


----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=577&aid=27795&group_id=126


More information about the Rubygems-developers mailing list