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

mruby: init at 1.4.1 #44840

Merged
merged 3 commits into from Aug 10, 2018
Merged

mruby: init at 1.4.1 #44840

merged 3 commits into from Aug 10, 2018

Conversation

nicknovitski
Copy link
Contributor

I'm surprised it wasn't already in the repository.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • [ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • [ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • [ ] Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@xeji
Copy link
Contributor

xeji commented Aug 9, 2018

@GrahamcOfBorg build mruby

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: mruby

Partial log (click to expand)

      MRBC mrblib/kernel.rb
      MRBC mrblib/numeric.rb
      MRBC mrblib/range.rb
      MRBC mrblib/string.rb
rake aborted!
exit

make: *** [Makefile:8: all] Error 1
builder for '/nix/store/ww8bjc1378kmm32kl4qds4z41b0xr8rl-mruby-1.4.1.drv' failed with exit code 2
error: build of '/nix/store/ww8bjc1378kmm32kl4qds4z41b0xr8rl-mruby-1.4.1.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: mruby

Partial log (click to expand)

             mruby-class-ext - class/module extension
             mruby-test - mruby test
================================================

installing
post-installation fixup
strip is /nix/store/251fvx4mx9q4zarbca5cciasmn66p668-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/gg2xrdym4q63m8c1k03jjnhknwv2x2la-mruby-1.4.1/lib  /nix/store/gg2xrdym4q63m8c1k03jjnhknwv2x2la-mruby-1.4.1/bin
patching script interpreter paths in /nix/store/gg2xrdym4q63m8c1k03jjnhknwv2x2la-mruby-1.4.1
/nix/store/gg2xrdym4q63m8c1k03jjnhknwv2x2la-mruby-1.4.1

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: mruby

Partial log (click to expand)

/build/source/src/fmt_fp.c:245: undefined reference to `__addtf3'
/build/source/src/fmt_fp.c:245: undefined reference to `__netf2'
/build/source/build/host/lib/libmruby_core.a(fmt_fp.o): In function `fmt_core':
/build/source/src/fmt_fp.c:356: undefined reference to `__extenddftf2'
rake aborted!
Command Failed: [ld  -o "/build/source/build/host/bin/mrbc" "/build/source/build/host/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.o" "/build/source/build/host/lib/libmruby_core.a"  -lm ]

make: *** [Makefile:8: all] Error 1
builder for '/nix/store/bvjdpisnbjdnhjgvjqkcx0w021wp81wf-mruby-1.4.1.drv' failed with exit code 2
error: build of '/nix/store/bvjdpisnbjdnhjgvjqkcx0w021wp81wf-mruby-1.4.1.drv' failed

Copy link
Contributor

@xeji xeji left a comment

Choose a reason for hiding this comment

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

Fix build

@samueldr
Copy link
Member

samueldr commented Aug 9, 2018

Hi! Thanks for your contribution.

I personally was interested in the past into looking at mruby. Looks like you had more free time than me.

Looked at the Linux building issue and fixed it in my branch here. This also adds the tests, disabling a test that fails on Linux.

Feel free to rebase/squash into your commits. If you ever intend to not maintain the package, you can ping me in a PR removing yourself from maintaining it.

If you feel fine with the changes, I can also push this directly to your branch, which will trigger a new build, and then merge if everything's fine. Just ask.

For the record, if one needs to trace the build:

diff --git a/pkgs/development/compilers/mruby/default.nix b/pkgs/development/compilers/mruby/default.nix
index b7213671f76..e68547151b1 100644
--- a/pkgs/development/compilers/mruby/default.nix
+++ b/pkgs/development/compilers/mruby/default.nix
@@ -23,6 +23,11 @@ stdenv.mkDerivation rec {
     unset LD
   '';
 
+  # To get a verbose build, directly use `minirake` instead of `make`.
+  buildPhase = ''
+    ruby ./minirake --trace
+  '';
+
   installPhase = ''
     mkdir $out
     cp -R build/host/{bin,lib} $out

@nicknovitski nicknovitski force-pushed the mruby-init branch 4 times, most recently from ff4fd6f to 44dee02 Compare August 10, 2018 21:41
@xeji
Copy link
Contributor

xeji commented Aug 10, 2018

@GrahamcOfBorg build mruby

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: mruby

Partial log (click to expand)

/build/source/src/fmt_fp.c:245: undefined reference to `__addtf3'
/build/source/src/fmt_fp.c:245: undefined reference to `__netf2'
/build/source/build/host/lib/libmruby_core.a(fmt_fp.o): In function `fmt_core':
/build/source/src/fmt_fp.c:356: undefined reference to `__extenddftf2'
rake aborted!
Command Failed: [ld  -o "/build/source/build/host/bin/mrbc" "/build/source/build/host/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.o" "/build/source/build/host/lib/libmruby_core.a"  -lm ]

make: *** [Makefile:8: all] Error 1
builder for '/nix/store/hckpcliac10p2bnp9fdkzlax2540i0g1-mruby-1.4.1.drv' failed with exit code 2
error: build of '/nix/store/hckpcliac10p2bnp9fdkzlax2540i0g1-mruby-1.4.1.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: mruby

Partial log (click to expand)

      MRBC mrblib/kernel.rb
      MRBC mrblib/numeric.rb
      MRBC mrblib/range.rb
      MRBC mrblib/string.rb
rake aborted!
exit

make: *** [Makefile:8: all] Error 1
builder for '/nix/store/42zxscxi678z56c6jhsahdfy1p4f8swh-mruby-1.4.1.drv' failed with exit code 2
error: build of '/nix/store/42zxscxi678z56c6jhsahdfy1p4f8swh-mruby-1.4.1.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: mruby

Partial log (click to expand)

             mruby-class-ext - class/module extension
             mruby-test - mruby test
================================================

installing
post-installation fixup
strip is /nix/store/251fvx4mx9q4zarbca5cciasmn66p668-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/nhj6kw4w9i9m8zb4wxx4485qy7c0m217-mruby-1.4.1/lib  /nix/store/nhj6kw4w9i9m8zb4wxx4485qy7c0m217-mruby-1.4.1/bin
patching script interpreter paths in /nix/store/nhj6kw4w9i9m8zb4wxx4485qy7c0m217-mruby-1.4.1
/nix/store/nhj6kw4w9i9m8zb4wxx4485qy7c0m217-mruby-1.4.1

@nicknovitski
Copy link
Contributor Author

@xeji Sorry, I was pushing possible fixes in order to easily have the expressions available to a linux build environment, but none of them ended up working

@samueldr Thank you! Feel free to push those changes, and make yourself a maintainer too; I don't mind the responsibility, but I also don't think of myself as an expert.

@samueldr
Copy link
Member

@samueldr Thank you! Feel free to push those changes, and make yourself a maintainer too; I don't mind the responsibility, but I also don't think of myself as an expert.

Don't worry, being an expert isn't in itself required for being a maintainers. Sure it helps, but what's even better is caring for the package and somehow tracking its updates. I hope that, as a user, you'll keep track of mruby updates and provide the PRs as they come.


@GrahamcOfBorg build mruby

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: mruby

Partial log (click to expand)

ar: creating archive /private/tmp/nix-build-mruby-1.4.1.drv-0/source/build/host/lib/libmruby_core.a
LD    build/host/bin/mrbc
sh: gcc: command not found
sh: gcc: command not found
rake aborted!
Command Failed: [gcc  -o "/private/tmp/nix-build-mruby-1.4.1.drv-0/source/build/host/bin/mrbc" "/private/tmp/nix-build-mruby-1.4.1.drv-0/source/build/host/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.o" "/private/tmp/nix-build-mruby-1.4.1.drv-0/source/build/host/lib/libmruby_core.a"  -lm ]

make: *** [Makefile:8: all] Error 1
builder for '/nix/store/wns3by431vjkbc83mlmwrci3fazg7rpd-mruby-1.4.1.drv' failed with exit code 2
error: build of '/nix/store/wns3by431vjkbc83mlmwrci3fazg7rpd-mruby-1.4.1.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: mruby

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/1xnkrp67b7grk6jznf98kbj8fcrh3q6v-mruby-1.4.1
shrinking /nix/store/1xnkrp67b7grk6jznf98kbj8fcrh3q6v-mruby-1.4.1/bin/mruby
shrinking /nix/store/1xnkrp67b7grk6jznf98kbj8fcrh3q6v-mruby-1.4.1/bin/mirb
shrinking /nix/store/1xnkrp67b7grk6jznf98kbj8fcrh3q6v-mruby-1.4.1/bin/mrbc
shrinking /nix/store/1xnkrp67b7grk6jznf98kbj8fcrh3q6v-mruby-1.4.1/bin/mruby-strip
strip is /nix/store/gpc2wld1s0c6qzx9326cwn1wcx29xzsj-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/1xnkrp67b7grk6jznf98kbj8fcrh3q6v-mruby-1.4.1/lib  /nix/store/1xnkrp67b7grk6jznf98kbj8fcrh3q6v-mruby-1.4.1/bin
patching script interpreter paths in /nix/store/1xnkrp67b7grk6jznf98kbj8fcrh3q6v-mruby-1.4.1
checking for references to /build in /nix/store/1xnkrp67b7grk6jznf98kbj8fcrh3q6v-mruby-1.4.1...

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: mruby

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/flg1b13jcjjbgrm02985090rf4pqxk46-mruby-1.4.1
shrinking /nix/store/flg1b13jcjjbgrm02985090rf4pqxk46-mruby-1.4.1/bin/mruby
shrinking /nix/store/flg1b13jcjjbgrm02985090rf4pqxk46-mruby-1.4.1/bin/mruby-strip
shrinking /nix/store/flg1b13jcjjbgrm02985090rf4pqxk46-mruby-1.4.1/bin/mirb
shrinking /nix/store/flg1b13jcjjbgrm02985090rf4pqxk46-mruby-1.4.1/bin/mrbc
strip is /nix/store/ah0va6j4cnwj9nx4j6rwcfc8nh785jwm-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/flg1b13jcjjbgrm02985090rf4pqxk46-mruby-1.4.1/lib  /nix/store/flg1b13jcjjbgrm02985090rf4pqxk46-mruby-1.4.1/bin
patching script interpreter paths in /nix/store/flg1b13jcjjbgrm02985090rf4pqxk46-mruby-1.4.1
checking for references to /build in /nix/store/flg1b13jcjjbgrm02985090rf4pqxk46-mruby-1.4.1...
/nix/store/flg1b13jcjjbgrm02985090rf4pqxk46-mruby-1.4.1

@samueldr
Copy link
Member

samueldr commented Aug 10, 2018

Oh, interesting how the LD thing needs to be conditional. Fixing. Fixed.


@GrahamcOfBorg build mruby

I'm not sure of the semantics of `gcc` vs. `ld` for linking, but it
makes the difference between working and:

```
/nix/store/gpc2wld1s0c6qzx9326cwn1wcx29xzsj-binutils-2.30/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000401100
```
@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: mruby

Partial log (click to expand)

   OK: 16
   KO: 0
Crash: 0
 Time: 0.37 seconds
installing
post-installation fixup
strip is /nix/store/251fvx4mx9q4zarbca5cciasmn66p668-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/891w8wp4cnkg7kl5zxsf6a0yhwijf9df-mruby-1.4.1/lib  /nix/store/891w8wp4cnkg7kl5zxsf6a0yhwijf9df-mruby-1.4.1/bin
patching script interpreter paths in /nix/store/891w8wp4cnkg7kl5zxsf6a0yhwijf9df-mruby-1.4.1
/nix/store/891w8wp4cnkg7kl5zxsf6a0yhwijf9df-mruby-1.4.1

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: mruby

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/2mkbal8lid2jiq9mkp98c87kk9vdxrav-mruby-1.4.1
shrinking /nix/store/2mkbal8lid2jiq9mkp98c87kk9vdxrav-mruby-1.4.1/bin/mruby-strip
shrinking /nix/store/2mkbal8lid2jiq9mkp98c87kk9vdxrav-mruby-1.4.1/bin/mirb
shrinking /nix/store/2mkbal8lid2jiq9mkp98c87kk9vdxrav-mruby-1.4.1/bin/mruby
shrinking /nix/store/2mkbal8lid2jiq9mkp98c87kk9vdxrav-mruby-1.4.1/bin/mrbc
strip is /nix/store/ah0va6j4cnwj9nx4j6rwcfc8nh785jwm-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/2mkbal8lid2jiq9mkp98c87kk9vdxrav-mruby-1.4.1/lib  /nix/store/2mkbal8lid2jiq9mkp98c87kk9vdxrav-mruby-1.4.1/bin
patching script interpreter paths in /nix/store/2mkbal8lid2jiq9mkp98c87kk9vdxrav-mruby-1.4.1
checking for references to /build in /nix/store/2mkbal8lid2jiq9mkp98c87kk9vdxrav-mruby-1.4.1...
/nix/store/2mkbal8lid2jiq9mkp98c87kk9vdxrav-mruby-1.4.1

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: mruby

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/hni7930a3lm6n0kwwys8s6ixls4jcpiz-mruby-1.4.1
shrinking /nix/store/hni7930a3lm6n0kwwys8s6ixls4jcpiz-mruby-1.4.1/bin/mruby
shrinking /nix/store/hni7930a3lm6n0kwwys8s6ixls4jcpiz-mruby-1.4.1/bin/mirb
shrinking /nix/store/hni7930a3lm6n0kwwys8s6ixls4jcpiz-mruby-1.4.1/bin/mrbc
shrinking /nix/store/hni7930a3lm6n0kwwys8s6ixls4jcpiz-mruby-1.4.1/bin/mruby-strip
strip is /nix/store/gpc2wld1s0c6qzx9326cwn1wcx29xzsj-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/hni7930a3lm6n0kwwys8s6ixls4jcpiz-mruby-1.4.1/lib  /nix/store/hni7930a3lm6n0kwwys8s6ixls4jcpiz-mruby-1.4.1/bin
patching script interpreter paths in /nix/store/hni7930a3lm6n0kwwys8s6ixls4jcpiz-mruby-1.4.1
checking for references to /build in /nix/store/hni7930a3lm6n0kwwys8s6ixls4jcpiz-mruby-1.4.1...
/nix/store/hni7930a3lm6n0kwwys8s6ixls4jcpiz-mruby-1.4.1

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: mruby

Partial log (click to expand)

/nix/store/2mkbal8lid2jiq9mkp98c87kk9vdxrav-mruby-1.4.1

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: mruby

Partial log (click to expand)

   OK: 16
   KO: 0
Crash: 0
 Time: 0.33 seconds
installing
post-installation fixup
strip is /nix/store/251fvx4mx9q4zarbca5cciasmn66p668-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/891w8wp4cnkg7kl5zxsf6a0yhwijf9df-mruby-1.4.1/lib  /nix/store/891w8wp4cnkg7kl5zxsf6a0yhwijf9df-mruby-1.4.1/bin
patching script interpreter paths in /nix/store/891w8wp4cnkg7kl5zxsf6a0yhwijf9df-mruby-1.4.1
/nix/store/891w8wp4cnkg7kl5zxsf6a0yhwijf9df-mruby-1.4.1

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: mruby

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/hni7930a3lm6n0kwwys8s6ixls4jcpiz-mruby-1.4.1
shrinking /nix/store/hni7930a3lm6n0kwwys8s6ixls4jcpiz-mruby-1.4.1/bin/mrbc
shrinking /nix/store/hni7930a3lm6n0kwwys8s6ixls4jcpiz-mruby-1.4.1/bin/mirb
shrinking /nix/store/hni7930a3lm6n0kwwys8s6ixls4jcpiz-mruby-1.4.1/bin/mruby-strip
shrinking /nix/store/hni7930a3lm6n0kwwys8s6ixls4jcpiz-mruby-1.4.1/bin/mruby
strip is /nix/store/gpc2wld1s0c6qzx9326cwn1wcx29xzsj-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/hni7930a3lm6n0kwwys8s6ixls4jcpiz-mruby-1.4.1/lib  /nix/store/hni7930a3lm6n0kwwys8s6ixls4jcpiz-mruby-1.4.1/bin
patching script interpreter paths in /nix/store/hni7930a3lm6n0kwwys8s6ixls4jcpiz-mruby-1.4.1
checking for references to /build in /nix/store/hni7930a3lm6n0kwwys8s6ixls4jcpiz-mruby-1.4.1...

@samueldr samueldr merged commit cfb7ccb into NixOS:master Aug 10, 2018
@nicknovitski nicknovitski deleted the mruby-init branch October 8, 2018 21:59
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

4 participants