-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
gdal can not build with odbc on window #26210
Comments
Hi @liyq0307 - which conan command are you running, on which platform/versions (see the issue template), and what is the output? Thanks! |
When I compile the gdal library with the command "conan create . gdal/3.8.3@ -s compiler="Visual Studio" -s build_type=Release -s arch=x86_64 -s compiler.version=17", if "with_odbc": True is set, the error : "here are invalid packages (packages that cannot exist for this configuration):odbc/2.3.11: Invalid ID: odbc is a system lib on Windows will be thrown"; if "with_odbc": True is set and self.requires("odbc/2.3.11") is commented out:" CMake Error at src/cmake/helpers/CheckDependentLibraries.cmake:201 (message):Configured to use ODBC", but not found, what should I do in Windows? |
Indeed, it's an issue of gdal >= 3.5.0 recipe, it doesn't properly handle odbc on Windows. When host OS is Windows, it doesn't make sense to depend on odbc recipe (which is actually unixodbc), odbc library is a system library on Windows. It can be fixed by using the same logic as gdal < 3.5.0 recipe: conan-center-index/recipes/gdal/pre_3.5.0/conanfile.py Lines 276 to 277 in 4622ac8
conan-center-index/recipes/gdal/pre_3.5.0/conanfile.py Lines 836 to 843 in 4622ac8
|
Thanks for your reply! |
I think patches in this recipe prevent to find system odbc on windows (injection of this cmake file specifically https://github.com/conan-io/conan-center-index/blob/master/recipes/gdal/post_3.5.0/cmake/ConanFindPackage.cmake). |
What is your question?
gdal can not build with odbc on window,What should I do?
The text was updated successfully, but these errors were encountered: