<html>#2532: try and auto-detect "system" directories to strip from THORN_INC_DIRS and THORN_LIB_DIRS
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Roland Haas</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>development version</td></tr>
<tr><td style='text-align:right'>     Type:</td><td>enhancement</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>minor</td></tr>
<tr><td style='text-align:right'>Component:</td><td>Cactus</td></tr>
</table>

<p>Currently we use two utilities <code>strip-inc-dirs.sh</code> and <code>strip-lib-dirs.sh</code> to remove “system” libraries from <code>THORN_INC_DIRS</code> and <code>THORN_LIB_DIRS</code> in ExternalLibraries. However the list used is hard-coded and not always correct (see eg <a href="https://bitbucket.org/einsteintoolkit/tickets/issues/2528/externallibraries-libjpeg-thorn-adds" rel="nofollow" title="ExternalLibraries/libjpeg thorn adds problematic system library path to Cactus" class="ap-connect-link">#2528</a>).</p>
<p>It may be better to:</p>
<ol>
<li>make the list of directories to strip option list variables</li>
<li>try to auto-detect them in the Cactus know-architectures files</li>
</ol>
<p>To auto-detect on GNU/Linux with gcc/ld one can try and use the suggestion on <a data-is-external-link="true" href="https://stackoverflow.com/questions/9922949/how-to-print-the-ldlinker-search-path" rel="nofollow">https://stackoverflow.com/questions/9922949/how-to-print-the-ldlinker-search-path</a> and <a data-is-external-link="true" href="https://stackoverflow.com/questions/17939930/finding-out-what-the-gcc-include-path-is" rel="nofollow">https://stackoverflow.com/questions/17939930/finding-out-what-the-gcc-include-path-is</a> namely</p>
<div class="codehilite"><pre><span></span><span>gcc -print-search-dirs</span>
</pre></div>

<p>and</p>
<div class="codehilite"><pre><span></span><span>echo | gcc -E -Wp,-v -</span>
</pre></div>

<p>‌</p>
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2532/try-and-auto-detect-system-directories-to'>https://bitbucket.org/einsteintoolkit/tickets/issues/2532/try-and-auto-detect-system-directories-to</a></p>
</html>