Project

General

Profile

Actions

Bug #5073

closed

Ruby 1.9.2 may fail to build ri data when an RDoc plugin is installed

Added by ryadav (Rajinder Yadav) over 13 years ago. Updated almost 12 years ago.

Status:
Closed
Target version:
ruby -v:
1.9.2p136
Backport:
[ruby-core:38378]

Description

I get the following build error on my Linux box while trying to build
ruby-1.9.2-p290, how to fix? it look like a issues with RDoc

make[1]: Entering directory /opt/ruby-1.9.2-p290' gcc -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -L. -rdynamic -Wl,-export-dynamic main.o -Wl,-R -Wl,/usr/local/lib -L/usr/local/lib -lruby-static -lpthread -lrt -ldl -lcrypt -lm -o ruby make[1]: Leaving directory /opt/ruby-1.9.2-p290'
Generating RDoc documentation
./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb
./tool/runruby.rb --extout=.ext -- "./bin/rdoc" --no-force-update
--all --ri --op ".ext/rdoc" "."
/usr/local/lib/ruby/gems/1.9.1/gems/rdoc-3.8/lib/rdoc/rdoc.rb:79:
warning: already initialized constant GENERATORS
uh-oh! RDoc had a problem:
undefined method `coverage_report' for #RDoc::Options:0x00000001966e68

run with --debug for full backtrace
make: *** [rdoc] Error 1

================

On Wed, Jul 20, 2011 at 11:04 PM, Eric Hodel wrote:

On Jul 20, 2011, at 6:28 PM, Dev Guy wrote:

On Wed, Jul 20, 2011 at 9:08 PM, Eric Hodel wrote:

On Jul 20, 2011, at 8:29 AM, Dev Guy wrote:

I get the following build error on my Linux box while trying to build
ruby-1.9.2-p290, how to fix? it look like a issues with RDoc

Can you run just this from the build directory:

./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb
./tool/runruby.rb --extout=.ext -- "./bin/rdoc" --no-force-update
--all --ri --op ".ext/rdoc" "." --debug

It should print out a backtrace

i assume that's all in one line?

Yup.

here is what I got

/usr/local/lib/ruby/gems/1.9.1/gems/rdoc-3.8/lib/rdoc/rdoc.rb:79:
warning: already initialized constant GENERATORS
undefined method coverage_report' for #<RDoc::Options:0x000000027cd678> /usr/local/lib/ruby/gems/1.9.1/gems/rdoc-3.8/lib/rdoc/rdoc.rb:428:in document'
./bin/rdoc:15:in `'

I tried to reproduce your issue with the following steps:

Download 1.9.2-p136 and -p290

Install p136 into ~/tmp/ruby/136

export PATH=~/tmp/ruby/136/bin

Install RDoc 3.8

in p290: ./configure --prefix=/Users/drbrain/tmp/ruby/290; make

It did not reproduce.

Do you have RUBYOPT set?

Do you have any rdoc plugins installed? gem list rdoc should list them

Can you run this command:

$ ./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb ./tool/runruby.rb --extout=.ext -- -e 'require "rdoc/rdoc"; p $".grep(/generator/)'

I get:

["/Users/drbrain/tmp/ruby/ruby-1.9.2-p290/lib/rdoc/generator.rb", "/Users/drbrain/tmp/ruby/ruby-1.9.2-p290/lib/rdoc/generator/markup.rb", "/Users/drbrain/tmp/ruby/ruby-1.9.2-p290/lib/rdoc/generator/darkfish.rb", "/Users/drbrain/tmp/ruby/ruby-1.9.2-p290/lib/rdoc/generator/ri.rb"]

You should see something similar.

my output is (not sure why I got 1.9.1 in there???)

["/usr/local/lib/ruby/gems/1.9.1/gems/rdoc-3.8/lib/rdoc/generator.rb",
"/usr/local/lib/ruby/gems/1.9.1/gems/rdoc-3.8/lib/rdoc/generator/markup.rb",
"/usr/local/lib/ruby/gems/1.9.1/gems/rdoc-3.8/lib/rdoc/generator/darkfish.rb",
"/usr/local/lib/ruby/gems/1.9.1/gems/rdoc-3.8/lib/rdoc/generator/ri.rb",
"/usr/local/lib/ruby/gems/1.9.1/gems/horo-1.0.3/lib/rdoc/generator/horo.rb"]

these are all my installed gems

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.9, 3.0.4)
actionpack (3.0.9, 3.0.4)
activemodel (3.0.9, 3.0.4)
activerecord (3.0.9, 3.0.4)
activeresource (3.0.9, 3.0.4)
activesupport (3.0.9, 3.0.4)
archive-tar-minitar (0.5.2)
arel (2.1.3, 2.0.10, 2.0.9, 2.0.8)
authlogic (2.1.6)
autotest (4.4.6)
autotest-rails-pure (4.1.2)
babosa (0.2.2)
bcrypt-ruby (2.1.4)
builder (3.0.0, 2.1.2)
bundler (1.0.15, 1.0.10)
calendar_date_select (1.16.2)
cancan (1.5.1)
coffee-script (2.2.0)
coffee-script-source (1.1.1)
columnize (0.3.3)
daemon_controller (0.2.6)
devise (1.1.7)
diff-lcs (1.1.2)
erubis (2.7.0, 2.6.6)
execjs (1.2.0)
fastri (0.3.1.1)
fastthread (1.0.7)
file-tail (1.0.5)
forgery (0.3.7)
friendly_id (3.2.1)
grackle (0.1.10)
gruff (0.3.6)
hike (1.1.0)
horo (1.0.3)
i18n (0.6.0, 0.5.0)
json (1.5.3, 1.5.1)
linecache19 (0.5.12)
mail (2.3.0, 2.2.19, 2.2.15)
mechanize (1.0.0)
memcache-client (1.8.5)
mime-types (1.16)
minitest (1.6.0 ruby)
mocha (0.9.12)
multi_json (1.0.3)
nifty-generators (0.4.5)
nokogiri (1.4.6, 1.4.4)
oauth (0.4.4)
paperclip (2.3.8)
passenger (3.0.2)
patron (0.4.11)
pg (0.10.1)
polyglot (0.3.1)
rack (1.3.0, 1.2.2, 1.2.1)
rack-cache (1.0.2)
rack-mount (0.8.1, 0.6.14, 0.6.13)
rack-ssl (1.3.2)
rack-test (0.6.0, 0.5.7)
rails (3.0.9, 3.0.4)
railties (3.0.9, 3.0.4)
rake (0.9.2, 0.8.7 ruby)
rdoc (3.8, 2.5.8)
RedCloth (4.2.7)
rmagick (2.13.1)
rspec (2.5.0)
rspec-core (2.5.1)
rspec-expectations (2.5.0)
rspec-mocks (2.5.0)
rspec-rails (2.5.0)
ruby-debug-base19 (0.11.25)
ruby-debug19 (0.11.6)
ruby-prof (0.10.7)
ruby_core_source (0.1.5)
sass (3.1.3)
simple_form (1.3.1)
sprockets (2.0.0.beta.10)
spruz (0.2.5)
sqlite3 (1.3.3)
thor (0.14.6)
tilt (1.3.2)
tiny_mce (0.1.4)
tkri (0.9.5)
treetop (1.4.9)
tzinfo (0.3.29, 0.3.25, 0.3.24)
uglifier (1.0.0)
w3c_validators (1.1.1)
warden (1.0.3)
webrat (0.7.3)
will_paginate (2.3.15)
wxruby (2.0.0 x86_64-linux)
yajl-ruby (0.8.2)
ZenTest (4.4.2)

================
On 11-07-21 09:24 PM, Dev Guy wrote:

./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb ./tool/runruby.rb --extout=.ext -- -e 'require "rdoc/rdoc"; p $".grep(/generator/)'

btw I am seeing the exact same issue on my other Linux box

$uname -a
Linux karma 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:07:17 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

$ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]

$gem -v
1.3.7

$ ./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb ./tool/runruby.rb --extout=.ext -- -e 'require "rdoc/rdoc"; p $".grep(/generator/)'

/usr/local/lib/ruby/gems/1.9.1/gems/rdoc-3.8/lib/rdoc/rdoc.rb:79: warning: already initialized constant GENERATORS
["/usr/local/lib/ruby/gems/1.9.1/gems/rdoc-3.8/lib/rdoc/generator.rb", "/usr/local/lib/ruby/gems/1.9.1/gems/rdoc-3.8/lib/rdoc/generator/markup.rb", "/usr/local/lib/ruby/gems/1.9.1/gems/rdoc-3.8/lib/rdoc/generator/darkfish.rb", "/usr/local/lib/ruby/gems/1.9.1/gems/rdoc-3.8/lib/rdoc/generator/ri.rb", "/usr/local/lib/ruby/gems/1.9.1/gems/horo-1.0.3/lib/rdoc/generator/horo.rb"]

On Jul 21, 2011, at 6:25 PM, Dev Guy wrote:

my output is (not sure why I got 1.9.1 in there???)
1.9.1 is the API compatibility version. 1.9.1 is expected.

["/usr/local/lib/ruby/gems/1.9.1/gems/rdoc-3.8/lib/rdoc/generator.rb",
"/usr/local/lib/ruby/gems/1.9.1/gems/rdoc-3.8/lib/rdoc/generator/markup.rb",
"/usr/local/lib/ruby/gems/1.9.1/gems/rdoc-3.8/lib/rdoc/generator/darkfish.rb",
"/usr/local/lib/ruby/gems/1.9.1/gems/rdoc-3.8/lib/rdoc/generator/ri.rb",
"/usr/local/lib/ruby/gems/1.9.1/gems/horo-1.0.3/lib/rdoc/generator/horo.rb"]
You can work around this by uninstalling horo or RDoc 3.8 and reinstalling after completing the upgrade to 1.9.2-p290.

I'm not sure how to fix the actual issue in an easy way.

The problem is this:

RDoc 2.5.8 comes with Ruby 1.9.2

RDoc 2.5.8 will try to load plugins when rdoc/rdoc is loaded.

The plugin horo activates the RDoc gem, then requires rdoc/rdoc again redefining methods that won't work with the objects created before the plugin load.

Could you add a ticket to redmine.ruby-lang.org and assign it to me?

It should say "RDoc should not load plugins when building ri data"

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0