Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[package] Gdal 3.4.1: Version conflict: libgeotiff libtiff #20843

Closed
NicolasM-Forsk opened this issue Oct 30, 2023 · 6 comments · Fixed by #19298
Closed

[package] Gdal 3.4.1: Version conflict: libgeotiff libtiff #20843

NicolasM-Forsk opened this issue Oct 30, 2023 · 6 comments · Fixed by #19298
Labels
bug Something isn't working

Comments

@NicolasM-Forsk
Copy link

Description

I cannot install any version of GDAL on windows/visual studio 2022 due to dependencies version conflict.

Package and Environment Details

  • Package Name/Version: gdal/3.4.1
  • Operating System+version: Windows 11
  • Compiler+version: MSVC 2022
  • Conan version: conan 2.0.13

Conan profile

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

Steps to reproduce

conan install ../conanfile.txt --output-folder=. --build=missing -pr ..\conan-vs2022.ini -s build_type=Debug

Logs

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Debug
compiler=msvc
compiler.cppstd=20
compiler.runtime=dynamic
compiler.runtime_type=Debug
compiler.version=193
os=Windows

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=14
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=193
os=Windows

======== Computing dependency graph ========
Graph root
conanfile.txt: C:\dev\git\project\conanfile.txt
Requirements
gdal/3.4.1#091106b74f435ebe16fe3f612bcdf0f0 - Cache
json-c/0.17#f863bad3e5c80dc90679092f67bbd680 - Cache
libgeotiff/1.7.1#725bf5f45e55bbcbda4684b492154318 - Cache
ERROR: Version conflict: libgeotiff/1.7.1->libtiff/4.6.0, gdal/3.4.1->libtiff/4.5.1.

@NicolasM-Forsk NicolasM-Forsk added the bug Something isn't working label Oct 30, 2023
@SpaceIm
Copy link
Contributor

SpaceIm commented Oct 30, 2023

Use a conanfile.py instead of a conanfile.txt and add self.requires("libtiff/4.6.0", override=True) in requirements() method.

Version range is added step by step in conancenter, but it will take a while, so I recommend to users to resolve conflicts themselves (with override=True) instead of hoping some recipe update (recipes are updated, but conancenter can't live like this forever, it's impractical, version range will solve conflicts).

@NicolasM-Forsk
Copy link
Author

So dependencies version error is fixed with:

def requirements(self):
    # fix gdal invalid dependencies
    self.requires("libtiff/4.6.0", override=True)
    self.requires("libdeflate/1.19", override=True)
    self.requires("proj/9.3.0", override=True)
    self.requires("sqlite3/3.43.2", override=True)

However, I still encounter build errors. Ex:

C:\Users\bob\.conan2\p\b\gdal7070b2234e96c\b\src\ogr\ogrsf_frmts>cd cad   && nmake /nologo /f makefile.vc   && cd ..   || exit 1
        cl   /nologo /MP%NUMBER_OF_PROCESSORS% /EHsc /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG /W4 /wd4127 /wd4251 /wd4275 /wd4786 /wd4100 /wd4245 /wd4206 /wd4351 /wd4611  /DHAVE_SSE_AT_COMPILE_TIME  -I..\..\..\port -I..\..\..\ogr -I..\..\..\gcore  -I..\..\..\alg -I..\..\..\ogr\ogrsf_frmts  -I..\..\..\gnm -I..\..\..\gnm\gnm_frmts -I..\..\..\apps  -I.. -I..\.. -Ilibopencad /wd4244 /wd4702 /wd4701 /wd4013 /wd4706 /wd4057 /wd4210 /wd4305 -DOCAD_EXTERN=""  -DGNM_ENABLED  -DGDAL_COMPILATION -DNOMINMAX /c ogrcaddriver.cpp gdalcaddataset.cpp ogrcadlayer.cpp vsilfileio.cpp
ogrcaddriver.cpp
gdalcaddataset.cpp
ogrcadlayer.cpp
vsilfileio.cpp
C:\Users\bob\.conan2\p\b\gdal7070b2234e96c\b\src\ogr\ogrsf_frmts\cad\ogrcadlayer.cpp(423): error C2666: 'CADVector::operator ==': overloaded functions have similar conversions
C:\Users\bob\.conan2\p\b\gdal7070b2234e96c\b\src\ogr\ogrsf_frmts\cad\libopencad\cadobjects.h(51): note: could be 'bool CADVector::operator ==(const CADVector &)' (compiling source file ogrcadlayer.cpp)
C:\Users\bob\.conan2\p\b\gdal7070b2234e96c\b\src\ogr\ogrsf_frmts\cad\libopencad\cadobjects.h(51): note: or 'bool CADVector::operator ==(const CADVector &)' [synthesized expression 'y == x'] (compiling source file og

@rconde01
Copy link
Contributor

rconde01 commented Nov 5, 2023

I fixed overloaded functions have similar conversions with gdal/*:compiler.cppstd=14 in my profile...but it seems like you should already be using that? So i'm not sure.

@NicolasM-Forsk
Copy link
Author

I fixed overloaded functions have similar conversions with gdal/*:compiler.cppstd=14 in my profile...but it seems like you should already be using that? So i'm not sure.

Nope, my profile looks like this:

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

Do you think that libopencad is not compatible with C++20?

@NicolasM-Forsk
Copy link
Author

It seems to work with gdal/*:compiler.cppstd=14.

@trns1997
Copy link
Contributor

trns1997 commented Feb 10, 2024

Hey guys,

I am facing i think the same problem but this time on Linux. Here is the output when i try to manually create the gdal package using conan.

Output

➜  post_3.5.0 git:(mass-migration) conan create --version 3.8.3 --profile:host ~/workspace/conan/profiles/pc .

======== Exporting recipe to the cache ========
gdal/3.8.3: Exporting package recipe: /home/thomas/Desktop/conan-center-index/recipes/gdal/post_3.5.0/conanfile.py
gdal/3.8.3: exports: File 'conandata.yml' found. Exporting it...
gdal/3.8.3: Calling export_sources()
gdal/3.8.3: Copied 1 '.py' file: conanfile.py
gdal/3.8.3: Copied 1 '.yml' file: conandata.yml
gdal/3.8.3: Copied 1 '.txt' file: CMakeLists.txt
gdal/3.8.3: Copied 1 '.cmake' file: ConanFindPackage.cmake
gdal/3.8.3: Exported to cache folder: /home/thomas/.conan2/p/gdal110594b5df782/e
gdal/3.8.3: Exported: gdal/3.8.3#deda6fc59dfbe50698fbbcb61a662a25 (2024-02-10 11:31:59 UTC)

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
compiler=gcc
compiler.cppstd=14
compiler.libcxx=libstdc++11
compiler.version=11
os=Linux
[buildenv]
CONAN_CMAKE_GENERATOR=Ninja
CC=/usr/bin/gcc-11
CXX=/usr/bin/g++-11

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu14
compiler.libcxx=libstdc++11
compiler.version=9
os=Linux


======== Computing dependency graph ========
Graph root
    cli
Requirements
    gdal/3.8.3#deda6fc59dfbe50698fbbcb61a662a25 - Cache
    json-c/0.17#f863bad3e5c80dc90679092f67bbd680 - Cache
    libgeotiff/1.7.1#ef2a55dbc032ef6d13598247e2e8fe4b - Cache
ERROR: Version conflict: libgeotiff/1.7.1->libtiff/4.6.0, gdal/3.8.3->libtiff/4.5.1.

Any clues to what is wrong ?

Update

I got it to work with the following settings:

➜  post_3.5.0 git:(migrate/gdal) conan create --version 3.8.3 --profile:host ~/matrice_workspace/src/project3D/conan/profiles/pc --build=missing -s build_type=Release . 

======== Exporting recipe to the cache ========
gdal/3.8.3: Exporting package recipe: /home/thomas/Desktop/conan-center-index/recipes/gdal/post_3.5.0/conanfile.py
gdal/3.8.3: exports: File 'conandata.yml' found. Exporting it...
gdal/3.8.3: Calling export_sources()
gdal/3.8.3: Copied 1 '.py' file: conanfile.py
gdal/3.8.3: Copied 1 '.yml' file: conandata.yml
gdal/3.8.3: Copied 1 '.txt' file: CMakeLists.txt
gdal/3.8.3: Copied 1 '.cmake' file: ConanFindPackage.cmake
gdal/3.8.3: Copied 3 '.patch' files: 2-allow-cycles-in-cmake-targets.patch, 0-replace-find-package.patch, 1-do-not-force-private-linking.patch
gdal/3.8.3: Exported to cache folder: /home/thomas/.conan2/p/gdal563c4a667247e/e
gdal/3.8.3: Exported: gdal/3.8.3#626d745188e89b13723dd7a902dfc833 (2024-02-10 14:13:52 UTC)

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=17
compiler.libcxx=libstdc++11
compiler.version=11
os=Linux
[buildenv]
CONAN_CMAKE_GENERATOR=Ninja
CC=/usr/bin/gcc-11
CXX=/usr/bin/g++-11

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu14
compiler.libcxx=libstdc++11
compiler.version=9
os=Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants