I used a FreeBSD 11 VM runing on GCE
- compile with dart2native, eg I used DSG from a zip of exe's built here: https://github.com/maks/dsg/actions/runs/198892581
sudo brandelf -t linux exe-filename
- edit
/etc/rc.conf
and add:linux_enable="YES"
- then:
sudo service abi restart
- cd
/usr/ports/emulators/linux_base-c7
thenmake install
- go back to where you have your dart2native linux exe and run it
For some reason the dart2native exe runs the Dart VM but doesn't run the aot snapshot thats embedded in it. eg. I see:
$ ./dsg
Usage: dart [<vm-flags>] <dart-script-file> [<script-arguments>]
Executes the Dart script <dart-script-file> with the given list of <script-arguments>.
Common VM flags:
--enable-asserts
...
I'm not sure why that's happening but I ran out of time to investigate further, but it does seem to demonstrate to me that the Linux DartVM thats generated for dart2nativeseems to be able to run on FreeBSD 11 with its Linux x64 compat layer.
two questions:
dart2native
generates a native Linux binary? Does it run?./dsg
output seem to be a mere parameter problem (no script added)