<html>#2528: ExternalLibraries/libjpeg thorn adds problematic system library path to Cactus
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Michael Müller</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_11</td></tr>
<tr><td style='text-align:right'>     Type:</td><td>bug</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>major</td></tr>
<tr><td style='text-align:right'>Component:</td><td>EinsteinToolkit thorn</td></tr>
</table>

<p>Comment (by Roland Haas):</p>
<p>This is basically the inverse of <a data-is-external-link="true" href="https://bitbucket.org/einsteintoolkit/tickets/issues/2428/possible-issue-between-externallibraries" rel="nofollow">https://bitbucket.org/einsteintoolkit/tickets/issues/2428/possible-issue-between-externallibraries</a> and a partial fix was implemented in git hash <a data-is-external-link="true" href="https://bitbucket.org/cactuscode/cactus/commits/b78b0a1ffbb90f74f010df3d60ff7a59b2963ea5" rel="nofollow">b78b0a1f</a> "Cactus: New scripts to strip standard directory from include and library paths" of <a data-is-external-link="true" href="https://bitbucket.org/cactuscode/cactus" rel="nofollow">cactus</a> 7 years ago.</p>
<p>A workaround without changing code is to set <code>LIBJPEG_DIR = BUILD</code> forcing a build from source and thus avoiding the system directory. </p>
<p>A proper (for some notion of proper, really more a hack) fix would be to ensure that in <code>ExternalLibraries/libjpeg/configure.sh</code> the <code>LIBJPEG_LIB_DIRS</code> and <code>LIBJPEG_INC_DIRS</code> variables are passed through <code>${CCTK_HOME}/lib/sbin/strip-libdirs.s</code> and <code>${CCTK_HOME}/lib/sbin/strip-incdirs.s</code> respectively as is done eg in <code>arrangements/ExternalLibraries/hwloc/src/detect.sh</code>.</p>
<p>If you have time and could produce a pull request with those changes that would be great. If you have more time and would also add the same code to <code>arrangements/ExternalLibraries/HDF5/src/detect.sh</code> and <code>GSL/src/detect.sh</code>, where it is also missing, that would be even better.</p>
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2528/externallibraries-libjpeg-thorn-adds'>https://bitbucket.org/einsteintoolkit/tickets/issues/2528/externallibraries-libjpeg-thorn-adds</a></p>
</html>