Closed Fl4m3Ph03n1x closed 9 months ago
Please try running the exe by:
cd
start
etc.I want to see the full output of the command to see if we can figure out what's crashing.
I can confirm burrito works fine on windows with OTP 26/Elixir 1.15 on a non-phoenix app FWIW
I'll leave this issue open for another week or so, but unless I can see the console output it's hard to me to diagnose this issue, I can't seem to reproduce it on my end.
Closing due to inactivity, feel free to re-open if you're still not able to get this to work, and have some of the console output for the application on startup
I'd like to reopen. I'm seeing a similar situation, not being able to start up on Windows. I'm compiling on Windows (so no cross-compilation at all). I've tried with Elixir 1.15.7 and 1.16.1. Both with OTP 26.2.2.
I'm trying out without any dependencies (only burrito v1.0.4). Just printing out a message, so dependencies cannot be the problem here.
The output is quite short, it's just printing that FileNotFound message:
C:\Users\user\example_cli_app\burrito_out>example_cli_app_windows.exe
error: FileNotFound
cd'ing into the burrito_out folder or not makes no difference. If I can give any more details, I'd gladly do so.
I just gave the debug option a try, and this yields some more context:
C:\Users\user\win_test\burrito_out>example_cli_app_windows.exe
debug: Size of embedded payload is: 16665344
debug: Install Directory: C:\Users\user\AppData\Local\.burrito\example_cli_app_erts-14.2.2_0.1.0
debug: Metadata path: C:\Users\user\AppData\Local\.burrito\example_cli_app_erts-14.2.2_0.1.0\_metadata.json
debug: Passing args string: { }
debug: Unpacked File: C:\Users\user\AppData\Local\.burrito\example_cli_app_erts-14.2.2_0.1.0\bin\example_cli_app
debug: Unpacked File: C:\Users\user\AppData\Local\.burrito\example_cli_app_erts-14.2.2_0.1.0\bin\example_cli_app.bat
debug: Unpacked File: C:\Users\user\AppData\Local\.burrito\example_cli_app_erts-14.2.2_0.1.0\erts-14.2.2\bin\beam.debug.smp.dll
error: FileNotFound
C:\Users\user\scoop\apps\zig\current\lib\std\os\windows.zig:133:39: 0x7ff63ab33a18 in OpenFile (example_cli_app.exe.obj)
.OBJECT_PATH_NOT_FOUND => return error.FileNotFound,
^
C:\Users\user\scoop\apps\zig\current\lib\std\fs.zig:1403:23: 0x7ff63ab37215 in createFileW (example_cli_app.exe.obj)
.handle = try os.windows.OpenFile(sub_path_w, .{
^
C:\Users\user\scoop\apps\zig\current\lib\std\fs.zig:1286:13: 0x7ff63ab20079 in createFile (example_cli_app.exe.obj)
return self.createFileW(path_w.span(), flags);
^
C:\Users\user\scoop\apps\zig\current\lib\std\fs.zig:2806:5: 0x7ff63aadbe95 in createFileAbsolute (example_cli_app.exe.obj)
return cwd().createFile(absolute_path, flags);
^
C:\Users\user\win_test\deps\burrito\src\archiver.zig:207:26: 0x7ff63aadb8ff in unpack_files (example_cli_app.exe.obj)
const file = try fs.createFileAbsolute(full_file_path, .{ .truncate = true });
^
C:\Users\user\win_test\deps\burrito\src\wrapper.zig:150:5: 0x7ff63aadc17e in do_payload_install (example_cli_app.exe.obj)
try foilz.unpack_files(FOILZ_PAYLOAD, install_dir, build_options.UNCOMPRESSED_SIZE);
^
C:\Users\user\win_test\deps\burrito\src\wrapper.zig:124:9: 0x7ff63aacf724 in main (example_cli_app.exe.obj)
try do_payload_install(install_dir, metadata_path);
^
@linusdm Thanks for the report!
Unfortunately we do not support building on Windows as a host machine directly right now (see the readme for the supported host systems). I recommend you use the "Windows Subsystem for Linux" to setup a Linux environment on your Windows machine to build your app in for now.
It may seem a bit backwards but Windows build support is extra tricky due to how differently file paths are handled on Windows and the many odd quirks of its kernel. I'm not sure when I can find some time to set up a Windows dev machine, but it is on the list and any contributions in helping to debug support of Windows-host builds is appreciated.
Omg, I totally read that in the readme, but managed to screw that up anyway 🙈 I'm surprised it got so far. At least the mystery is solved now :)
I was trying to build on Windows, to include Torchx (and other Nx related libs) in a burrito build for Windows. I'll have to scratch my head some more about how (and if) to make that happen.
Thx for clearing that up for me!
Host
Tell us about your Host OS (the machine you're building burrito apps on)
Dependencies:
Please run
elixir -v
in your Burrito project directory and write the version here:runtime.ex
mix.exs
Running command with:
The application launches and closes immediately. This is all the output I could recover.
I wonder if I am either missing a dependency, or running the command improperly.