conan-io / conan-center-index

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

gdal/3.8.3 : Building error with default recipe #25853

Open philiane opened 2 weeks ago

philiane commented 2 weeks ago

Description

Installing gdal/3.8.3 or 3.7.3 in both Release and Debug mode with default recipe/settings failed. My colleagues got the same error on their PC

Package and Environment Details

Conan profile

[settings] arch=x86_64 build_type=Release compiler=msvc compiler.cppstd=17 compiler.runtime=dynamic compiler.version=194 os=Windows

Steps to reproduce

conan install . --output-folder=build --build=missing

Logs

Click to expand log ``` -------- Installing package gdal/3.8.3 (31 of 31) -------- gdal/3.8.3: Building from source gdal/3.8.3: Package gdal/3.8.3:f94e8911f0aacf729ba5cfec32c8f0efe5a7e792 gdal/3.8.3: Copying sources to build folder gdal/3.8.3: Building your package in C:\Users\Philippe\.conan2\p\b\gdalbcb0db5894771\b gdal/3.8.3: Calling generate() gdal/3.8.3: Generators folder: C:\Users\Philippe\.conan2\p\b\gdalbcb0db5894771\b\build\generators gdal/3.8.3: CMakeToolchain generated: conan_toolchain.cmake gdal/3.8.3: CMakeToolchain generated: C:\Users\Philippe\.conan2\p\b\gdalbcb0db5894771\b\build\generators\CMakePresets.json gdal/3.8.3: CMakeToolchain generated: C:\Users\Philippe\.conan2\p\b\gdalbcb0db5894771\b\src\CMakeUserPresets.json gdal/3.8.3: Generating aggregated env files gdal/3.8.3: Generated aggregated env files: ['conanbuild.bat', 'conanrun.bat'] gdal/3.8.3: Calling build() gdal/3.8.3: Apply patch (conan): Use custom version of find_package() for Conan deps gdal/3.8.3: Apply patch (conan): Fix private linking not working for some Conan dependencies gdal/3.8.3: Apply patch (conan): Fix CMake failure due to cyclical dependencies in CMakeDeps targets gdal/3.8.3: WARN: deprecated: Use of 'source_path' is deprecated, please use 'source_folder' instead gdal/3.8.3: Running CMake.configure() gdal/3.8.3: RUN: cmake -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/Users/Philippe/.conan2/p/b/gdalbcb0db5894771/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "C:/Users/Philippe/.conan2/p/b/gdalbcb0db5894771/b" -- Using Conan toolchain: C:/Users/Philippe/.conan2/p/b/gdalbcb0db5894771/b/build/generators/conan_toolchain.cmake -- Conan toolchain: CMAKE_GENERATOR_TOOLSET=v143 -- Conan toolchain: Setting CMAKE_MSVC_RUNTIME_LIBRARY=$<$:MultiThreadedDLL> -- Conan toolchain: C++ Standard 17 with extensions OFF -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF -- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.26100. -- The C compiler identification is MSVC 19.42.34432.0 -- The CXX compiler identification is MSVC 19.42.34432.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Preview/VC/Tools/MSVC/14.42.34432/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/Preview/VC/Tools/MSVC/14.42.34432/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test test_AVX -- Performing Test test_AVX - Success -- Performing Test test_AVX2 -- Performing Test test_AVX2 - Success -- Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR) -- Could NOT find Python (missing: Python_NumPy_INCLUDE_DIRS NumPy) (found suitable version "3.11.7", minimum required is "3.6") -- Looking for vsnprintf -- GDAL_VERSION = 3.8.3 -- GDAL_ABI_FULL_VERSION = 38 -- GDAL_SOVERSION = -- Found CURL: 1 -- CURL_TARGET: CURL::libcurl -- CURL_LIBRARIES: CURL::libcurl -- CURL_INCLUDE_DIRS: C:/Users/Philippe/.conan2/p/libcu80f417cfc1bf6/p/include -- Found Iconv: 1 -- ICONV_TARGET: Iconv::Iconv -- ICONV_LIBRARIES: Iconv::Iconv -- ICONV_INCLUDE_DIRS: C:/Users/Philippe/.conan2/p/libicb4e788959979c/p/include -- Performing Test ICONV_HAS_EXTRA_CHARSETS -- Performing Test ICONV_HAS_EXTRA_CHARSETS - Failed CMake Warning at src/cmake/helpers/CheckDependentLibraries.cmake:327 (message): ICONV is available but some character sets used by some drivers are not available. You may need to install an extra package (e.g. 'glibc-gconv-extra' on Fedora) Call Stack (most recent call first): src/gdal.cmake:265 (include) src/CMakeLists.txt:246 (include) -- Found EXPAT: 1 -- EXPAT_TARGET: expat::expat -- EXPAT_LIBRARIES: expat::expat -- EXPAT_INCLUDE_DIRS: C:/Users/Philippe/.conan2/p/expate60e311cd7041/p/include -- Found ZLIB: 1 -- ZLIB_TARGET: ZLIB::ZLIB -- ZLIB_LIBRARIES: ZLIB::ZLIB -- ZLIB_INCLUDE_DIRS: C:/Users/Philippe/.conan2/p/zlib6f797a4dd16fb/p/include -- Found Deflate: 1 -- DEFLATE_TARGET: Deflate::Deflate -- DEFLATE_LIBRARIES: Deflate::Deflate -- DEFLATE_INCLUDE_DIRS: C:/Users/Philippe/.conan2/p/libde712e34aa8080e/p/include -- Found PROJ: 1 -- PROJ_TARGET: PROJ::proj -- PROJ_LIBRARIES: PROJ::proj -- PROJ_INCLUDE_DIRS: C:/Users/Philippe/.conan2/p/projfb5f4c991aacc/p/include -- Found TIFF: 1 -- TIFF_TARGET: TIFF::TIFF -- TIFF_LIBRARIES: TIFF::TIFF -- TIFF_INCLUDE_DIRS: C:/Users/Philippe/.conan2/p/libti32b41030ce347/p/include -- Found GeoTIFF: 1 -- GEOTIFF_TARGET: GEOTIFF::GEOTIFF -- GEOTIFF_LIBRARIES: GEOTIFF::GEOTIFF -- GEOTIFF_INCLUDE_DIRS: C:/Users/Philippe/.conan2/p/libgefdf46813eac62/p/include -- Found PNG: 1 -- PNG_TARGET: PNG::PNG -- PNG_LIBRARIES: PNG::PNG -- PNG_INCLUDE_DIRS: C:/Users/Philippe/.conan2/p/libpn4c7e11b5533c7/p/include -- Found JPEG: 1 -- JPEG_TARGET: JPEG::JPEG -- JPEG_LIBRARIES: JPEG::JPEG -- JPEG_INCLUDE_DIRS: C:/Users/Philippe/.conan2/p/libjp24d144e05a2e3/p/include -- Found GIF: 1 -- GIF_TARGET: GIF::GIF -- GIF_LIBRARIES: GIF::GIF -- GIF_INCLUDE_DIRS: C:/Users/Philippe/.conan2/p/gifli04df58af64f03/p/include -- Found JSONC: 1 -- JSONC_TARGET: json-c::json-c -- JSONC_LIBRARIES: json-c::json-c -- JSONC_INCLUDE_DIRS: C:/Users/Philippe/.conan2/p/json-b7aac232324bc/p/include;C:/Users/Philippe/.conan2/p/json-b7aac232324bc/p/include/json-c -- Found JSONC: 1 -- JSONC_TARGET: json-c::json-c -- JSONC_LIBRARIES: json-c::json-c -- JSONC_INCLUDE_DIRS: C:/Users/Philippe/.conan2/p/json-b7aac232324bc/p/include;C:/Users/Philippe/.conan2/p/json-b7aac232324bc/p/include/json-c -- Found QHULL: 1 -- QHULL_TARGET: Qhull::qhullstatic_r -- QHULL_LIBRARIES: Qhull::qhullstatic_r -- QHULL_INCLUDE_DIRS: C:/Users/Philippe/.conan2/p/qhull180ed96150db4/p/include -- Found LERC: 1 -- LERC_TARGET: LERC::LERC -- LERC_LIBRARIES: LERC::LERC -- LERC_INCLUDE_DIRS: C:/Users/Philippe/.conan2/p/lerc96a6f1277551f/p/include -- Found SQLite3: 1 -- SQLITE3_TARGET: SQLite::SQLite3 -- SQLITE3_LIBRARIES: SQLite::SQLite3 -- SQLITE3_INCLUDE_DIRS: C:/Users/Philippe/.conan2/p/sqlitf7bd981d6042f/p/include -- Found GEOS: 1 -- GEOS_TARGET: GEOS::GEOS -- GEOS_LIBRARIES: GEOS::GEOS -- GEOS_INCLUDE_DIRS: C:/Users/Philippe/.conan2/p/geoscdab53393d18c/p/include -- Found OpenCL: 1 -- OPENCL_TARGET: OpenCL::OpenCL -- OPENCL_LIBRARIES: OpenCL::OpenCL -- OPENCL_INCLUDE_DIRS: -- Found rdb: 0 -- RDB_TARGET: -- RDB_LIBRARIES: -- RDB_INCLUDE_DIRS: -- Found Arrow: 1 -- ARROW_TARGET: arrow::arrow -- ARROW_LIBRARIES: arrow::arrow -- ARROW_INCLUDE_DIRS: C:/Users/Philippe/.conan2/p/arrowf2b73ec80167b/p/include CMake Warning at src/cmake/helpers/CheckDependentLibraries.cmake:768 (message): Parquet library found, but not ArrowDataset: partitioned datasets will not be supported Call Stack (most recent call first): src/gdal.cmake:265 (include) src/CMakeLists.txt:246 (include) -- Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 AWT JVM) -- Could NOT find Java (missing: Java_JAVA_EXECUTABLE Java_JAVAC_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVADOC_EXECUTABLE Java_JAVAH_EXECUTABLE Runtime Development) -- Downloading nuget... nuget.exe downloaded and saved to C:/Users/Philippe/.conan2/p/b/gdalbcb0db5894771/b/build/tools/nuget.exe -- Found .NET toolchain: C:/Program Files/dotnet/dotnet.exe (version 8.0.403) -- Found CSharp: .NET -- Performing Test COMPILER_SUPPORTS_CXX17 -- Performing Test COMPILER_SUPPORTS_CXX17 - Failed -- Could NOT find BISON (missing: BISON_EXECUTABLE) -- Looking for sqlite3ext.h -- Looking for sqlite3ext.h - not found CMake Warning at src/ogr/ogrsf_frmts/sqlite/CMakeLists.txt:42 (message): sqlite3ext.h is missing. SQLite VirtualOGR and SQLite SQL dialect will be missing CMake Error at src/ogr/ogrsf_frmts/parquet/CMakeLists.txt:12 (if): if given arguments: "VERSION_GREATER_EQUAL" "10.0" Unknown arguments specified -- Configuring incomplete, errors occurred! gdal/3.8.3: ERROR: Package 'f94e8911f0aacf729ba5cfec32c8f0efe5a7e792' build failed gdal/3.8.3: WARN: Build folder C:\Users\Philippe\.conan2\p\b\gdalbcb0db5894771\b\build ERROR: gdal/3.8.3: Error in build() method, line 652 cmake.configure(build_script_folder=self.source_path.parent) ConanException: Error 1 while executing ```
philiane commented 2 weeks ago

After investigations, I understood that the gdal compilation error came from the non-definition of the Parquet_VERSION variable in the ogr/ogrsf_frmts/parquet/CMakeLists.txt file (line 12). If we initialize this variable (set(Parquet_VERSION 11.0)), the gdal compilation is performed without error.

Luk0r commented 2 weeks ago

same error (linux, gcc), can you elaborate on how you fixed it? Setting "set(Parquet_VERSION 11.0)" in the top level cmake file didn't change anything.

CommanderCRM commented 2 weeks ago

@Luk0r @philiane I've created a PR which, in my opinion, fixes the root cause of this behavior: gdal doesn't know anything about Parquet version because find_package() searches for Arrow and thus gdal "sees" only its main version variable. Maybe it's a byproduct of replace-find-package patch.