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

buildRubyGem: fix bundix cross #175871

Merged
merged 2 commits into from Jul 2, 2022
Merged

buildRubyGem: fix bundix cross #175871

merged 2 commits into from Jul 2, 2022

Conversation

Artturin
Copy link
Member

@Artturin Artturin commented Jun 2, 2022

allows building bundix but most ruby gems still fail with

++ gem install --local --force --http-proxy http://nodtd.invalid/ --ignore-dependencies --install-dir /nix/store/...-ruby-aarch64-unknown-linux-gnu2.7.6-nio4r-2.5.8-aarch64-unknown-linux-gnu/lib/ruby/gems/2.7.0
--build-root / --backtrace --no-env-shebang -N /nix/store/...-nio4r-2.5.8.gem --
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 8: require: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 9: require: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 10: require: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 12: required_version: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 14: unless: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 15: abort: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 16: end: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 18: args: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 20: begin: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 21: Gem::GemRunner.new.run: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 22: rescue: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 23: exit: e.exit_code: numeric argument required
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@Mindavi
Copy link
Contributor

Mindavi commented Jun 2, 2022

Oops, was building the wrong branch...

Built OK:

  • nix build github:Artturin/nixpkgs/fixcross1#pkgsCross.aarch64-multiplatform.bundix

@Artturin Artturin force-pushed the fixcross1 branch 2 times, most recently from 3ef0666 to 1f741f5 Compare June 2, 2022 12:24
@Artturin Artturin changed the base branch from master to staging June 2, 2022 23:51
++ nativeBuildInputs;

buildInputs = [
ruby
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't ruby be in the nativeBuildInputs only?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't ruby be in the nativeBuildInputs only?

ruby contains libraries and addGemPath,addRubyLibPath envHooks which add paths from buildInputs to GEM_PATH and RUBYLIB

allows building bundix but most ruby gems still fail with

```
++ gem install --local --force --http-proxy http://nodtd.invalid --ignore-dependencies --install-dir /nix/store/...-ruby-aarch64-unknown-linux-gnu2.7.6-nio4r-2.5.8-aarch64-unknown-linux-gnu/lib/ruby/gems/2.7.0
--build-root / --backtrace --no-env-shebang -N /nix/store/...-nio4r-2.5.8.gem --
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 8: require: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 9: require: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 10: require: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 12: required_version: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 14: unless: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 15: abort: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 16: end: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 18: args: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 20: begin: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 21: Gem::GemRunner.new.run: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 22: rescue: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 23: exit: e.exit_code: numeric argument required
```
@Artturin Artturin changed the title buildRubyGem: fix cross buildRubyGem: fix bundix cross Jul 1, 2022
@marsam marsam merged commit ce577b8 into NixOS:staging Jul 2, 2022
@Ericson2314
Copy link
Member

I am hoping we can backport this because I ran into a similar failure with 22.05.

@github-actions
Copy link
Contributor

Successfully created backport PR #191193 for staging-22.05.

@github-actions
Copy link
Contributor

The process '/usr/bin/git' failed with exit code 1

@Artturin
Copy link
Member Author

I am hoping we can backport this because I ran into a similar failure with 22.05.

I fixed lots of other ruby issues in a another pr, I don't remember which though.

@Ericson2314
Copy link
Member

This one was enough for mine! I want actually cross compiling Ruby stuff just had a target sensativity problem.

@Artturin Artturin deleted the fixcross1 branch October 23, 2022 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants