rock-core / autoproj

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

failed to execute autoproj install-stage2 #394

Closed annaborn closed 1 year ago

annaborn commented 1 year ago

Hello Sylvain @doudou!

I try to bootstrap a new buildconf. And as usual I run:

 wget http://rock-robotics.org/autoproj_bootstrap
ruby autoproj_bootstrap git <git repo>

but it failed

Bundle complete! 1 Gemfile dependency, 27 gems now installed.
Bundled gems are installed into `/home/dfki.uni-bremen.de/aborn/.local/share/autoproj/gems`
starting the newly installed autoproj for stage2 install
Traceback (most recent call last):
    3: from /media/aborn/leni/DEVEL/mars2/mars2_new_core_native/.autoproj/bin/autoproj:49:in `<main>'
    2: from /media/aborn/leni/DEVEL/mars2/mars2_new_core_native/.autoproj/bin/autoproj:49:in `load'
    1: from /var/lib/gems/2.7.0/gems/autoproj-2.16.0/bin/autoproj:3:in `<top (required)>'
/var/lib/gems/2.7.0/gems/autoproj-2.16.0/bin/autoproj:3:in `require': cannot load such file -- autoproj/cli (LoadError)
Traceback (most recent call last):
    1: from autoproj_bootstrap:846:in `<main>'
autoproj_bootstrap:807:in `call_stage2': failed to execute autoproj install-stage2 (RuntimeError)

Thank you in advance!

doudou commented 1 year ago

Can you try with the bootstrap script from autoproj itself ? I sent the link on the mailing lists a few weeks ago. Otherwise you can find it in bin/autoproj_bootstrap in the repo

doudou commented 1 year ago

I would have sent you the links but I'm on my phone

annaborn commented 1 year ago

@doudou thank you! I found the link in your email. https://raw.githubusercontent.com/rock-core/autoproj/master/bin/autoproj_install

I got the script and run ruby autoproj_install git , but I have the same issue.

doudou commented 1 year ago

Just checked and boostrapping works here (Ubuntu 20.04, Ruby 2.7)

There should not be any gems in /var/lib/gems. I guess you have sometimes installed files using sudo and then this wreaks havoc.

image

My suggestion is to

  1. remove all files in /var/lib/gems - (WARN: this might break existing workspaces)
  2. never ever use sudo to run gem or bundle

If (1) does break existing workspaces, you should be able to repair them by running the autoproj_install script to repair autoproj itself, and then autoproj osdeps to repair the workspace.

annaborn commented 1 year ago

Thank you for the suggestions, Sylvain! I deleted gems from /var/lib/gems and specification from /usr/lib/ruby/gems. Now I could bootstrap the workspace :)