#2528: ExternalLibraries/libjpeg thorn adds problematic system library path to Cactus
Reporter: Michael Müller Status: new Milestone: Version: ET_2020_11 Type: bug Priority: major Component: EinsteinToolkit thorn
Comment (by Roland Haas):
This is basically the inverse of [https://bitbucket.org/einsteintoolkit/tickets/issues/2428/possible-issue-bet...) and a partial fix was implemented in git hash [b78b0a1f](https://bitbucket.org/cactuscode/cactus/commits/b78b0a1ffbb90f74f010df3d60ff...) "Cactus: New scripts to strip standard directory from include and library paths" of [cactus](https://bitbucket.org/cactuscode/cactus) 7 years ago.
A workaround without changing code is to set `LIBJPEG_DIR = BUILD` forcing a build from source and thus avoiding the system directory.
A proper (for some notion of proper, really more a hack) fix would be to ensure that in `ExternalLibraries/libjpeg/configure.sh` the `LIBJPEG_LIB_DIRS` and `LIBJPEG_INC_DIRS` variables are passed through `${CCTK_HOME}/lib/sbin/strip-libdirs.s` and `${CCTK_HOME}/lib/sbin/strip-incdirs.s` respectively as is done eg in `arrangements/ExternalLibraries/hwloc/src/detect.sh`.
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 `arrangements/ExternalLibraries/HDF5/src/detect.sh` and `GSL/src/detect.sh`, where it is also missing, that would be even better.
-- Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2528/externallibraries-...
trac@lists.einsteintoolkit.org