AcademySoftwareFoundation / OpenImageIO

Reading, writing, and processing images in a wide variety of file formats, using a format-agnostic API, aimed at VFX applications.
https://openimageio.readthedocs.org
Apache License 2.0
1.91k stars 574 forks source link

[BUILD] Problems linking OIIO with OpenEXR #4029

Open etsach opened 8 months ago

etsach commented 8 months ago

I have issues building OpenImageIO, with linker errors missing all the Imf_3_2:: symbols.

I'm building on a brand new Ubuntu 22.04 LTS install, which was installed from scratch just before compiling OIIO. No OpenEXR packages are installed (no /usr/include/OpenEXR or Imath)

I built OpenEXR from the github repository, using "release" branch, and installed it in my user space libs folder (/home/esc/Documents/coding/libs)

Then I configured OIIO build using that library folder as CMAKE_PREFIX_PATH. OpenEXR was found by cmake, and I can check that OpenEXR_DIR is properly set (/home/esc/Documents/coding/libs/openexr-build/cmake)

Linking strutil_test fails. Looking at make build log, this one is linked against OpenImageIO and Imath libraries, but not OpenEXR, which is likely the cause for the linker error. But why is it not linked against OpenEXR?

Attached are CMakeCache.txt and the build log.

build.log CMakeCache.txt

lgritz commented 8 months ago

It looks like your build.log captures the stdout, but not the stderr, so it doesn't contain the actual error messages you're getting.

lgritz commented 8 months ago

Just taking a stab in the dark here: You said there was no OpenEXR installed in /usr/include/OpenEXR, but I wonder if there is a library in /usr/lib?