AcademySoftwareFoundation / openexr

The OpenEXR project provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry.
http://www.openexr.com/
BSD 3-Clause "New" or "Revised" License
1.63k stars 620 forks source link

v3.2.0 when compiling STATIC libs, looks for libdeflate once installed. #1542

Open ggarra13 opened 1 year ago

ggarra13 commented 1 year ago
CMake Error at /home/gga/code/develop/mrv2/BUILD-Linux-amd64/Release/install/lib/cmake/OpenEXR/OpenEXRTargets.cmake:100 (set_target_properties):
  The link interface of target "OpenEXR::OpenEXRCore" contains:

    PkgConfig::deflate

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /home/gga/code/develop/mrv2/BUILD-Linux-amd64/Release/install/lib/cmake/OpenEXR/OpenEXRConfig.cmake:41 (include)
  /home/gga/code/develop/mrv2/tlRender/cmake/Modules/FindtlRender.cmake:38 (find_package)
  CMakeLists.txt:38 (find_package)

According to the docs, libdeflate should have been compiled statically and OpenEXR should not be looking for it.

cary-ilm commented 1 year ago

Could you post the complete CMake log, and exactly what flags you're building with?

ggarra13 commented 1 year ago

The build succeds. It is built with ExternalIProject_Add(). It is the find_package(OpenEXR) that fails.

The cmake command from the OpenEXR-cfgcmd.txt is: cmd='/usr/local/bin/cmake;-DCMAKE_MODULE_PATH=/home/gga/code/develop/mrv2/tlRender/etc/SuperBuild/../../cmake/Modules|/home/gga/code/develop/mrv2/tlRender/etc/SuperBuild/cmake/Modules;-DCMAKE_BUILD_TYPE=Release;-DCMAKE_INSTALL_PREFIX=/home/gga/code/develop/mrv2/BUILD-Linux-amd64/Release/install;-DCMAKE_PREFIX_PATH=/home/gga/code/develop/mrv2/BUILD-Linux-amd64/Release/install;-DCMAKE_POLICY_DEFAULT_CMP0091:STRING=NEW;-DCMAKE_POLICY_DEFAULT_CMP0114:STRING=NEW;-DCMAKE_FIND_FRAMEWORK=LAST;-DCMAKE_CXX_STANDARD=17;-DCMAKE_CXX_FLAGS=;-DCMAKE_C_FLAGS=;-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$:Debug>DLL;-DCMAKE_VERBOSE_MAKEFILE=FALSE;-DCMAKE_OSX_DEPLOYMENT_TARGET=;-DCMAKE_OSX_ARCHITECTURES=;-DBUILD_SHARED_LIBS=OFF;-DOPENEXR_BUILD_TOOLS=OFF;-DOPENEXR_INSTALL_EXAMPLES=OFF;-DBUILD_TESTING=OFF;-GNinja;-S;;-B;'

ggarra13 commented 1 year ago

Attached is the configure, build and install .logs.

OpenEXR-configure-out.log OpenEXR-build-out.log OpenEXR-install-out.log

ggarra13 commented 1 year ago

And here's a .zip with that Config and Targets .cmake files.

OpenEXR_Config_and_Targets.zip

EmersonDove commented 1 year ago

Also getting this error on ubuntu with a clean run of

mkdir build
cd build
cmake cmake -DBUILD_SHARED_LIBS=OFF ..

Output:

-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Release' as none was specified.
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
-- Checking for module 'libdeflate'
--   Found libdeflate, version 1.10
-- Using Imath from /usr/local/lib/cmake/Imath
-- Performing Test OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN
-- Performing Test OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN - Success
-- Performing Test OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX
-- Performing Test OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX - Success
-- Looking for include file ucontext.h
-- Looking for include file ucontext.h - found
-- Performing Test IEX_HAVE_CONTROL_REGISTER_SUPPORT
-- Performing Test IEX_HAVE_CONTROL_REGISTER_SUPPORT - Success
-- Looking for include file semaphore.h
-- Looking for include file semaphore.h - found
-- Configure OpenEXR 3.2.0-dev, library API version: 31.3.2.0
-- Found Python3: /usr/bin/python3.10 (found version "3.10.12") found components: Interpreter 
-- adding bin tests
-- Downloading https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr-images/v1.0/TestImages/GrayRampsHorizontal.exr
-- Downloading https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr-images/v1.0/LuminanceChroma/Garden.exr
-- Downloading https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr-images/v1.0/MultiResolution/ColorCodedLevels.exr
-- Downloading https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr-images/v1.0/MultiResolution/WavyLinesLatLong.exr
-- Downloading https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr-images/v1.0/MultiResolution/WavyLinesCube.exr
-- Downloading https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr-images/v1.0/LuminanceChroma/Flowers.exr
-- Downloading https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr-images/v1.0/MultiView/Adjuster.exr
-- Downloading https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr-images/v1.0/Chromaticities/Rec709_YC.exr
-- Downloading https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr-images/v1.0/Chromaticities/Rec709.exr
-- Downloading https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr-images/v1.0/Chromaticities/XYZ_YC.exr
-- Downloading https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr-images/v1.0/Chromaticities/XYZ.exr
-- Downloading https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr-images/v1.0/TestImages/GammaChart.exr
-- Downloading https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr-images/v1.0/Beachball/singlepart.0001.exr
-- Downloading https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr-images/v1.0/v2/LeftView/Balls.exr
-- Downloading https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr-images/v1.0/v2/Stereo/Trunks.exr
-- Downloading https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr-images/v1.0/Beachball/multipart.0001.exr
-- clang-format not found.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/emerson/Downloads/openexr/build

Downgrading to 3.1.11 fixes it.