<p dir="auto">Tried to compile julia 1.0.3. Compilation OK, but 4 tests fail when <code class="notranslate">make -i testall</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error in testset cmdlineargs:
Test Failed at /tmpdir/sysinst/julia/julia/test/cmdlineargs.jl:422
  Expression: success(#= /tmpdir/sysinst/julia/julia/test/cmdlineargs.jl:422 =# @cmd(&quot;\$exename -e \&quot;exit(0)\&quot;&quot;))
Error in testset cmdlineargs:
Test Failed at /tmpdir/sysinst/julia/julia/test/cmdlineargs.jl:425
  Expression: success(#= /tmpdir/sysinst/julia/julia/test/cmdlineargs.jl:425 =# @cmd(&quot;\$exename -e \&quot;exit(!(Base.load_path() == []))\&quot;&quot;))
Error in testset cmdlineargs:
Test Failed at /tmpdir/sysinst/julia/julia/test/cmdlineargs.jl:425
  Expression: success(#= /tmpdir/sysinst/julia/julia/test/cmdlineargs.jl:425 =# @cmd(&quot;\$exename -e \&quot;exit(!(Base.load_path() == []))\&quot;&quot;))
Error in testset cmdlineargs:
Test Failed at /tmpdir/sysinst/julia/julia/test/cmdlineargs.jl:425
  Expression: success(#= /tmpdir/sysinst/julia/julia/test/cmdlineargs.jl:425 =# @cmd(&quot;\$exename -e \&quot;exit(!(Base.load_path() == []))\&quot;&quot;))"><pre class="notranslate"><code class="notranslate">Error in testset cmdlineargs:
Test Failed at /tmpdir/sysinst/julia/julia/test/cmdlineargs.jl:422
  Expression: success(#= /tmpdir/sysinst/julia/julia/test/cmdlineargs.jl:422 =# @cmd("\$exename -e \"exit(0)\""))
Error in testset cmdlineargs:
Test Failed at /tmpdir/sysinst/julia/julia/test/cmdlineargs.jl:425
  Expression: success(#= /tmpdir/sysinst/julia/julia/test/cmdlineargs.jl:425 =# @cmd("\$exename -e \"exit(!(Base.load_path() == []))\""))
Error in testset cmdlineargs:
Test Failed at /tmpdir/sysinst/julia/julia/test/cmdlineargs.jl:425
  Expression: success(#= /tmpdir/sysinst/julia/julia/test/cmdlineargs.jl:425 =# @cmd("\$exename -e \"exit(!(Base.load_path() == []))\""))
Error in testset cmdlineargs:
Test Failed at /tmpdir/sysinst/julia/julia/test/cmdlineargs.jl:425
  Expression: success(#= /tmpdir/sysinst/julia/julia/test/cmdlineargs.jl:425 =# @cmd("\$exename -e \"exit(!(Base.load_path() == []))\""))
</code></pre></div>
<p dir="auto">Here is the Make.user:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="prefix = /usr/local/julia/1.0.3
USEIFC = 1
USE_INTEL_MKL = 1
USE_INTEL_MKL_FFT = 1"><pre class="notranslate"><code class="notranslate">prefix = /usr/local/julia/1.0.3
USEIFC = 1
USE_INTEL_MKL = 1
USE_INTEL_MKL_FFT = 1
</code></pre></div>
<p dir="auto">Using mkl rel 19.2 and gcc:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Copyright © 2015 Free Software Foundation, Inc.
Ce logiciel est libre; voir les sources pour les conditions de copie.  Il n'y a PAS
GARANTIE; ni implicite pour le MARCHANDAGE ou pour un BUT PARTICULIER."><pre lang="gcc" class="notranslate"><code class="notranslate">Copyright © 2015 Free Software Foundation, Inc.
Ce logiciel est libre; voir les sources pour les conditions de copie.  Il n'y a PAS
GARANTIE; ni implicite pour le MARCHANDAGE ou pour un BUT PARTICULIER.
</code></pre></div>
<p dir="auto">I'm currently building Julia v1.0.2 with intel MKL library. The build is passed, but it cannot pass the test. I found some test failures are owing to the LD_LIBRARY_PATH are missing. For example, in <code class="notranslate">cmdlineargs.jl</code>.<br>
</p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/JuliaLang/julia/blob/a50d5af9cb9a7cce9a5ee3154bba735ffc74c1b1/test/cmdlineargs.jl#L30-L32">julia/test/cmdlineargs.jl</a>
    </p>
    <p class="mb-0 color-fg-muted">
        Lines 30 to 32
      in
      <a data-pjax="true" class="commit-tease-sha" href="/JuliaLang/julia/commit/a50d5af9cb9a7cce9a5ee3154bba735ffc74c1b1">a50d5af</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L30" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="30"></td>
          <td id="LC30" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">let</span> v <span class="pl-k">=</span> <span class="pl-c1">writereadpipeline</span>(<span class="pl-s"><span class="pl-pds">"</span>println(<span class="pl-cce">\"</span>REPL: <span class="pl-cce">\"</span>, @which(less), @isdefined(InteractiveUtils))<span class="pl-pds">"</span></span>, </td>
        </tr>

        <tr class="border-0">
          <td id="L31" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="31"></td>
          <td id="LC31" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">             <span class="pl-c1">setenv</span>(<span class="pl-s"><span class="pl-pds">`</span>$exename -i -E 'empty!(LOAD_PATH); @isdefined InteractiveUtils'<span class="pl-pds">`</span></span>, </td>
        </tr>

        <tr class="border-0">
          <td id="L32" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="32"></td>
          <td id="LC32" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">                 <span class="pl-s"><span class="pl-pds">"</span>JULIA_LOAD_PATH<span class="pl-pds">"</span></span><span class="pl-k">=&gt;</span><span class="pl-s"><span class="pl-pds">"</span><span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>JULIA_DEPOT_PATH<span class="pl-pds">"</span></span><span class="pl-k">=&gt;</span><span class="pl-s"><span class="pl-pds">"</span><span class="pl-pds">"</span></span>)) </td>
        </tr>
    </tbody></table>
  </div>
</div>
<br>
The <code class="notranslate">setenv</code> didn't copy the origin <code class="notranslate">ENV</code>, so when running julia, it will cause a <code class="notranslate">Intel MKL FATAL ERROR: Cannot load libmkl_core.so.</code> It can be solve by passing the LD_LIBRARY_PATH to the command.<p></p>
<p dir="auto">Another is problem is at<br>
</p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/JuliaLang/julia/blob/a50d5af9cb9a7cce9a5ee3154bba735ffc74c1b1/test/cmdlineargs.jl#L418-L431">julia/test/cmdlineargs.jl</a>
    </p>
    <p class="mb-0 color-fg-muted">
        Lines 418 to 431
      in
      <a data-pjax="true" class="commit-tease-sha" href="/JuliaLang/julia/commit/a50d5af9cb9a7cce9a5ee3154bba735ffc74c1b1">a50d5af</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L418" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="418"></td>
          <td id="LC418" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     <span class="pl-k">if</span> <span class="pl-k">!</span>Sys<span class="pl-k">.</span><span class="pl-c1">iswindows</span>() <span class="pl-k">&amp;&amp;</span> Base<span class="pl-k">.</span>libllvm_version <span class="pl-k">&gt;</span> <span class="pl-s"><span class="pl-pds"><span class="pl-c1">v</span>"</span>3.3<span class="pl-pds">"</span></span> </td>
        </tr>

        <tr class="border-0">
          <td id="L419" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="419"></td>
          <td id="LC419" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">         testdir <span class="pl-k">=</span> <span class="pl-c1">mktempdir</span>() </td>
        </tr>

        <tr class="border-0">
          <td id="L420" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="420"></td>
          <td id="LC420" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">         <span class="pl-c1">cd</span>(testdir) <span class="pl-k">do</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L421" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="421"></td>
          <td id="LC421" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">             <span class="pl-c1">rm</span>(testdir) </td>
        </tr>

        <tr class="border-0">
          <td id="L422" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="422"></td>
          <td id="LC422" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">             <span class="pl-c1">@test</span> Base<span class="pl-k">.</span><span class="pl-c1">current_project</span>() <span class="pl-k">===</span> <span class="pl-c1">nothing</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L423" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="423"></td>
          <td id="LC423" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">             <span class="pl-c1">@test</span> <span class="pl-c1">success</span>(<span class="pl-s"><span class="pl-pds">`</span>$exename -e "exit(0)"<span class="pl-pds">`</span></span>) </td>
        </tr>

        <tr class="border-0">
          <td id="L424" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="424"></td>
          <td id="LC424" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">             <span class="pl-k">for</span> load_path <span class="pl-k">in</span> [<span class="pl-s"><span class="pl-pds">"</span><span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>@<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>@.<span class="pl-pds">"</span></span>] </td>
        </tr>

        <tr class="border-0">
          <td id="L425" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="425"></td>
          <td id="LC425" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">                 <span class="pl-c1">withenv</span>(<span class="pl-s"><span class="pl-pds">"</span>JULIA_LOAD_PATH<span class="pl-pds">"</span></span> <span class="pl-k">=&gt;</span> load_path) <span class="pl-k">do</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L426" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="426"></td>
          <td id="LC426" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">                     <span class="pl-c1">@test</span> <span class="pl-c1">success</span>(<span class="pl-s"><span class="pl-pds">`</span>$exename -e "exit(!(Base.load_path() == []))"<span class="pl-pds">`</span></span>) </td>
        </tr>

        <tr class="border-0">
          <td id="L427" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="427"></td>
          <td id="LC427" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">                 <span class="pl-k">end</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L428" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="428"></td>
          <td id="LC428" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">             <span class="pl-k">end</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L429" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="429"></td>
          <td id="LC429" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">         <span class="pl-k">end</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L430" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="430"></td>
          <td id="LC430" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     <span class="pl-k">end</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L431" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="431"></td>
          <td id="LC431" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">end</span> </td>
        </tr>
    </tbody></table>
  </div>
</div>
<br>
After the directory is removed, it cannot load the <code class="notranslate">libmkl_rt.so.</code> so will cause a <code class="notranslate">Intel MKL FATAL ERROR: Cannot load /home/peter/intel/compilers_and_libraries_2019.0.117/linux/mkl/lib/intel64/libmkl_rt.so.</code> it seems to be a problem of calling <code class="notranslate">getcwd</code> in <code class="notranslate">libmkl_rt.so.</code><p></p>