I am trying to use juliac to turn some code into an executable. The following minimal example works:
module HelloWorld
Base.@ccallable function main()::Cint
println(Core.stdout, "Hello, World!")
return 0
end
end # End of module HelloWorld
julia +nightly ~/.julia/juliaup/julia-nightly/share/julia/juliac.jl --output-exe test_juliac --experimental --trim test_juliac.jl
But if test_juliac.jl uses any package, such as the following, I get “Package not found in current path”, even though I can then go into the REPL and use the package easily. Any ideas where this is happening and how to fix it?
module HelloWorld
using Plots
Base.@ccallable function main()::Cint
println(Core.stdout, "Hello, World!")
return 0
end
end # End of module HelloWorld
This functionality is not yet released, and there are likely many rough corners and issues left to iron out before it provides a smooth experience.
To get my demos to work, I had to remove some package dependencies to avoid loading them. I also inserted frequent debug printouts throughout the entire module and main function to pinpoint where segmentation faults appear. One of my demos also require patches not yet on Julia master, so once again, do not expect a smooth experience quite yet