Juliac on Windows

I’m trying to use juliac with --trim on Windows 11. Copying the code for reference:

module HelloWorld

Base.@ccallable function main()::Cint
    println(Core.stdout, "Hello world")
    return 0
end

end

Powershell input:

julia juliac.jl --output-exe hello --trim --experimental hello.jl

It compiles down to an .exe, 12.7 MB. ./hello.exe gives no output. When I double click instead, it gives two errors, saying that libjulia-internal.dll and libjulia.dll could not be found. I think that’s a path issue?

So I place the .exe in \bin where those two .dlls reside. Double clicking opens a window which immediately closes. Running ./hello.exe, I get the following message:

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks. Exception: EXCEPTION_ACCESS_VIOLATION at 0x7ff959ffcd21 -- Hello world

By comparison, compiling without --trim --experimental gives a program about 270 MB in size, but it runs correctly. As an aside, maybe it’s a Windows thing, but the binary sizes are larger in size than what I’ve seen in the wild.

2 Likes

Can you report a bug on GitHub · Where software is built?