<html>#2464: Linking errors with ET_2020_05 with ETK built ExternalLibraries
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Samuel Tootle</td></tr>
<tr><td style='text-align:right'>   Status:</td><td>new</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td></td></tr>
<tr><td style='text-align:right'>  Version:</td><td>ET_2020_05</td></tr>
<tr><td style='text-align:right'>     Type:</td><td>bug</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>minor</td></tr>
<tr><td style='text-align:right'>Component:</td><td>EinsteinToolkit thorn</td></tr>
</table>

<p>Changes (by Samuel Tootle):</p>
<p>When compiling ET_2020_05, I obtained linking errors against LAPACK and BLAS even though these were set to BUILD in the optionslist.</p>
<p>After further review, the issue turned out to be that bindings/Configuration/Capabilities/make.BLAS.defn and make.LAPACK.defn both had the libraries listed in LAPACK_DIR/lib and BLAS_DIR/lib respectively, however, the configure.sh scripts for both libs copies the static library to LAPACK_DIR and BLAS_DIR respectively. For instance:<br />
ExternalLibraries/LAPACK/configure.sh</p>
<div class="codehilite language-shell"><pre><span></span>        <span class="nb">echo</span> <span class="s2">&quot;LAPACK: Installing...&quot;</span>
        cp liblapack.a <span class="si">${</span><span class="nv">LAPACK_DIR</span><span class="si">}</span>
        <span class="nb">popd</span>
</pre></div>


<p>Changing the LAPACK_LIB_DIRS and BLAS_LIB_DIRS to the base directory where the library is located results in correct linking.</p>
<p>For instance, Old make.BLAS.defn:</p>
<div class="codehilite"><pre><span></span><span class="nv">INC_DIRS</span> <span class="o">+=</span>  <span class="k">$(</span>BLAS_INC_DIRS<span class="k">)</span>
<span class="nv">INC_DIRS_F</span> <span class="o">+=</span>  <span class="k">$(</span>BLAS_INC_DIRS<span class="k">)</span>
<span class="nv">BLAS_DIR</span>      <span class="o">=</span> /&lt;directory_tree to FreeTHC&gt;/FreeTHC2020/Cactus/configs/thc_intel/scratch/external/BLAS
<span class="nv">BLAS_INC_DIRS</span> <span class="o">=</span>
<span class="nv">BLAS_LIB_DIRS</span> <span class="o">=</span> /&lt;directory_tree to FreeTHC&gt;/FreeTHC2020/Cactus/configs/thc_intel/scratch/external/BLAS/lib
<span class="nv">BLAS_LIBS</span>     <span class="o">=</span> blas
<span class="nv">HAVE_CAPABILITY_BLAS</span> <span class="o">=</span> <span class="m">1</span>
</pre></div>


<p>New:</p>
<div class="codehilite"><pre><span></span><span class="nv">NC_DIRS</span> <span class="o">+=</span>  <span class="k">$(</span>BLAS_INC_DIRS<span class="k">)</span>
<span class
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2464/linking-errors-with-et_2020_05-with-etk'>https://bitbucket.org/einsteintoolkit/tickets/issues/2464/linking-errors-with-et_2020_05-with-etk</a></p>
</html>