You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module MyPackage
export julia_main
using Pkg
function julia_main()::Cint
Pkg.status()
return 0
end
end # module MyPackage
Make an app:
pkg> activate --temp
julia> using PackageCompiler
julia> create_app("MyPackage", "Compiled", incremental=true)
The app compiles successfully, but running it returns an error due to p7zip_jll being missing. This occurs even if I insert the standard libraries into the Project file with Pkg.add([x[1] for x in values(Pkg.Types.stdlibs())]). The issue exists on Linux, MacOS, and Windows.
Workaround
If I manually install 7Zip, the error message becomes clearer:
IOError: readdir("/home/aharri69/temp/Compiled/share/julia/stdlib/v1.8"): no such file or directory (ENOENT)
Then, if I copy share/julia/stdlib/v1.8/ from my local Julia install, the executable works as expected.
Question
Should the artifacts for standard libraries be copied by default, since they are required for the executable to run?
Note
My goal is to assemble a standalone Julia installation that can be copied onto a secure server with no internet access. @DilumAluthge recommended trying create_sysimage() or create_app() for this, even though this is a tangential use case. Essentially, I'd like to make an app but delete the executable, leaving behind a Julia installation without external dependencies.
Update
I ended up using create_sysimage to generate the sysimage, bundling this with the artifacts directory and Julia files, and setting the environment manually. An example workflow can be found here.
The text was updated successfully, but these errors were encountered:
I'm unable to create a functioning app that uses
Pkg
.Recreating the error
Pkg
as a dependency:MyPackage/src/MyPackage.jl
:The app compiles successfully, but running it returns an error due to
p7zip_jll
being missing. This occurs even if I insert the standard libraries into the Project file withPkg.add([x[1] for x in values(Pkg.Types.stdlibs())])
. The issue exists on Linux, MacOS, and Windows.Workaround
If I manually install 7Zip, the error message becomes clearer:
Then, if I copy
share/julia/stdlib/v1.8/
from my local Julia install, the executable works as expected.Question
Should the artifacts for standard libraries be copied by default, since they are required for the executable to run?
Note
My goal is to assemble a standalone Julia installation that can be copied onto a secure server with no internet access. @DilumAluthge recommended trying
create_sysimage()
orcreate_app()
for this, even though this is a tangential use case. Essentially, I'd like to make an app but delete the executable, leaving behind a Julia installation without external dependencies.Update
I ended up using
create_sysimage
to generate the sysimage, bundling this with the artifacts directory and Julia files, and setting the environment manually. An example workflow can be found here.The text was updated successfully, but these errors were encountered: