conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
966 stars 1.77k forks source link

[package] freeimage/3.18.0: broken under msvc cpp20 ? #18921

Open Kalixio opened 1 year ago

Kalixio commented 1 year ago

Description

I'm trying to use freeimage inside another package and compiling with MSVC and cpp20 I'm hitting a compilation error when using c++20 (_Node is not found in MapIntrospector.h)

Compiling with MSVC and c++17 does not yield any error

Package and Environment Details

Conan profile

[settings] os=Windows os_build=Windows arch=x86_64 arch_build=x86_64 compiler=Visual Studio compiler.version=17 compiler.cppstd=20 build_type=Release

Steps to reproduce

conan install freeimage/3.18.0@ --build=missing -s compiler.cppstd=20 -s build_type=Debug

Logs

Click to expand log Configuration: [settings] arch=x86_64 arch_build=x86_64 build_type=Debug compiler=Visual Studio compiler.cppstd=20 compiler.runtime=MDd compiler.version=17 os=Windows os_build=Windows [options] [build_requires] [env] freeimage/3.18.0: WARN: G3 plugin and JPEGTransform are disabled. freeimage/3.18.0: WARN: Package binary is corrupted, removing: 9cc43818744304e7781fe686f618e40bf542123e perceptualdiff/16012021 (test package): Installing package Requirements freeimage/3.18.0 from 'conancenter' - Cache jasper/4.0.0 from 'conancenter' - Cache jbig/20160605 from 'conancenter' - Cache jxrlib/cci.20170615 from 'conancenter' - Cache lcms/2.14 from 'conancenter' - Cache libdeflate/1.18 from 'conancenter' - Cache libjpeg/9e from 'conancenter' - Cache libpng/1.6.40 from 'conancenter' - Cache libraw/0.20.2 from 'conancenter' - Cache libtiff/4.5.1 from 'conancenter' - Cache libwebp/1.3.1 from 'conancenter' - Cache openexr/2.5.7 from 'conancenter' - Cache openjpeg/2.5.0 from 'conancenter' - Cache perceptualdiff/16012021 from local cache - Cache xz_utils/5.4.2 from 'conancenter' - Cache zlib/1.2.13 from 'conancenter' - Cache zstd/1.5.5 from 'conancenter' - Cache Packages freeimage/3.18.0:9cc43818744304e7781fe686f618e40bf542123e - Build jasper/4.0.0:ee47c182242bbd16ea4826dd8bedf0d018dce180 - Cache jbig/20160605:2e5a89bff997d7160e8de3753b1aa3fe08b71f08 - Cache jxrlib/cci.20170615:164640aad040835ac89882393a96d89200694f04 - Cache lcms/2.14:164640aad040835ac89882393a96d89200694f04 - Cache libdeflate/1.18:164640aad040835ac89882393a96d89200694f04 - Cache libjpeg/9e:164640aad040835ac89882393a96d89200694f04 - Cache libpng/1.6.40:d16518e542c3c6c90681c55aae54dd4ee2ca8000 - Cache libraw/0.20.2:be251fdc2ef9571a90d125fc4e2c0fd9bc9cdaa1 - Cache libtiff/4.5.1:782076c684e250a6127f88a3b045e56803c2da7a - Cache libwebp/1.3.1:73b22cfaa643b9d3345f99129a3900a633b24eec - Cache openexr/2.5.7:61a7c082e167a83edf032e43a342275a39f66a7e - Cache openjpeg/2.5.0:164640aad040835ac89882393a96d89200694f04 - Cache perceptualdiff/16012021:b94957c8d4372cec4b68c2c1afd7cdf03ef827b6 - Build xz_utils/5.4.2:164640aad040835ac89882393a96d89200694f04 - Cache zlib/1.2.13:164640aad040835ac89882393a96d89200694f04 - Cache zstd/1.5.5:12a6e3d1014e79766018a1fc6f082347352e9b2d - Cache Installing (downloading, building) binaries... jbig/20160605: Already installed! jxrlib/cci.20170615: Already installed! lcms/2.14: Already installed! libdeflate/1.18: Already installed! libjpeg/9e: Already installed! libwebp/1.3.1: Already installed! openjpeg/2.5.0: Already installed! xz_utils/5.4.2: Already installed! zlib/1.2.13: Already installed! zstd/1.5.5: Already installed! jasper/4.0.0: Already installed! libpng/1.6.40: Already installed! libtiff/4.5.1: Already installed! openexr/2.5.7: Already installed! libraw/0.20.2: Already installed! freeimage/3.18.0: WARN: Build folder is dirty, removing it: C:\.conan\6a9bce\1 freeimage/3.18.0: Copying sources to build folder freeimage/3.18.0: Building your package in C:\.conan\6a9bce\1 freeimage/3.18.0: Generator txt created conanbuildinfo.txt freeimage/3.18.0: Calling generate() freeimage/3.18.0: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior freeimage/3.18.0: Preset 'default' added to CMakePresets.json. Invoke it manually using 'cmake --preset default' freeimage/3.18.0: If your CMake version is not compatible with CMakePresets (<3.19) call cmake like: 'cmake -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE=C:\.conan\6a9bce\1\build\generators\conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW' freeimage/3.18.0: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior freeimage/3.18.0: Aggregating env generators freeimage/3.18.0: Calling build() freeimage/3.18.0: CMake command: cmake -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE="C:/.conan/6a9bce/1/build/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/.conan/e1c7d3/1" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "C:\.conan\6a9bce\1\src\.." -- Using Conan toolchain: C:/.conan/6a9bce/1/build/generators/conan_toolchain.cmake -- Conan toolchain: C++ Standard 20 with extensions OFF -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF -- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.22621. -- The C compiler identification is MSVC 19.36.32537.0 -- The CXX compiler identification is MSVC 19.36.32537.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe - 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: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Conan: Target declared 'ZLIB::ZLIB' -- Conan: Target declared 'PNG::PNG' -- Conan: Target declared 'JPEG::JPEG' -- Conan: Target declared 'openjp2' -- Conan: Component target declared 'WebP::webpdecoder' -- Conan: Component target declared 'WebP::sharpyuv' -- Conan: Component target declared 'WebP::webp' -- Conan: Component target declared 'WebP::webpdemux' -- Conan: Component target declared 'WebP::libwebpmux' -- Conan: Target declared 'libwebp::libwebp' -- Conan: Target declared 'jxrlib::jxrlib' -- Conan: Target declared 'libraw::libraw' -- Conan: Target declared 'lcms::lcms' -- Conan: Target declared 'Jasper::Jasper' -- Conan: Including build module from 'C:/Users/rboul/.conan/data/jasper/4.0.0/_/_/package/ee47c182242bbd16ea4826dd8bedf0d018dce180/lib/cmake/conan-official-jasper-variables.cmake' -- Conan: Component target declared 'OpenEXR::IlmImfConfig' -- Conan: Component target declared 'IlmBase::IlmBaseConfig' -- Conan: Component target declared 'IlmBase::Half' -- Conan: Component target declared 'IlmBase::Iex' -- Conan: Component target declared 'IlmBase::IexMath' -- Conan: Component target declared 'IlmBase::IMath' -- Conan: Component target declared 'IlmBase::IlmThread' -- Conan: Component target declared 'openexr::ilmbase_conan_pkgconfig' -- Conan: Component target declared 'OpenEXR::IlmImf' -- Conan: Component target declared 'OpenEXR::IlmImfUtil' -- Conan: Target declared 'openexr::openexr' -- Conan: Target declared 'TIFF::TIFF' -- Conan: Component target declared 'libdeflate::libdeflate_static' -- Conan: Target declared 'LibLZMA::LibLZMA' -- Conan: Including build module from 'C:/Users/rboul/.conan/data/xz_utils/5.4.2/_/_/package/164640aad040835ac89882393a96d89200694f04/lib/cmake/conan-official-xz_utils-variables.cmake' -- Conan: Target declared 'jbig::jbig' -- Conan: Component target declared 'zstd::libzstd_static' -- Configuring done (4.6s) -- Generating done (0.1s) -- Build files have been written to: C:/.conan/6a9bce/1/build freeimage/3.18.0: CMake command: cmake --build "C:\.conan\6a9bce\1\build" --config Debug MSBuild version 17.6.3+07e294721 for .NET Framework Checking Build System Building Custom Rule C:/.conan/6a9bce/1/CMakeLists.txt BitmapAccess.cpp CacheFile.cpp ColorLookup.cpp Conversion.cpp Conversion16_555.cpp Conversion16_565.cpp Conversion24.cpp Conversion32.cpp Conversion4.cpp Conversion8.cpp ConversionFloat.cpp ConversionRGB16.cpp C:\.conan\6a9bce\1\src\Source\MapIntrospector.h(98,36): error C2065: '_Node' : identificateur non déclaré (compilation du fichier source C:\.conan\6a9bce\1\src\Source\FreeImage\BitmapAccess.cpp) [C:\.conan\6a9bc e\1\build\FreeImage.vcxproj] C:\.conan\6a9bce\1\src\Source\MapIntrospector.h(100,2): message : voir la référence à l'instanciation classe modèle 'MapIntrospector<_Maptype>' en cours de compilation (compilation du fichier source C:\.conan\6a 9bce\1\src\Source\FreeImage\BitmapAccess.cpp) [C:\.conan\6a9bce\1\build\FreeImage.vcxproj] C:\.conan\6a9bce\1\src\Source\MapIntrospector.h(98,36): error C3861: '_Node' : identificateur introuvable (compilation du fichier source C:\.conan\6a9bce\1\src\Source\FreeImage\BitmapAccess.cpp) [C:\.conan\6a9bc e\1\build\FreeImage.vcxproj] C:\.conan\6a9bce\1\src\Source\FreeImage\CacheFile.cpp(56,12): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\.conan\6a9bce\1\build\FreeImage.vcxproj] ConversionRGBA16.cpp ConversionRGBAF.cpp ConversionRGBF.cpp ConversionType.cpp
elvisdukaj commented 8 months ago

I hit the same issue unfortunately. Did you find a fix @Kalixio?

thbeu commented 8 months ago

This is an upstream issue. Hopefully we can expect a new maintenance release freeimage/3.19.1 where this issue is fixed @danoli3.

elvisdukaj commented 8 months ago

I am creating a MR for this issue. I submitted also a MR upstream: issue and MR.

I am propsing this https://github.com/conan-io/conan-center-index/pull/22942 for the fix.