Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 397329 - dev-lang/ruby-1.9.3_p0 does not compile
Summary: dev-lang/ruby-1.9.3_p0 does not compile
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-02 03:27 UTC by Thomas
Modified: 2013-03-28 22:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info,5.04 KB, text/plain)
2012-01-02 03:27 UTC, Thomas
Details
prelude.c (prelude.c,2.21 KB, text/plain)
2012-01-03 20:27 UTC, Thomas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas 2012-01-02 03:27:57 UTC
Created attachment 297601 [details]
emerge --info

In fact, ruby itself does compile, but RDoc fails:

make[2]: Entering directory `/tmp/portage/dev-lang/ruby-1.9.3_p0/work/ruby-1.9.3-p0'
linking ruby19
make[2]: Leaving directory `/tmp/portage/dev-lang/ruby-1.9.3_p0/work/ruby-1.9.3-p0'
make[1]: Leaving directory `/tmp/portage/dev-lang/ruby-1.9.3_p0/work/ruby-1.9.3-p0'
Generating RDoc documentation
Parsing sources...
Before reporting this, could you check that the file you're documenting
has proper syntax:

  /usr/bin/ruby19 -c prelude.c

RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.

The internal error was:

        (NoMethodError) undefined method `[]=' for nil:NilClass

uh-oh! RDoc had a problem:
undefined method `[]=' for nil:NilClass

run with --debug for full backtrace

After this problem occurred, i removed all dev-ruby/* packages to build ruby  1.9 and rails 3.1.3 from scratch (quite a few packages were installed already with RUBY_TARGET=ruby18), the error didn't change.
Comment 1 Hans de Graaff gentoo-dev 2012-01-02 07:02:35 UTC
Which version of dev-ruby/rdoc do you have installed?
Comment 2 Thomas 2012-01-02 16:58:38 UTC
(In reply to comment #1)
> Which version of dev-ruby/rdoc do you have installed?

Currently none.  After the 1st attempt to update ruby and rails with many slotted packages to be rebuilt for RUBY_TARGET 1.9 just to be removed by depclean afterwards, i removed all dev-ruby/* packages and dev-lang/ruby, including rdoc.

The error message above stems from the attempt to build ruby 1.9 on a ruby-less system.
Comment 3 Hans de Graaff gentoo-dev 2012-01-02 19:15:25 UTC
Note that we currently don't support setups with only ruby19.

What I think is happening is that normally ruby18's rdoc will be used during bootstrapping. If you don't have ruby18 then things might break as they do.

Am I correct to assume that you don't have ruby18 installed?
Comment 4 Thomas 2012-01-02 20:43:29 UTC
(In reply to comment #3)
> Note that we currently don't support setups with only ruby19.

Does this mean "you know it is broken" or "i may try it but i am on my own here"?

> What I think is happening is that normally ruby18's rdoc will be used during
> bootstrapping. If you don't have ruby18 then things might break as they do.
> 
> Am I correct to assume that you don't have ruby18 installed?

Yes, you are.  I have removed each package with "ruby" in its name.  However, after your hint i have started over emerging ruby with RUBY_TARGET="ruby18 ruby19".  ruby-1.8.x compiled and installed fine and ruby 1.9.3 still did not (exactly same error).

Looking at that error message abv i wonder if the attempt to have ruby syntax-check a C file is something useful at all.  Why does the build script do this?  Maybe there is an error here?
Comment 5 Hans de Graaff gentoo-dev 2012-01-03 19:08:18 UTC
I can't reproduce this and the build process seems to do the exact same thing for me. Could you try two things:

Try with MAKEOPTS=-j1 ? It looks like prelude.c is generated, perhaps the build system doesn't take this into account.

I'd also be interested in the contents of prelude.c.

Otherwise try to run this in the source directory:

RUBYOPT="" ./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems ./bin/rdoc --debug --encoding=UTF-8 --no-force-update --all --ri --op .ext/rdoc .
Comment 6 Thomas 2012-01-03 20:27:29 UTC
Created attachment 297839 [details]
prelude.c
Comment 7 Thomas 2012-01-03 20:56:03 UTC
(In reply to comment #5)
> I can't reproduce this and the build process seems to do the exact same thing
> for me. Could you try two things:

What exactly do you mean by "exact same thing"?  Does your build process attempt to syntax check prelude.c?   (content attached)

> Try with MAKEOPTS=-j1 ? It looks like prelude.c is generated, perhaps the build
> system doesn't take this into account.

prelude.c is indeed generated from prelude.rb.  Tried to build it with -j1, no difference.

> I'd also be interested in the contents of prelude.c.
> 
> Otherwise try to run this in the source directory:
> 
> RUBYOPT="" ./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext
> -- --disable-gems ./bin/rdoc --debug --encoding=UTF-8 --no-force-update --all
> --ri --op .ext/rdoc .

I tried something different: not setting the "doc" USE flag lets the build process succeed.
Comment 8 Thomas 2012-01-03 21:33:00 UTC
PS: i switched everything else back to how i started.  ruby compiles fine with make -j8 and RUBY_TARGET=ruby19 only seemed to work as well.  I didn't actually _use_ my freshly built ruby yet, however.
Comment 9 Alex Legler (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2013-03-28 22:26:49 UTC
Reopen if this issue still occurs with the recent 1.9 packages