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

dart: Fix dart2native by patching all ELFs #98174

Merged
merged 1 commit into from Nov 8, 2020
Merged

dart: Fix dart2native by patching all ELFs #98174

merged 1 commit into from Nov 8, 2020

Conversation

thiagokokada
Copy link
Contributor

@thiagokokada thiagokokada commented Sep 17, 2020

Motivation for this change

dart2native (and probably other binaries) from dart were not working. For example:

Before:

$ /nix/store/ihlzjcxahcack6chfzphb74bkccmq6br-dart-2.7.2/bin/dart2native hello.dart
Failed to generate native files:
ProcessException: No such file or directory
  Command: /nix/store/ihlzjcxahcack6chfzphb74bkccmq6br-dart-2.7.2/bin/utils/gen_snapshot --snapshot-kind=app-aot-elf --elf=/tmp/HSHJQU/snapshot.aot /tmp/HSHJQU/kernel.dill

After:

$ /nix/store/czw7kpdmcqa76a9j00v2pjygrq7gy4c7-dart-2.7.2/bin/dart2native hello.dart
Generated: /home/thiagoko/hello.exe

$ ./hello.exe
Hello, World!
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.

Before:

   $ /nix/store/ihlzjcxahcack6chfzphb74bkccmq6br-dart-2.7.2/bin/dart2native hello.dart
   Failed to generate native files:
   ProcessException: No such file or directory
     Command: /nix/store/ihlzjcxahcack6chfzphb74bkccmq6br-dart-2.7.2/bin/utils/gen_snapshot --snapshot-kind=app-aot-elf --elf=/tmp/HSHJQU/snapshot.aot /tmp/HSHJQU/kernel.dill

After:
   $ /nix/store/czw7kpdmcqa76a9j00v2pjygrq7gy4c7-dart-2.7.2/bin/dart2native hello.dart
   Generated: /home/thiagoko/hello.exe

   $ ./hello.exe
   Hello, World!
@thiagokokada
Copy link
Contributor Author

@GRBurst.

@thiagokokada
Copy link
Contributor Author

thiagokokada commented Sep 18, 2020

Maybe @worldofpeace or @ericdallo can help here too?

@thiagokokada
Copy link
Contributor Author

Pinging @GRBurst and @worldofpeace again (sorry for bothering).

@thiagokokada
Copy link
Contributor Author

@marsam ?

@thiagokokada
Copy link
Contributor Author

/marvin opt-in
/status needs_reviewer

@marvin-mk2 marvin-mk2 bot added the marvin label Nov 7, 2020
@marvin-mk2
Copy link

marvin-mk2 bot commented Nov 7, 2020

Hi! I'm an experimental bot. My goal is to guide this PR through its stages, hopefully ending with a merge. You can read up on the usage here.

@marsam marsam merged commit c2715f4 into NixOS:master Nov 8, 2020
@thiagokokada thiagokokada deleted the fix-dart2native branch January 4, 2021 01:23
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

3 participants