Skip to content

buildRubyGem: fix bundix cross#175871

Merged
marsam merged 2 commits intoNixOS:stagingfrom
Artturin:fixcross1
Jul 2, 2022
Merged

buildRubyGem: fix bundix cross#175871
marsam merged 2 commits intoNixOS:stagingfrom
Artturin:fixcross1

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.

@Artturin Artturin requested a review from marsam as a code owner June 2, 2022 00:26
@github-actions github-actions bot added the 6.topic: ruby A dynamic, open source programming language with a focus on simplicity and productivity. label Jun 2, 2022
@Artturin Artturin added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Jun 2, 2022
@ofborg ofborg bot requested review from Ma27, SCOTT-HAMILTON, manveru, nixy and zimbatm June 2, 2022 01:50
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. labels Jun 2, 2022
@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
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

@vcunat vcunat added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jun 19, 2022
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Jul 1, 2022
@ofborg ofborg bot requested a review from zimbatm July 1, 2022 15:59
Artturin added 2 commits July 1, 2022 19:17
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

Labels

6.topic: cross-compilation Building packages on a different platform than they will be used on 6.topic: ruby A dynamic, open source programming language with a focus on simplicity and productivity. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants