# Makie.jl precompilation: how to launch MakieSys.so?

**URL:** <https://discourse.julialang.org/t/makie-jl-precompilation-how-to-launch-makiesys-so/46116>\
**Category:** VS Code\
**Tags:** plotting\
**Created:** [September 5, 2020, 6:44pm UTC](https://discourse.julialang.org/t/makie-jl-precompilation-how-to-launch-makiesys-so/46116 "2020-09-05T18:44:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [September 5, 2020, 6:44pm UTC](https://discourse.julialang.org/t/makie-jl-precompilation-how-to-launch-makiesys-so/46116/1 "2020-09-05T18:44:45Z")

</div>

Followed [Makie.jl](https://github.com/JuliaPlots/Makie.jl) precompilation instructions and managed to create a system image file: MakieSys.so (275 MB). However, do not know how to launch Julia with recommended `julia -J ./MakieSys.so` command line instruction. Sorry for this basic question and thanks for simple advice.  
PS: I am running VS Code on Windows 10.

---

<div class="post-metadata">

**Author:** ![ericphanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericphanson/32/215186_2.png) [@ericphanson](https://discourse.julialang.org/u/ericphanson)\
**Post date:** [September 5, 2020, 9:18pm UTC](https://discourse.julialang.org/t/makie-jl-precompilation-how-to-launch-makiesys-so/46116/2 "2020-09-05T21:18:44Z")

</div>

I think this is more of a VSCode question than a Makie question, so I changed the category so hopefully it will get spotted easier by those who know the answer.

---

<div class="post-metadata">

**Author:** ![AndiMD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andimd/32/6531_2.png) [@AndiMD](https://discourse.julialang.org/u/AndiMD)\
**Post date:** [September 5, 2020, 9:38pm UTC](https://discourse.julialang.org/t/makie-jl-precompilation-how-to-launch-makiesys-so/46116/3 "2020-09-05T21:38:44Z")

</div>

In VSCode, go to  
File \> Preferences \> Settings. There, Extensions \> Julia \> Additional Args \> Edit in settings.json  
There, insert an argument like

```julia
    "julia.additionalArgs": [
        "-J/absolute/path/to/MakieSys.so"
    ]

```

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [September 5, 2020, 10:09pm UTC](https://discourse.julialang.org/t/makie-jl-precompilation-how-to-launch-makiesys-so/46116/4 "2020-09-05T22:09:22Z")

</div>

Thank you for the very clear instructions. Unfortunately, this failed to launch Julia REPL with error message as follows:  
`The terminal process "C:\Users\jguerra5\AppData\Local\Programs\Julia 1.5.0\bin\julia.exe '-i', '--banner=no', '--project=C:\Users\jguerra5\.julia\environments\v1.5', '-J C:\CODE\Julia\VS_Code_ide\VS_Code_Example\MakieSys.so', 'c:\Users\jguerra5\.vscode\extensions\julialang.language-julia-1.0.6\scripts\terminalserver\terminalserver.jl', '\\.\pipe\vsc-julia-repl-25020', '\\.\pipe\vsc-jl-cr-25020', 'USE_REVISE=true', 'USE_PLOTPANE=true', 'DEBUG_MODE=undefined'" failed to launch (exit code: 1).`

---

<div class="post-metadata">

**Author:** ![AndiMD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andimd/32/6531_2.png) [@AndiMD](https://discourse.julialang.org/u/AndiMD)\
**Post date:** [September 5, 2020, 10:47pm UTC](https://discourse.julialang.org/t/makie-jl-precompilation-how-to-launch-makiesys-so/46116/5 "2020-09-05T22:47:17Z")

</div>

I am not sure what happened there.  
Can you start julia with the system image from the command line?  
`C:\Users\jguerra5\AppData\Local\Programs\Julia 1.5.0\bin\julia.exe -J"C:\CODE\Julia\VS_Code_ide\VS_Code_Example\MakieSys.so"`

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [September 5, 2020, 11:42pm UTC](https://discourse.julialang.org/t/makie-jl-precompilation-how-to-launch-makiesys-so/46116/6 "2020-09-05T23:42:27Z")

</div>

From Windows 10 command prompt, Julia can be launched with the argument `-J"C:\CODE\Julia\VS_Code_ide\VS_Code_Example\MakieSys.so"`.  
However, did not manage to pass this through VS Code “settings.json”. Possibly doing some syntax mistake here. Will try again tomorrow. Thanks again.

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [September 6, 2020, 7:56am UTC](https://discourse.julialang.org/t/makie-jl-precompilation-how-to-launch-makiesys-so/46116/7 "2020-09-06T07:56:56Z")

</div>

Fyi, tried different escape sequences for the windows command/path in json settings but the only thing that worked used [davidanthoff](https://github.com/davidanthoff)’s workaround posted in [vscode\_issues\_1006](https://github.com/julia-vscode/julia-vscode/issues/1006) to pass commands with multiple arguments:

```julia
"julia.additionalArgs": [
        "-J", "C:\\CODE\\Julia\\VS_Code_ide\\VS_Code_Example\\MakieSys.so"
    ]

```

Makie’s plot appeared much faster when running Julia code afterwards.  
It required as per [Makie.jl](https://github.com/JuliaPlots/Makie.jl) instructions to add the following line of code after ‘using Makie’:

```julia
AbstractPlotting. __init__ () # if Makie displays not working after compilation

```

---

<div class="post-metadata">

**Author:** ![TianyiPeng](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tianyipeng/32/20473_2.png) [@TianyiPeng](https://discourse.julialang.org/u/TianyiPeng)\
**Post date:** [December 23, 2020, 6:30am UTC](https://discourse.julialang.org/t/makie-jl-precompilation-how-to-launch-makiesys-so/46116/8 "2020-12-23T06:30:33Z")

</div>

Thank you! This exactly solved my problem! Another way to make it work is “-J=C:\CODE\Julia\VS\_Code\_ide\VS\_Code\_Example\MakieSys.so”. This is essentially related to how to address the space in scripts.
