-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
CMake Path parsing error on windows in gdal 3.9.0 while trying to specify absulut libsqlite3.a path #9935
Comments
This could potentially be related to the change of 66239c2 where find_path() and find_library() are no longer run if the user provides SQLite3_INCLUDE_DIR and SQLite3_LIBRARY. Perhaps those did some path rewriting from backslash to forward slash? (EDIT: answering myself after experimenting: they do) |
@weiznich Could you try the following patch ? Although it feels a bit ugly to have to do that, and I feel like it is a CMake bug (but I cannot reproduce an error with CheckSymbolExists() on Windows with
Perhaps @dg0yt has some clues |
Garbage in:
garbage out.
No! |
Admittedly,
doesn't mix separators. IIRC filepath type cache variables as managed by |
Maybe passing the type along the variable name might be enough to trigger a good conversion? -"-DSQLite3_LIBRARY=D:\\a\\gdal\\gdal\\target\\debug\\build\\libsqlite3-sys-73bcbd616e04c6d1\\out\\libsqlite3.a"
+"-DSQLite3_LIBRARY:FILEPATH=D:\\a\\gdal\\gdal\\target\\debug\\build\\libsqlite3-sys-73bcbd616e04c6d1\\out\\libsqlite3.a" |
indeed. @zjyhjqs are you sure 66239c2 was needed ? CMake documentation states that if variables that store the result of find_path / find_library are already set, "the search will not be repeated unless the variable is cleared", so I would assume that PC_SQLITE3_LIBRARY_DIRS should be ignored i you specify already SQLite3_LIBRARY |
It should be safely removed given that the search will not be repeated in this case. Pkgconfig (
––– IMO, the error from this issue post is caused by the wrong input. The path separator |
Thanks for your fast response. |
cf 0913d9f |
Did you test the |
I didn't try that as there was no easy way to pass that argument from the rust build script. |
What is the bug?
There seems to be an path parsing issue with the gdal cmake script on windows. It does not seem to accept paths like
C:\a\gdal\gdal\target\debug\build\libsqlite3-sys-73bcbd616e04c6d1\out\libsqlite3.a
as config optionsSteps to reproduce the issue
This will build gdal version 3.9.0 as part of the rust build.
This outputs the following error message:
See here for the full build log, including config flags, etc.
Versions and provenance
GDAL version: 3.9.0
Operating system: Windows server 2022 (Github Actions windows-latest image)
Additional context
This was discovered while trying to provide bundling support (auto building) for the rust gdal crate. It previously worked with the 3.8.4 (c2d2a61)
The text was updated successfully, but these errors were encountered: