rock-core / autoproj

Rock (Robot Construction Kit) package-oriented build system
http://rock-robotics.org/rock-and-syskit/workspace
22 stars 21 forks source link

undefined method `split' for nil:NilClass (NoMethodError) #138

Closed mintar closed 7 years ago

mintar commented 7 years ago

The current autoproj version fails (Ubuntu 16.04, rock had been installed on the machine before):

$ mkdir ~/rock && cd ~/rock
$ wget http://rock-robotics.org/autoproj_bootstrap
$ ruby autoproj_bootstrap git git@github.com:rock-core/buildconf.git
Detected 'gem' to be /usr/bin/gem2.3
Detected bundler at /home/martin/.autoproj/gems/ruby/2.3.0/bin/bundler
Installing autoproj in /home/martin/.autoproj/gems/ruby/2.3.0
Fetching gem metadata from https://rubygems.org/..............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 11.3.0
Using equatable 0.5.0
Using tty-color 0.3.0
Using necromancer 0.3.0
Using tty-cursor 0.3.0
Using tty-platform 0.1.0
Using wisper 1.6.1
Using facets 3.1.0
Using bundler 1.15.1
Using concurrent-ruby 1.0.5
Using thor 0.19.4
Using pastel 0.6.1
Using utilrb 3.0.1
Using tty-prompt 0.6.0
Using autobuild 1.10.1
Using autoproj 2.0.3
Bundle complete! 2 Gemfile dependencies, 16 gems now installed.
Bundled gems are installed into /home/martin/.autoproj/gems.
starting the newly installed autoproj for stage2 install
/home/martin/.autoproj/gems/ruby/2.3.0/gems/autobuild-1.10.1/lib/autobuild/packages/cmake.rb:53:in `<class:CMake>': undefined method `split' for nil:NilClass (NoMethodError)
Did you mean?  split_all
    from /home/martin/.autoproj/gems/ruby/2.3.0/gems/autobuild-1.10.1/lib/autobuild/packages/cmake.rb:10:in `<module:Autobuild>'
    from /home/martin/.autoproj/gems/ruby/2.3.0/gems/autobuild-1.10.1/lib/autobuild/packages/cmake.rb:4:in `<top (required)>'
    from /home/martin/.autoproj/gems/ruby/2.3.0/gems/autobuild-1.10.1/lib/autobuild.rb:57:in `require'
    from /home/martin/.autoproj/gems/ruby/2.3.0/gems/autobuild-1.10.1/lib/autobuild.rb:57:in `<top (required)>'
    from /home/martin/.autoproj/gems/ruby/2.3.0/gems/autoproj-2.0.3/lib/autoproj/ops/install.rb:565:in `require'
    from /home/martin/.autoproj/gems/ruby/2.3.0/gems/autoproj-2.0.3/lib/autoproj/ops/install.rb:565:in `stage2'
    from /home/martin/.autoproj/gems/ruby/2.3.0/gems/autoproj-2.0.3/lib/autoproj/cli/main.rb:350:in `install_stage2'
    from /home/martin/.autoproj/gems/ruby/2.3.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
    from /home/martin/.autoproj/gems/ruby/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
    from /home/martin/.autoproj/gems/ruby/2.3.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
    from /home/martin/.autoproj/gems/ruby/2.3.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
    from /home/martin/.autoproj/gems/ruby/2.3.0/gems/autoproj-2.0.3/bin/autoproj:11:in `<top (required)>'
    from /home/martin/rock/.autoproj/bin/autoproj:15:in `load'
    from /home/martin/rock/.autoproj/bin/autoproj:15:in `<main>'
autoproj_bootstrap:570:in `call_stage2': failed to execute autoproj install-stage2 (RuntimeError)
    from autoproj_bootstrap:601:in `<main>'
mintar commented 7 years ago

Workaround: Changing into an existing rock installation and running aup solved the problem, probably by updating the autobuild gem? Anyhow, afterwards a clean reinstall of rock doesn't throw the above error.

mintar commented 7 years ago

Whoops, false alarm. Turns out I had made a local modification to that file, and this modification crashed with an empty CMAKE_PREFIX_PATH.

Sorry about the noise.