Note for MacOS: We automatically compile for MacOS too, however, it seems to only run on the same version it was compiled on (macos-11
). The MacOS executables are not signed and require the user to allow the execution of multiple files.
-
Install Julia
Please install Julia using the binaries from this page https://julialang.org. (Julia 1.9 is recommended, newer versions might error)
-
Install CompileMRI
Start Julia (Type julia in the command line or start the installed Julia executable)
Type the following in the Julia REPL:
julia> ] # Be sure to type the closing bracket via the keyboard # Enters the Julia package manager # optional: activate a local julia project in the current folder (@v1.9) pkg> activate . (compile) pkg> dev https://github.com/korbinian90/CompileMRI.jl # All dependencies are installed automatically (compile) pkg> build CompileMRI
-
Create a command line executable
julia> using CompileMRI julia> compile("/tmp/compiled")
If the folder to output the binary (here
/tmp/compiled
) already exists, the additional keyword argumentforce=true
is required:julia> compile("/tmp/compiled"; force=true)
Since I'm using unregistered packages in dev mode, it is tricky to get updates to packages.
Easiest is to remove the folder user/.julia/dev/CompileMRI
and start over at step 2.
ERROR: SystemError: opening file "/<path>/RomeoApp/<subfolder>/Project.toml"
If the compilation fails because of missing permissions, the RomeoApp
folder needs write permission. In that case, changing the permission with
chmod 777 /<path>/RomeoApp/<subfolder>
and rerunning the command with
julia> compile("/tmp/compiled"; force=true)
should work.