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

wasmtime: 0.21.0 -> 0.35.2 #166965

Merged
merged 3 commits into from
Apr 3, 2022
Merged

Conversation

ereslibre
Copy link
Member

@ereslibre ereslibre commented Apr 2, 2022

Description of changes

Supersedes #109571

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.05 Release Notes (or backporting 21.11 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.

@ereslibre ereslibre changed the title Bump wasmtime 0 35 2 Bump wasmtime to 0.35.2 Apr 2, 2022
@ereslibre
Copy link
Member Author

/cc @happysalada

@ereslibre ereslibre force-pushed the bump-wasmtime-0-35-2 branch from 5334665 to a1c8fd9 Compare April 2, 2022 20:22
@ereslibre ereslibre changed the title Bump wasmtime to 0.35.2 wasmtime: 0.21.0 -> 0.35.2 Apr 2, 2022
@ofborg ofborg bot requested a review from matthewbauer April 2, 2022 20:54
@ereslibre ereslibre force-pushed the bump-wasmtime-0-35-2 branch from a1c8fd9 to 23fcf77 Compare April 2, 2022 21:02
@happysalada
Copy link
Contributor

happysalada commented Apr 2, 2022

Just tested and this won't build for darwin. (The ci shows the failure if you are interested, but I'm afraid those are quite cryptic)

FAILED: obj/libv8_libbase.a
rm -f obj/libv8_libbase.a && "../../../../../../nix/store/cvz17hkb0wpbsyx58l4zcaamqs2bhlmz-clang-wrapper-11.1.0/bin/llvm-ar"  -r -c -s -D obj/libv8_libbase.a "@obj/libv8_libbase.a.rsp"
/bin/sh: ../../../../../../nix/store/cvz17hkb0wpbsyx58l4zcaamqs2bhlmz-clang-wrapper-11.1.0/bin/llvm-ar: No such file or directory

Could you change the platform to only linux ?

Also the ci fails on linux with the following

failures:
    commands::compile::test::test_successful_compile
    commands::compile::test::test_x64_flags_compile
    commands::compile::test::test_x64_presets_compile

test result: FAILED. 16 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s

Could you mark those tests to be skipped ?
something like

  checkFlags = [
    # tries to make a network access
    "--skip=sinks::loki::tests::healthcheck_grafana_cloud"
  ];

(I just copied and pasted the relevant part from another test to give you an example in case you hadn't seen it. (more can be found in pkgs/tools/misc/vector/default.nix

oh and last but not least, thanks a lot for the PR!

@ofborg ofborg bot added 8.has: clean-up 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin and removed 10.rebuild-darwin: 1 10.rebuild-darwin: 1-10 labels Apr 3, 2022
@ereslibre ereslibre force-pushed the bump-wasmtime-0-35-2 branch from 3b2f2da to 4ba2133 Compare April 3, 2022 10:03
@ereslibre
Copy link
Member Author

ereslibre commented Apr 3, 2022

Could you change the platform to only linux ?

Done, although I will check what's wrong, I'd like to have the derivation for Mac OS as well. I would not block this PR because of that though.

Could you mark those tests to be skipped ?

Done, and I have done the same with the patch that I had removing a test, and removed the patch that was removing the test itself. Thanks for the pointers! 🙌

Also the ci fails on linux with the following

I cannot reproduce this and I wonder why. Do you know how can I reproduce this locally, or get more information from the CI run? I would like to go further into this.

oh and last but not least, thanks a lot for the PR!

:)

@ofborg ofborg bot added 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-darwin: 1 10.rebuild-darwin: 1-10 labels Apr 3, 2022
@ereslibre ereslibre force-pushed the bump-wasmtime-0-35-2 branch from aa34c11 to a776bea Compare April 3, 2022 10:36
Provide a specific path for the v8 project, so `wasmtime` dependency
`rusty_v8` can find it and does not need to download the static
library, what would break build hermetism.
@ereslibre ereslibre force-pushed the bump-wasmtime-0-35-2 branch from a776bea to 78fb28c Compare April 3, 2022 11:07
@happysalada
Copy link
Contributor

Ci passes, thank you!

I think the ci is running in strict eval or something. I have to say, I forgot the exact difference.

If you ever get to the darwin issue, feel free to ping me, happy to test.

Thanks again!

@happysalada happysalada merged commit 1865515 into NixOS:master Apr 3, 2022
@happysalada
Copy link
Contributor

oh small detail regarding the first commit. It should probably be wasmtime: fix build
Some people like to have the commit message start by the package name to make it easier to search through commits.
Just something for next time.

@ereslibre ereslibre deleted the bump-wasmtime-0-35-2 branch April 3, 2022 12:31
@ereslibre ereslibre mentioned this pull request Apr 3, 2022
10 tasks
@nomeata
Copy link
Contributor

nomeata commented Apr 3, 2022

Oh, did we just lose wasmtime on Darwin? That's be very unfortunate. I hope it's only temporary. (Pinging @ggreif)

@ereslibre
Copy link
Member Author

Oh, did we just lose wasmtime on Darwin?

I want to check why it's failing and my plan is to restore it as soon as possible. It was also nice to have a more recent version of wasmtime.

@nomeata
Copy link
Contributor

nomeata commented Apr 3, 2022

Ok, thanks :-)

@ereslibre
Copy link
Member Author

ereslibre commented Apr 3, 2022

@nomeata I will keep looking into it. v8 was being problematic so the first approach I wanted was to disable checks only on darwin. Now, I'm getting a linker error. I will open a PR when I have something that works :)

WIP: master...ereslibre:wasmtime-build-darwin

The error, in case is meaningful:

error: could not compile `wasmtime-cli` due to previous error
error: builder for '/nix/store/rjx90jsczzn5v4y74qd79v4yivgl8255-wasmtime-0.35.2.drv' failed with exit code 101;
       last 10 log lines:
       >   = note: Undefined symbols for architecture x86_64:
       >             "_futimens", referenced from:
       >                 rustix::imp::fs::syscalls::futimens::h8cff26252e668e9b in librustix-960c26ac3e1fab35.rlib(rustix-960c26ac3e1fab35.rustix.00f71eac-cgu.4.rcgu.o)
       >             "_utimensat", referenced from:
       >                 rustix::imp::fs::syscalls::utimensat::h92f324ed16adf14b in librustix-960c26ac3e1fab35.rlib(rustix-960c26ac3e1fab35.rustix.00f71eac-cgu.4.rcgu.o)
       >           ld: symbol(s) not found for architecture x86_64
       >           clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
       >
       >
       > error: could not compile `wasmtime-cli` due to previous error
       For full logs, run 'nix log /nix/store/rjx90jsczzn5v4y74qd79v4yivgl8255-wasmtime-0.35.2.drv'.

@sunfishcode
Copy link

@ereslibre bytecodealliance/wasmtime#4022 is a PR which addresses those linker errors.

@ereslibre
Copy link
Member Author

ereslibre commented Apr 15, 2022

Thank you @sunfishcode!

I just did a smoke test (master...ereslibre:wasmtime-build-darwin) and it builds and runs correctly.

I will submit a new PR to nixpkgs as soon a new wasmtime version is tagged.

cc/ @nomeata

@ereslibre
Copy link
Member Author

wasmtime 0.36.0 was released. I opened #169544.

It builds and links in darwin under aarch64, but fails to link under x86_64 (when running with rosetta).

We can follow up over there.

@ereslibre
Copy link
Member Author

ereslibre commented May 21, 2022

@nomeata #173870 is up and brings wasmtime to darwin back again :)

/cc @terlar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants