librelist archives

« back to archive

build problem on os x: ruby paths

build problem on os x: ruby paths

From:
Eric Watson
Date:
2011-06-18 @ 11:15
Hi all,

I'm having trouble getting my system to use the packaged ruby when building
shoes. Wondering if anyone can see what I'm doing wrong. First the build
error, then some background info.

My build fails with a "Stack too deep" error. It looks like I am loading my
rvm versions of rake and fileutils over the packaged versions. Messages at
the bottom of the trace look like they're from the packaged rake, but at the
top it seems to be using rvm rake and fileutils:

imac:shoes eric$ rake --trace
(in /Users/eric/projects/shoes)

/Users/eric/.rvm/gems/ruby-1.9.2-p180@shoes/gems/rake-0.9.0/lib/rake/file_utils.rb:10:
warning: already initialized constant RUBY

/Users/eric/.rvm/gems/ruby-1.9.2-p180@shoes/gems/rake-0.9.0/lib/rake/file_utils.rb:84:
warning: already initialized constant LN_SUPPORTED
Using arch i386
** Invoke default (first_time)
** Invoke build (first_time)
** Invoke build_os (first_time)
** Invoke buildenv_linux (first_time)
** Execute buildenv_linux
rake aborted!
stack level too deep

/Users/eric/.rvm/gems/ruby-1.9.2-p180@shoes/gems/rake-0.9.0/lib/rake/file_utils_ext.rb:36:in
`rm_rf'

/Users/eric/.rvm/gems/ruby-1.9.2-p180@shoes/gems/rake-0.9.0/lib/rake/file_utils_ext.rb:36:in
`rm_rf'
<...>

/Users/eric/.rvm/gems/ruby-1.9.2-p180@shoes/gems/rake-0.9.0/lib/rake/file_utils_ext.rb:36:in
`rm_rf'

/Users/eric/.rvm/gems/ruby-1.9.2-p180@shoes/gems/rake-0.9.0/lib/rake/file_utils_ext.rb:36:in
`rm_rf'

/Users/eric/.rvm/gems/ruby-1.9.2-p180@shoes/gems/rake-0.9.0/lib/rake/file_utils_ext.rb:36:in
`rm_rf'
/Users/eric/projects/shoes/make/rakefile_common.rb:5:in `block in <top
(required)>'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:613:in `call'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:613:in `block in
execute'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:608:in `each'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:608:in `execute'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:574:in `block in
invoke_with_call_chain'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/monitor.rb:190:in
`mon_synchronize'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:567:in
`invoke_with_call_chain'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:584:in `block in
invoke_prerequisites'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:581:in `each'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:581:in
`invoke_prerequisites'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:573:in `block in
invoke_with_call_chain'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/monitor.rb:190:in
`mon_synchronize'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:567:in
`invoke_with_call_chain'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:584:in `block in
invoke_prerequisites'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:581:in `each'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:581:in
`invoke_prerequisites'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:573:in `block in
invoke_with_call_chain'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/monitor.rb:190:in
`mon_synchronize'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:567:in
`invoke_with_call_chain'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:584:in `block in
invoke_prerequisites'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:581:in `each'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:581:in
`invoke_prerequisites'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:573:in `block in
invoke_with_call_chain'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/monitor.rb:190:in
`mon_synchronize'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:567:in
`invoke_with_call_chain'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:560:in `invoke'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:2012:in `invoke_task'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:1990:in `block (2
levels) in top_level'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:1990:in `each'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:1990:in `block in
top_level'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:2029:in
`standard_exception_handling'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:1984:in `top_level'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:1963:in `block in
run'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:2029:in
`standard_exception_handling'
/Users/eric/projects/shoes/deps/lib/ruby/1.9.1/rake.rb:1960:in `run'
./deps/bin/rake:31:in `<main>'


I'm using use-deps to set RUBYOPTS like so:

DEPS_PATH=./deps
RUBYOPT="-I$DEPS_PATH/lib/ruby/site_ruby/1.9.1 -I$DEPS_PATH/lib/ruby/1.9.1
-I$DEPS_PATH/lib/ruby/1.9.1/i386-darwin10.7.0"
export RUBYOPT

That seems to work:

imac:~ eric$ cd projects/shoes
imac:shoes eric$ which ruby
/Users/eric/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
imac:shoes eric$ which rake
/Users/eric/.rvm/gems/ruby-1.9.2-p180@shoes/bin/rake
imac:shoes eric$ which irb
/Users/eric/.rvm/rubies/ruby-1.9.2-p180/bin/irb
imac:shoes eric$ source use-deps
imac:shoes eric$ which ruby
./deps/bin/ruby
imac:shoes eric$ which rake
./deps/bin/rake
imac:shoes eric$ which irb
./deps/bin/irb
imac:shoes eric$ ruby -v
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin10.7.0]

So far, so good. But then if I try to use irb, I get the system one:

imac:shoes eric$ irb
ruby-1.9.2-p180 :001 >

Any thoughts?

Eric