Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu24.04 error: cannot load such file -- net/smtp (LoadError) #408

Open
chhtz opened this issue Sep 23, 2024 · 10 comments
Open

Ubuntu24.04 error: cannot load such file -- net/smtp (LoadError) #408

chhtz opened this issue Sep 23, 2024 · 10 comments

Comments

@chhtz
Copy link
Member

chhtz commented Sep 23, 2024

Not sure if that is already on the agenda. I'm trying to bootstrap a project on Ubuntu24 using:

wget http://rock-robotics.org/master/autoproj_bootstrap
ruby autoproj_bootstrap git ${some bootstrap url}

Full output (HOME_DIR and BOOTSTRAP_DIR are valid directories of course):

Detected 'gem' to be /usr/bin/gem3.2
Detected bundler at /HOME_DIR/.local/share/autoproj/gems/ruby/3.2.0/bin/bundle
Installing autoproj in /HOME_DIR/.local/share/autoproj/gems/ruby/3.2.0
Fetching gem metadata from https://rubygems.org/.......
Resolving dependencies...
Bundle complete! 1 Gemfile dependency, 27 gems now installed.
Bundled gems are installed into `/HOME_DIR/.local/share/autoproj/gems`
starting the newly installed autoproj for stage2 install
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:38:in `require': cannot load such file -- net/smtp (LoadError)
	from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:38:in `require'
	from /HOME_DIR/.local/share/autoproj/gems/ruby/3.2.0/gems/autobuild-1.24.0/lib/autobuild.rb:14:in `<top (required)>'
	from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:38:in `require'
	from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:38:in `require'
	from /HOME_DIR/.local/share/autoproj/gems/ruby/3.2.0/gems/autoproj-2.17.0/lib/autoproj/ops/install.rb:802:in `stage2'
	from /HOME_DIR/.local/share/autoproj/gems/ruby/3.2.0/gems/autoproj-2.17.0/lib/autoproj/cli/main.rb:565:in `install_stage2'
	from /HOME_DIR/.local/share/autoproj/gems/ruby/3.2.0/gems/thor-1.3.2/lib/thor/command.rb:28:in `run'
	from /HOME_DIR/.local/share/autoproj/gems/ruby/3.2.0/gems/thor-1.3.2/lib/thor/invocation.rb:127:in `invoke_command'
	from /HOME_DIR/.local/share/autoproj/gems/ruby/3.2.0/gems/thor-1.3.2/lib/thor.rb:538:in `dispatch'
	from /HOME_DIR/.local/share/autoproj/gems/ruby/3.2.0/gems/thor-1.3.2/lib/thor/base.rb:584:in `start'
	from /HOME_DIR/.local/share/autoproj/gems/ruby/3.2.0/gems/autoproj-2.17.0/bin/autoproj:8:in `<top (required)>'
	from /BOOTSTRAP_DIR/.autoproj/bin/autoproj:49:in `load'
	from /BOOTSTRAP_DIR/.autoproj/bin/autoproj:49:in `<main>'
autoproj_bootstrap:807:in `call_stage2': failed to execute autoproj install-stage2 (RuntimeError)
	from autoproj_bootstrap:846:in `<main>'

Are there any known workarounds? I tried manually installing

gem install -i ~/.local/share/autoproj/gems/ net-smtp

Or adding that to autoproj's Gemfile without success.

I guess I don't need any smtp-support, but probably this won't be the only issue.

@g-arjones
Copy link
Contributor

@g-arjones
Copy link
Contributor

Nevermind... There's a PR still pending on autobuild.

@chhtz
Copy link
Member Author

chhtz commented Sep 24, 2024

Thanks for the fast response!
It is indeed still the same error (except for some line numbers). I assume you mean this PR rock-core/autobuild#127?
Can I test locally with a fork/branch of autobuild?

@planthaber
Copy link
Member

As far as I remember you can bootstrap with https://rock-robotics.org/autoproj_bootstrap-dev to get locally checked out versions of autoproj/autobuild

@chhtz
Copy link
Member Author

chhtz commented Sep 24, 2024

Nice that works! (I downloaded that and replaced the branch name of autobuild inside the script). And in fact bootstrapping succeeds, but aup fails at some point with:

[...]
Command failed
the 'binding_of_caller' osdep refers to another osdep, 'ruby-dev', which does not seem to exist: Autoproj::OSPackageResolver::InvalidRecursiveStatement

I could resolve this by copying:

cp ./autoproj/remotes/orocos.toolchain/orocos.osdeps-ruby3{0,2}

After that, I think I only have dependency issues related to the actual bootstrap (e.g., not finding libqwt5-qt4-dev ...), i.e., from my side I'm fine with closing this once the related PR is merged.

@ndahn
Copy link

ndahn commented Oct 17, 2024

@chhtz Can you give a few more details on how you got that script to run? I changed the branch name in default_gemfile_contents, but when I run it it just picks up the official release gem again.

@chhtz
Copy link
Member Author

chhtz commented Oct 17, 2024

This is my line 271 in autoproj_bootstrap-dev:

                 "gem \"autobuild\", git: \"https://github.com/rock-core/autobuild.git\", branch: \"run_workflows_on_ruby3\"",

And afterwards I called

ruby autoproj_bootstrap-dev git ${some bootstrap url}

Just retested and it still works (to actually aup+amake, I had to adapt several package sets).

@ndahn
Copy link

ndahn commented Oct 17, 2024

Ahhh, I had an .autoproj folder that had the version cached. Thanks!

@ndahn
Copy link

ndahn commented Oct 30, 2024

FYI, one major issue is that recent versions of ruby abandoned File.exists? in favor of File.exist? (no s)...

@chhtz
Copy link
Member Author

chhtz commented Nov 25, 2024

@ndahn I made PRs for most (?) required changes. All necessary overrides should be in the relatively new dfki.ric package set, so this should work in an otherwise empty project:

package_sets:
  - github: dfki-ric/dfki-ric-package_set
layout:
  - dfki.ric
  - rock.cpp
  - rock.core
ignored_packages:
  - gui/vizkit
  - gui/qgv
  - gui/rock_replay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants