<p dir="auto">Julia 0.5 will ship with a versioned <code class="notranslate">libjulia.so.0.5</code> that is installed system-wide for embedding by other programs. The standard library however is still installed to an unversioned path, which is inconsistent and creates a conflict when different versions of <code class="notranslate">libjulia.so.$(SOMAJOR)</code> are installed on a system, since these will depend on different versions of the standard library.</p>
<p dir="auto">Therefore <code class="notranslate">base</code>  and <code class="notranslate">test</code> should be installed to a versioned path <code class="notranslate">$(prefix)/share/julia/$(SOMAJOR)</code>.</p>
<p dir="auto">Likewise, <code class="notranslate">juliarc.jl</code> should be installed to <code class="notranslate">$(prefix)/etc/julia/$(SOMAJOR)</code>.</p>
<p dir="auto">This also affects the private libdir, <code class="notranslate">$(prefix)/lib/$(MULTIARCH)/julia/$(SOMAJOR)</code>.</p>
<p dir="auto">Most people seemed to agree with the basic improvements I <a href="https://groups.google.com/forum/#!msg/julia-dev/Z6GsLURuIZE/AmxBLNsz60MJ" rel="nofollow">suggested on the mailing list</a> in order for Julia to play nicely with the Unix <a href="http://www.pathname.com/fhs/" rel="nofollow">FHS</a> as well as with external (non-Pkg) packagers like Linux distributions.  See also <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="9055084" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/1692" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/1692/hovercard" href="https://github.com/JuliaLang/julia/issues/1692">#1692</a>.</p>
<p dir="auto">The main changes that are needed are:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Put standard places in the <code class="notranslate">LOAD_PATH</code> for non-Pkg code. <em>Done in issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="11930003" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/2550" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/2550/hovercard" href="https://github.com/JuliaLang/julia/pull/2550">#2550</a></em></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> On Unix, there should be places for code installation under both <code class="notranslate">/usr/share</code> and <code class="notranslate">/usr/local/share</code> according to the FHS (the former for system packagers, i.e. distros, and the latter for local installations from source etc.) <em>Done in issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="11930003" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/2550" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/2550/hovercard" href="https://github.com/JuliaLang/julia/pull/2550">#2550</a></em></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> The Julia version (major.minor only) should be a part of the path so that different Julia versions can co-exist.   That is, install everything under <code class="notranslate">/usr/share/julia/0.1</code>, not under <code class="notranslate">/usr/share/julia</code> directly.</li>
</ul>
<p dir="auto">These kinds of path choices need to be made ASAP, in my opinion; the longer you wait, the more disruptive it gets to make this kind of change.</p>
<p dir="auto">The first two points require only a trivial patch (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="10969848" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/2296" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/2296/hovercard" href="https://github.com/JuliaLang/julia/pull/2296">#2296</a>): modify <code class="notranslate">base/client.jl</code> to define <code class="notranslate">LOAD_PATH</code> as:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="global const LOAD_PATH = ByteString[
        &quot;.&quot;, # TODO: should we really look here?                               
        abspath(Pkg.dir()),
        abspath(JULIA_HOME,&quot;..&quot;,&quot;share&quot;,&quot;julia&quot;,&quot;extras&quot;),
        abspath(JULIA_HOME,&quot;..&quot;,&quot;local&quot;,&quot;share&quot;,&quot;julia&quot;,&quot;lib&quot;),
        abspath(JULIA_HOME,&quot;..&quot;,&quot;share&quot;,&quot;julia&quot;,&quot;lib&quot;),
    ]"><pre class="notranslate"><code class="notranslate">global const LOAD_PATH = ByteString[
        ".", # TODO: should we really look here?                               
        abspath(Pkg.dir()),
        abspath(JULIA_HOME,"..","share","julia","extras"),
        abspath(JULIA_HOME,"..","local","share","julia","lib"),
        abspath(JULIA_HOME,"..","share","julia","lib"),
    ]
</code></pre></div>
<p dir="auto">Change (<em>update</em>: changed from <code class="notranslate">nonpkg</code>) <code class="notranslate">lib</code> to whatever directory name you prefer.  (<code class="notranslate">external</code>, <code class="notranslate">site</code>, ...?)</p>
<p dir="auto">The third point requires a bit more invasive patch to the <code class="notranslate">Makefile</code> etcetera in order to update the installation paths.  (You might also consider installing <code class="notranslate">julia</code> as <code class="notranslate">julia</code><em>major.minor</em>, e.g. <code class="notranslate">julia0.1</code>, with <code class="notranslate">julia</code> being a symlink, similar to Python.)   I looked through the <code class="notranslate">src/</code> directory, but I couldn't find where <code class="notranslate">jl_load("boot.jl")</code> looks to find <code class="notranslate">boot.jl</code>, but that would need to be changed too.</p>
<p dir="auto">(Possibly the /usr/local/share path should be <code class="notranslate">@unix_only</code>, but it seems harmless to include it on Windows too.)</p>