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

erlangR23: init at 23.0.2 #87738

Merged
merged 1 commit into from Jul 14, 2020
Merged

erlangR23: init at 23.0.2 #87738

merged 1 commit into from Jul 14, 2020

Conversation

@cw789
Copy link
Contributor

@cw789 cw789 commented May 13, 2020

Additionally changed default erlang 22.3 -> 23.0.3.
& reordered the available versions (in preparation to fade out some older ones later).

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@indocomsoft
Copy link

@indocomsoft indocomsoft commented May 24, 2020

Hi, I would be really interested in getting Erlang 23 on Nix. Is there any way I can help to get this merged?

@cw789 cw789 force-pushed the cw789:erlang_update branch from d2c46e7 to 13165a3 May 29, 2020
@cw789 cw789 changed the title erlangR23: init at 23.0 erlangR23: init at 23.0.2 May 29, 2020
@cw789
Copy link
Contributor Author

@cw789 cw789 commented May 29, 2020

So I've updated to Erlang 23.0.2 now.
Additionally I've now running WSL2 with Nix so I can better test my updates.

But sadly nix-build -A erlang already runs since some hours...
Can somebody guide what to do to test pkg updates like this in a fast reliable way?

@tolbrino
Copy link
Contributor

@tolbrino tolbrino commented Jun 3, 2020

So I've updated to Erlang 23.0.2 now.
Additionally I've now running WSL2 with Nix so I can better test my updates.

But sadly nix-build -A erlang already runs since some hours...
Can somebody guide what to do to test pkg updates like this in a fast reliable way?

Nice additon, the build works for me. I've made a PR for your changes to enable parallel builds as well. The single core builds are certainly a reason for the long build times. See cw789#1

@tolbrino
Copy link
Contributor

@tolbrino tolbrino commented Jun 3, 2020

I should mention, I tested using a sandbox environment on NixOS.

@ofborg ofborg bot requested review from gleber and couchemar Jun 3, 2020
@gleber
gleber approved these changes Jun 3, 2020
@couchemar
Copy link
Contributor

@couchemar couchemar commented Jun 3, 2020

Just started nix-shell -p nixpkgs-review --run "nixpkgs-review pr 87738"

Got error:

builder for '/nix/store/x21qvmbhj7sncjlgih854cqqyjh60i69-ejabberd-20.03.drv' failed with exit code 2; last 10 log lines:
  Compiling c_src/ets_cache.c
  /nix/store/0x8pbk0578knfpxf9gbl0lhmpynh2947-binutils-2.31.1/bin/ld: cannot find -lerl_interface
  collect2: error: ld returned 1 exit status
  ERROR: sh(gcc c_src/ets_cache.o $LDFLAGS -shared  -L"/nix/store/98cacpyxklif2zmlk57hs93lvjzg47nn-erlang-23.0.2/lib/erlang/lib/erl_interface-4.0/lib" -lerl_interface -lei -o priv/lib/ets_cache.so)
  failed with return code 1 and the following output:
  /nix/store/0x8pbk0578knfpxf9gbl0lhmpynh2947-binutils-2.31.1/bin/ld: cannot find -lerl_interface
  collect2: error: ld returned 1 exit status

  ERROR: compile failed while processing /build/ejabberd-20.03/deps/cache_tab: rebar_abort
  make: *** [Makefile:112: deps/.built] Error 1
@tolbrino
Copy link
Contributor

@tolbrino tolbrino commented Jun 3, 2020

Just started nix-shell -p nixpkgs-review --run "nixpkgs-review pr 87738"

Got error:

builder for '/nix/store/x21qvmbhj7sncjlgih854cqqyjh60i69-ejabberd-20.03.drv' failed with exit code 2; last 10 log lines:
  Compiling c_src/ets_cache.c
  /nix/store/0x8pbk0578knfpxf9gbl0lhmpynh2947-binutils-2.31.1/bin/ld: cannot find -lerl_interface
  collect2: error: ld returned 1 exit status
  ERROR: sh(gcc c_src/ets_cache.o $LDFLAGS -shared  -L"/nix/store/98cacpyxklif2zmlk57hs93lvjzg47nn-erlang-23.0.2/lib/erlang/lib/erl_interface-4.0/lib" -lerl_interface -lei -o priv/lib/ets_cache.so)
  failed with return code 1 and the following output:
  /nix/store/0x8pbk0578knfpxf9gbl0lhmpynh2947-binutils-2.31.1/bin/ld: cannot find -lerl_interface
  collect2: error: ld returned 1 exit status

  ERROR: compile failed while processing /build/ejabberd-20.03/deps/cache_tab: rebar_abort
  make: *** [Makefile:112: deps/.built] Error 1

This is an issue quite a few Erlang application run into. For ejabberd specifically they are fixed in master, see processone/ejabberd#3282

I don't know what the process was so far, but since ejabberd seems to be using the latest release, I guess it shouldn't be updated until its next release.

@tolbrino
Copy link
Contributor

@tolbrino tolbrino commented Jun 3, 2020

@cw789 A sensible change would be to not make R23 the default. By the time 23.1 rolls around, most apps should have been adapted and problems ironed out.

@tolbrino
Copy link
Contributor

@tolbrino tolbrino commented Jun 10, 2020

@cw789 bump

@cw789 cw789 force-pushed the cw789:erlang_update branch from c45a9e3 to cdede6d Jun 10, 2020
Enable parallel builds for recent Erlang/OTP version R22 and R23

Co-authored-by: Tino Breddin <t@tolbrino.com>
@cw789 cw789 force-pushed the cw789:erlang_update branch from cdede6d to 0a5a19f Jun 10, 2020
@cw789
Copy link
Contributor Author

@cw789 cw789 commented Jun 10, 2020

Sorry guys to let you wait.
Done now. @couchemar

@ofborg ofborg bot requested a review from gleber Jun 10, 2020
@tolbrino
Copy link
Contributor

@tolbrino tolbrino commented Jun 12, 2020

LGTM, erlangR23 builds fine and projects depending on erlang as well, tested on NixOS.

@michalmuskala
Copy link

@michalmuskala michalmuskala commented Jun 13, 2020

Does this also build the new docs chunks to enable documentation support in the shell and elrang_ls?

@tolbrino
Copy link
Contributor

@tolbrino tolbrino commented Jun 15, 2020

Does this also build the new docs chunks to enable documentation support in the shell and elrang_ls?

Yes, works like a charm.

1> h(erlang, now, 0). 

  -spec now() -> Timestamp when Timestamp :: timestamp().

Deprecated:
  erlang:now/0 is deprecated; see the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information

  Types:
    -type timestamp() ::
          {MegaSecs :: non_neg_integer(),
           Secs :: non_neg_integer(),
           MicroSecs :: non_neg_integer()}.

  Warning:
    This function is deprecated. Do not use it.

    For more information, see section Time and Time Correction in the User's Guide. Specifically, section Dos and Dont's describes what to use instead of erlang:now/0.

  Returns the tuple {MegaSecs, Secs, MicroSecs}, which is the elapsed time since 00:00 GMT, January 1, 1970 (zero hour), if provided by the underlying OS. Otherwise some other point in time is chosen. It is also guaranteed that the following calls to this BIF return continuously increasing values. Hence, the return value from erlang:now/0 can be used to generate
  unique time stamps. If it is called in a tight loop on a fast machine, the time of the node can become skewed.

  Can only be used to check the local time of day if the time-zone information of the underlying OS is properly configured.
ok
@tolbrino
Copy link
Contributor

@tolbrino tolbrino commented Jun 17, 2020

@gleber Is this PR in a merge-able state?

@cw789
Copy link
Contributor Author

@cw789 cw789 commented Jun 19, 2020

Hey all, I've once again engaged myself testing this pkg update (nix-build -A erlangR23).
It still took several hours. And sadly fails in my case with the following:

.
.
.
PASS: test-token 5 /token/slot
FAIL: test-token 6 /token/not-writable
# test-token: assertion failed (!p11_token_is_writable (token))
# test-token: in test_not_writable() at test-token.c:244
PASS: test-token 7 /token/writable-no-exist
.
.
.
============================================================================
Testsuite summary for p11-kit 0.23.20
============================================================================
# TOTAL: 760
# PASS:  759
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
.
.
.
make: *** [Makefile:5597: check] Error 2
builder for '/nix/store/803rqd0q2jg7lz849m4bac8rvdbjy8px-p11-kit-0.23.20.drv' failed with exit code 2
cannot build derivation '/nix/store/7cwdbcaa3yrzq67rywbbxrhmwdbiypa8-gnutls-3.6.14.drv': 1 dependencies couldn't be built
building '/nix/store/z1wcl91b3kq25pxbjpi11vcdj1p7iwsk-pciutils-3.6.4.drv'...
cannot build derivation '/nix/store/068w0wak5i116j318qqqbnw4yykjq71g-cups-2.3.3.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/33k1rl87nyv6nkfw7r1izkgni44zlwk9-libmicrohttpd-0.9.70.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/vkamia2j9bz7krfvbkhgynzskrw0vnph-gtk+-2.24.32.drv': 1 dependencies couldn't be built
building '/nix/store/79iza9ciamvd95fx21x0yjgxv9ym9xdf-rhash-1.3.9.drv'...
cannot build derivation '/nix/store/lajlbs76h1ay0gbx20g0xybbbndkbmr7-systemd-245.5.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/savm10xhvgbkj0f4mdinpzm218wb6cgq-erlang-23.0.2.drv': 1 dependencies couldn't be built
error: build of '/nix/store/savm10xhvgbkj0f4mdinpzm218wb6cgq-erlang-23.0.2.drv' failed

I think I'm doing something wrong in my pkgs maintaining setup.
It shouldn't take that long to build Erlang anyway, should it?

@cw789
Copy link
Contributor Author

@cw789 cw789 commented Jun 23, 2020

  • Tested via nix-shell -p nixpkgs-review --run "nixpkgs-review pr 87738"
@kristoff3r
Copy link
Contributor

@kristoff3r kristoff3r commented Jul 8, 2020

I have briefly tested it as well, it would be great to get it merged.

@gleber
Copy link
Contributor

@gleber gleber commented Jul 9, 2020

Everything builds with nix-shell -p nixpkgs-review --run "nixpkgs-review pr 87738" for me and binaries produced by it run.

@gleber
gleber approved these changes Jul 9, 2020
@kristoff3r
Copy link
Contributor

@kristoff3r kristoff3r commented Jul 14, 2020

Bump, someone should probably merge this

@nixos-discourse
Copy link

@nixos-discourse nixos-discourse commented Jul 14, 2020

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/184

@madjar madjar merged commit 249a368 into NixOS:master Jul 14, 2020
16 checks passed
16 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
erlangR23, erlangR23.passthru.tests on aarch64-linux Success
Details
erlangR23, erlangR23.passthru.tests on x86_64-linux Success
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="0a5a19f"; rev="0a5a19f464e74f416e9bd4f79ecd48a5f6acfc04"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="0a5a19f"; rev="0a5a19f464e74f416e9bd4f79ecd48a5f6acfc04"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="0a5a19f"; rev="0a5a19f464e74f416e9bd4f79ecd48a5f6acfc04"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="0a5a19f"; rev="0a5a19f464e74f416e9bd4f79ecd48a5f6acfc04"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="0a5a19f"; rev="0a5a19f464e74f416e9bd4f79ecd48a5f6acfc04"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="0a5a19f"; rev="0a5a19f464e74f416e9bd4f79ecd48a5f6acfc04"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="0a5a19f"; rev="0a5a19f464e74f416e9bd4f79ecd48a5f6acfc04"; } ./pkgs/t
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@cw789 cw789 deleted the cw789:erlang_update branch Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

10 participants
You can’t perform that action at this time.