Hi Kenneth,

Thank you for the helpful answer.
OpenImage does not set $LIBRARY_PATH, but it seems that CMake does not
honor $LIBRARY_PATH (not clear why):
https://stackoverflow.com/questions/50346194/why-does-cmake-not-respect-library-path-and-cpath

Cheers,
Sam

On Tue, Nov 6, 2018 at 5:15 PM Kenneth Hoste <kenneth.ho...@ugent.be> wrote:

> Dear Sam,
>
> On 06/11/2018 16:56, Sam Moors wrote:
> > Dear Easybuilders,
> >
> > There is something about dependencies that I don't quite understand.
> > I was trying to build OpenImageIO-1.8.16 with the foss/2018b toolchain,
> > which fails because the libpng dep is not linking against the correct
> > zlib (1.2.11), although zlib is a dep of libpng.
> > If I add zlib as a dependency, or if I explicitly add the zlib linking
> > path, OpenImageIO builds without a problem.
> > So why is zlib not added automatically?
>
> There's a subtle difference between direct and indirect dependencies.
>
> Only for direct dependencies, the corresponding lib(64) subdirectories
> are listed in $LDFLAGS in the build environment that is set up by
> EasyBuild, for example (from an OpenImageIO build log):
>
> == 2018-10-14 15:09:53,374 environment.py:97 INFO Environment variable
> LDFLAGS set to ...
> -L/prefix/software/libjpeg-turbo/1.5.2-GCCcore-6.3.0/lib
> -L/prefix/software/LibTIFF/4.0.8-intel-2017a/lib
> -L/prefix/software/OpenEXR/2.2.0-intel-2017a/lib (previously undefined)
>
> So if you don't include zlib as a direct dependency, the lib
> subdirectory for zlib will not be listed there.
>
> Usually that doesn't matter because the zlib module updates
> $LIBRARY_PATH with the location of the libraries, which should get
> picked up by the compiler/linker as well...
>
> Why that doesn't work in this particular case, I'm not quite sure.
> Maybe the OpenImage build procedure does a hard reset of $LIBRARY_PATH?
>
>
> regards,
>
> Kenneth
>

Reply via email to