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

nim: 0.17.2 -> 0.18.0 #40556

Merged
merged 7 commits into from May 20, 2018
Merged

nim: 0.17.2 -> 0.18.0 #40556

merged 7 commits into from May 20, 2018

Conversation

euantorano
Copy link
Contributor

@euantorano euantorano commented May 15, 2018

Motivation for this change

Update the version of Nim to the current release, 0.18.0.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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/)
  • Fits CONTRIBUTING.md.

I haven't had time to test this at all as I'm new to Nix, but this is a releatively minor change that should hopefully just work.

@Mic92
Copy link
Member

Mic92 commented May 15, 2018

@GrahamcOfBorg build nim

@Mic92 Mic92 changed the title Nim 0.17.2 -> 0.18.0 nim: 0.17.2 -> 0.18.0 May 15, 2018
@Mic92
Copy link
Member

Mic92 commented May 15, 2018

One test at least fails for me. Should be easy to patch by replacing /bin/sleep in the file:

FAIL: tioselectors.nim C
Test "tests/async/tioselectors.nim" in category "async"
Failure: reExitcodesDiffer
Expected:
exitcode: 0
Gotten:
exitcode: 1
Output:
tioselectors.nim(466)    tioselectors
tioselectors.nim(164)    process_notification_test
osproc.nim(830)          startProcess
osproc.nim(942)          startProcessAuxFork
oserr.nim(110)           raiseOSError
Error: unhandled exception: Operation now in progress
Additional info: Could not find command: '/bin/sleep'. OS error: No such file or directory [OSError]

@euantorano
Copy link
Contributor Author

How might I go about doing that @Mic92? This is my first foray into Nix, so any pointers would be appreciated.

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: nim

Partial log (click to expand)

PASS: uri.nim C                                                    (2.95917988 secs)
PASS: volatile.nim C                                               (2.73844409 secs)
PASS: xmldom.nim C                                                 (3.06017900 secs)
PASS: xmldomparser.nim C                                           (3.60376310 secs)
PASS: xmlparser.nim C                                              (3.57112694 secs)
PASS: xmltree.nim C                                                (3.28476787 secs)
/build/nim-0.18.0/tests/testament/tester html
tests failed
builder for '/nix/store/1dax1vkmypyxwd8cshgim67nh1sjqmi9-nim-0.18.0.drv' failed with exit code 1
error: build of '/nix/store/1dax1vkmypyxwd8cshgim67nh1sjqmi9-nim-0.18.0.drv' failed

@euantorano
Copy link
Contributor Author

It looks like most of the failures are related to missing binaries:

  • /usr/bin/env
  • /bin/sleep

There's also an interesting one relating to boehm GC:

could not load: libgc.so.1
compile with -d:nimDebugDlOpen for more information

I'm going to mention this in the Nim IRC channel and see if anybody has any ideas about the above and some of the other issues (such as cannot open 'jester').

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: nim

Partial log (click to expand)

�[0m�[32mPASS: �[36mcyclecollector C -d:release -d:useRealtimeGC                �[34m (3.80109406 secs)
�[0m�[32mPASS: �[36mcyclecollector C --gc:markAndSweep                          �[34m (12.70519304 secs)
�[0m�[32mPASS: �[36mcyclecollector C -d:release --gc:markAndSweep               �[34m (3.17882490 secs)
�[0m�[32mPASS: �[36mcyclecollector C --gc:boehm                                 �[34m (9.18015599 secs)
�[0m�[32mPASS: �[36mcyclecollector C -d:release --gc:boehm                      �[34m (1.86113405 secs)
�[0mFAILURE! total: 105 passed: 87 skipped: 0
/build/nim-0.18.0/tests/testament/tester html
tests failed
builder for '/nix/store/z06gxc7y7jrr9z7493dw1xhy8pm85bx7-nim-0.18.0.drv' failed with exit code 1
�[31;1merror:�[0m build of '/nix/store/z06gxc7y7jrr9z7493dw1xhy8pm85bx7-nim-0.18.0.drv' failed

@euantorano
Copy link
Contributor Author

Looks like I also need to add boehm-gc as a dependency. I'll push a patch tomorrow after testing this locally and see how may of these issues I can solve.

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: nim

Partial log (click to expand)

PASS: unicode.nim C                                                (2.81278396 secs)
PASS: unittest.nim C                                               (3.72890306 secs)
PASS: uri.nim C                                                    (2.71527100 secs)
PASS: volatile.nim C                                               (2.51350784 secs)
PASS: xmldom.nim C                                                 (2.75856400 secs)
PASS: xmldomparser.nim C                                           (3.58045912 secs)
PASS: xmlparser.nim C                                              (3.54025602 secs)
PASS: xmltree.nim C                                                (3.08069110 secs)
building of '/nix/store/hi55zssabj9lb140gxjfq16ddbv9whyi-nim-0.18.0.drv' timed out after 1800 seconds
error: build of '/nix/store/hi55zssabj9lb140gxjfq16ddbv9whyi-nim-0.18.0.drv' failed

@Mic92
Copy link
Member

Mic92 commented May 15, 2018

@euantorano you can use substituteInPlace in postPatch to replace the path in those tests with a binary without /bin it: https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/text/a2ps/default.nix#L26

@pacien
Copy link
Contributor

pacien commented May 19, 2018

Required build and test dependencies are listed in nim's Travis CI configuration file here.

It seems that some nimble packages need to be installed (at least temporarily in the test environment) to properly run the tests.

@euantorano
Copy link
Contributor Author

@pacien Yep, I've been trying that. Been hitting permission denied errors when running nimble install inside the script, probably because it's trying to write to somewhere like $HOME/.nimble. I also can't find libgc which is required for the boehm GC tests.

Solved GC and SFML-related test failures.
Attempting to download nimble packages.
@pacien
Copy link
Contributor

pacien commented May 19, 2018

Here is a pull request for this pull request.
I made some progress, successfully adding Boehm GC and SFML.
Nimble however seems to fail downloading packages from the build sandbox.

@euantorano
Copy link
Contributor Author

Thanks to @pacien, this should now pass tests hopefully.

@Mic92
Copy link
Member

Mic92 commented May 20, 2018

@GrahamcOfBorg build nim

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: nim

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@Mic92
Copy link
Member

Mic92 commented May 20, 2018

If access to $HOME is denied a workaround is to set export HOME=$TMPDIR. However network access for the package manager is not allowed anyway, so disabling those tests is probably the better choice.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: nim

Partial log (click to expand)

shrinking /nix/store/vdcvhy1r527z07l0psnhal0gimffyic7-nim-0.18.0/bin/nimble
shrinking /nix/store/vdcvhy1r527z07l0psnhal0gimffyic7-nim-0.18.0/bin/.nim-wrapped
shrinking /nix/store/vdcvhy1r527z07l0psnhal0gimffyic7-nim-0.18.0/bin/nimgrep
shrinking /nix/store/vdcvhy1r527z07l0psnhal0gimffyic7-nim-0.18.0/bin/koch
shrinking /nix/store/vdcvhy1r527z07l0psnhal0gimffyic7-nim-0.18.0/lib/libnimrtl.so
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/vdcvhy1r527z07l0psnhal0gimffyic7-nim-0.18.0/lib  /nix/store/vdcvhy1r527z07l0psnhal0gimffyic7-nim-0.18.0/bin
patching script interpreter paths in /nix/store/vdcvhy1r527z07l0psnhal0gimffyic7-nim-0.18.0
checking for references to /build in /nix/store/vdcvhy1r527z07l0psnhal0gimffyic7-nim-0.18.0...
/nix/store/vdcvhy1r527z07l0psnhal0gimffyic7-nim-0.18.0

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: nim

Partial log (click to expand)

�[0m�[32mPASS: �[36mcyclecollector C -d:release                                 �[34m (3.79508805 secs)
�[0m�[32mPASS: �[36mcyclecollector C -d:release -d:useRealtimeGC                �[34m (3.84099603 secs)
�[0m�[32mPASS: �[36mcyclecollector C --gc:markAndSweep                          �[34m (12.75900006 secs)
�[0m�[32mPASS: �[36mcyclecollector C -d:release --gc:markAndSweep               �[34m (3.21298003 secs)
�[0m�[32mPASS: �[36mcyclecollector C --gc:boehm                                 �[34m (9.23970795 secs)
�[0m�[32mPASS: �[36mcyclecollector C -d:release --gc:boehm                      �[34m (1.90424895 secs)
�[0m/build/nim-0.18.0/tests/testament/tester html
tests failed
builder for '/nix/store/36p77vifvd0pnlgyly94ff1qh9piknq0-nim-0.18.0.drv' failed with exit code 1
�[31;1merror:�[0m build of '/nix/store/36p77vifvd0pnlgyly94ff1qh9piknq0-nim-0.18.0.drv' failed

@pacien
Copy link
Contributor

pacien commented May 20, 2018

Failure is at lib/pure/stats.nim#L361. Floats should not be compared that way since their precision may vary on different architectures (Nim/issues#6747).

@euantorano Maybe should we disable this test?

FAIL: stats.nim C
Test "lib/pure/stats.nim" in category "lib"
Failure: reExitcodesDiffer
Expected:
exitcode: 0
Gotten:
exitcode: 1
Output:
stats.nim(361)           stats
system.nim(3771)         raiseAssert
system.nim(2833)         sysFatal
Error: unhandled exception: intercept(rr) == -0.03424657534246611  [AssertionError]

@euantorano
Copy link
Contributor Author

euantorano commented May 20, 2018 via email

@Mic92 Mic92 merged commit 95b1827 into NixOS:master May 20, 2018
@Mic92
Copy link
Member

Mic92 commented May 20, 2018

It does not really make the build fail so we can keep it. I think this test should be rather fixed upstream.

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

5 participants