On Dec 26, 2007 12:17 AM, M. Edward (Ed) Borasky <znmeb / cesmail.net> wrote: > Are there some paths or environment variables I need to set with Ruby > 1.9.0-0 to build gems with C code in them? So far, I've tried to do "gem > install rcov" and "gem install hpricot" and neither of them has worked > (logs attached). Pure Ruby gems like flog, heckle and rspec seem to > install fine, although I haven't actually tested them on code yet. > > > Building native extensions. This could take a while... > ERROR: Error installing hpricot: > ERROR: Failed to build gem native extension. > > /home/znmeb/cougar/ruby-1.9-testing/install/bin/ruby extconf.rb install hpricot > checking for main() in -lc... yes > creating Makefile > > make > gcc -I. -I/home/znmeb/cougar/ruby-1.9-testing/install/include/ruby-1.9.0/x86_64-linux -I/home/znmeb/cougar/ruby-1.9-testing/install/include/ruby-1.9.0 -I. -fPIC -march=athlon64 -O3 -o hpricot_scan.o -c hpricot_scan.c > ext/hpricot_scan/hpricot_scan.rl: In function 'hpricot_scan': > ext/hpricot_scan/hpricot_scan.rl:172: error: 'struct RString' has no member named 'ptr' > ext/hpricot_scan/hpricot_scan.rl:185: error: 'struct RString' has no member named 'ptr' > ext/hpricot_scan/hpricot_scan.rl:185: error: 'struct RString' has no member named 'len' > ext/hpricot_scan/hpricot_scan.rl:186: error: 'struct RString' has no member named 'len' > ext/hpricot_scan/hpricot_scan.rl:202: error: 'struct RString' has no member named 'ptr' > make: *** [hpricot_scan.o] Error 1 > This came over and over again on ruby-core i suppose. Hpricot is using RTRING(str)->len and RSTRING(str)->ptr which are deprecated in Ruby 1.9. New alternatives are RSTRING_PTR and RSTRING_LEN. In many places, slight logic change is required. > > Gem files will remain installed in /home/znmeb/cougar/ruby-1.9-testing/install/lib/ruby/gems/1.9.0/gems/hpricot-0.6 for inspection. > Results logged to /home/znmeb/cougar/ruby-1.9-testing/install/lib/ruby/gems/1.9.0/gems/hpricot-0.6/ext/hpricot_scan/gem_make.out > > Building native extensions. This could take a while... > ERROR: Error installing rcov: > ERROR: Failed to build gem native extension. > > /home/znmeb/cougar/ruby-1.9-testing/install/bin/ruby extconf.rb install rcov > creating Makefile > > make > gcc -I. -I/home/znmeb/cougar/ruby-1.9-testing/install/include/ruby-1.9.0/x86_64-linux -I/home/znmeb/cougar/ruby-1.9-testing/install/include/ruby-1.9.0 -I. -fPIC -march=athlon64 -O3 -o callsite.o -c callsite.c > callsite.c:2:17: error: env.h: No such file or directory > callsite.c:3:18: error: node.h: No such file or directory > callsite.c:4:16: error: st.h: No such file or directory > callsite.c: In function 'callsite_custom_backtrace': > callsite.c:82: error: 'ruby_frame' undeclared (first use in this function) > callsite.c:82: error: (Each undeclared identifier is reported only once > callsite.c:82: error: for each function it appears in.) > callsite.c:84: error: 'NODE' undeclared (first use in this function) > callsite.c:84: error: 'n' undeclared (first use in this function) > callsite.c:89: error: dereferencing pointer to incomplete type > callsite.c:90: error: dereferencing pointer to incomplete type > callsite.c:92: error: dereferencing pointer to incomplete type > callsite.c:92: error: dereferencing pointer to incomplete type > callsite.c:93: error: dereferencing pointer to incomplete type > callsite.c:93: error: dereferencing pointer to incomplete type > callsite.c:94: error: dereferencing pointer to incomplete type > callsite.c:96: error: dereferencing pointer to incomplete type > callsite.c:96: error: dereferencing pointer to incomplete type > callsite.c:101: error: dereferencing pointer to incomplete type > callsite.c: At top level: > callsite.c:121: error: expected ')' before 'event' > callsite.c: In function 'cov_install_callsite_hook': > callsite.c:161: error: 'coverage_event_callsite_hook' undeclared (first use in this function) > callsite.c:162: error: too few arguments to function 'rb_add_event_hook' > callsite.c: In function 'cov_remove_callsite_hook': > callsite.c:176: error: 'coverage_event_callsite_hook' undeclared (first use in this function) > make: *** [callsite.o] Error 1 > > > Gem files will remain installed in /home/znmeb/cougar/ruby-1.9-testing/install/lib/ruby/gems/1.9.0/gems/rcov-0.8.1.2.0 for inspection. > Results logged to /home/znmeb/cougar/ruby-1.9-testing/install/lib/ruby/gems/1.9.0/gems/rcov-0.8.1.2.0/ext/rcovrt/gem_make.out > > Something similar. Certain header files are no longer available in Ruby 1.9. RCov is apparently still trying to find them and failing. for example: version.h. -- Let them talk of their oriental summer climes of everlasting conservatories; give me the privilege of making my own summer with my own coals. http://gnufied.org