-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Start with cmake build #629
Conversation
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
@conda-forge-admin, please rerender |
@conda-forge/gdal, I think this is about as far as I can go. The main open question for me now is how to address the Python bindings. Currently, they are built the old way with explicit calls to setup.py. In principle, I would like to build them via CMake as well, but I don't know how to achieve this with the splitting. Then it would be good to double-check that the feature set is not changing and if there is a need to add more parameters to the CMake call. Finally, I wonder what people here think about bringing the https://github.com/conda-forge/gdal-csharp-feedstock into this multi build. All thoughts, comments, and commits are welcome. |
It is a bit annoying but we can list the files that goes into each package. Something like this: So you would build once and then split the resulting files into the outputs. Thanks for all your effort BTW! I'm a nit tied up at the day job but I'll try to see if I can implement that here. |
Thanks for pushing on with this @zklaus. So all the same drivers are built as the old build? Do you know why the test failure on Windows? Happy to consider other language bindings, but |
Good idea. I activated build artifact storage so that we can compare the files with and without Python bindings. Let's see where that gets us; perhaps it's easy.
Good question. I am not sure. From what I see, the cmake build system is a lot smarter about finding things on its own, largely due to the one
This is a problem in the Python bindings. The linker doesn't find gdal-feedstock/recipe/set_bld_opts.bat Lines 11 to 12 in dbc79b9
BLD_OPTS .
I don't think that's true. At least, it uses the same source (see https://github.com/conda-forge/gdal-csharp-feedstock/blob/2d1c8ab84fea6685619bbb697947b4ff795fb32e/recipe/meta.yaml#L9) and the whole csharp binding is in the tree we use. On the other hand, the other feedstock exists and I wouldn't want to infringe on their turf. They do struggle with the cmake based build system as well right now in one of their PRs, but the build script is also rather more involved than what we have here. |
@conda-forge-admin, please rerender |
Do the tests dump the result of Regarding Windows, is this a problem that needs to be reported upstream? Sounds like it should just work with cmake. Happy to defer to @ocefpaf on the csharp question - probably need to resolve that at a higher level. |
If you think building the csharp bindings here is the best option, b/c it is in the source tree and it is easier to maintain, we should:
With that said. I don't use gdal-csharp and I don't have any skin in the game, so I'll leave it to you and the other feedstock team to decided on what is best for all. I can take care of steps 2 and 3 once you make a decision. |
Alright, let's focus on getting the existing things in order first. I'll start a dialog with the other team in parallel. I am still puzzled by the problems in win and the osx-arm64 cross build. Those may be due to the fact that the original osx-arm64 migration was done with the autoconf build. |
@conda-forge-admin, please rerender |
Seems to be copying into the wrong spot? |
@conda-forge-admin, please rerender |
Just rebasing to solve the conflicts. |
Very possible! As you may see from the patches, the last problem I addressed comes from the "Windows native" paths, i.e. the backslashes that are in cmake occasionally interpreted as escape characters, leading to problems like here:
I mention this because one problem with the path you showed is that there is no separator between the drive letter and the rest of the path. If I recall correctly from my Windows experience some 15 years ago, that might be interpreted as a path relative to the CWD on |
@conda-forge-admin, please rerender |
@zklaus where did this get to? Is this more likely to work now that 3.5.1 is out? |
Actually, I think it was fully working. But I did not finish checking that it reproduces the exact same drivers and plugins. |
@conda-forge-admin, please rerender |
Alright, let's get this over with. The last open question seems to be from @gillins
I am not familiar enough with migrators to have an opinion on this. What do others think about it? Is that a reason to wait with the merge or can we do that regardless and set up the migrator after that? |
As far as I understand it, this will just produce a new build of an existing version of gdal. No migration is possible or necessary. Downstream packages that already use this version will now pull in this build. This is why it's very important that the autotools and cmake versions produce compatible libraries (e.g. the same so). I think we can just merge. |
I smashing the big green button here and can take all the blame if this blows up :) |
Hey so this seems to have broken rasterio on Windows and OSX, but not Linux (as far as I can tell). I've been able to reproduce it on CI and am asking coworkers with macs to test it. You can see my ramblings in #648 which I thought was the original problem. Edit: Can work on an issue when I get confirmation of the reproducer.
Edit 2: Having trouble getting this reproducer to fail on real metal intel mac or M1 mac. Only failed so far on github actions osx-latest. |
FYI this also broke source installs for pyogrio on Windows because of the library name change (gdal_i.lib -> gdal.lib), see geopandas/pyogrio#158 (comment) (but don't yet know if conda-forge binaries are failing as well) |
I can confirm that this has also broken Fiona on Windows and MacOS. In both cases, I see the following error on geopandas' CI:
|
Pyogrio is also failing. This gives a more useful error message compared to the one from Fiona above, at least on macOS (https://github.com/geopandas/geopandas/actions/runs/3108750437/jobs/5038295919):
So it seems that on MacOS the library name actually changed in the end. And on Windows (https://github.com/geopandas/geopandas/actions/runs/3108750437/jobs/5038296097):
|
You'll have to mark these packages as broken ASAP. See https://github.com/conda-forge/admin-requests/ |
_ogr.cpython-38-darwin.so was not rebuilt against the updated GDAL conda-forge package, right ? It is well possible that there are differences in shared object versionning between cmake and libtool. We tried to emulate libtool SONAME behaviour with cmake for Linux, but libtool behaviour is platform dependent, so probably there's a difference for Mac. So it is likely that a rebuild of GDAL reverse dependencies is needed on conda-forge |
It sounds like the path forward here is to back out this PR from main branch and then wait to take it once GDAL 3.6 is released so that we can take advantage of the pinning against that new release for dependent packages? |
I agree |
I was rebuilding PDAL with build 2 (which I know was declared broken and pulled out), and I was getting an error on windows about msodbcsql17.dll I think GDAL's CMake is maybe greedily pulling in ODBC, but we don't have the windows system dependency needed available to run, just to build. This is another thing to run down as part of the CMake migration. |
So how do we re-open this one again? |
You'll need to set |
See also https://gitlab.kitware.com/cmake/cmake/-/issues/17652 for an explanation |
Ouch, sorry for all the trouble, and thanks for the swift rollback. I am not completely sure that we should wait for 3.6.0, but let's take that as the target for now. I think there are a few points to be addressed:
|
"Deliberate" in the sense that we just use CMake default settings regarding this and not try to emulate exactly previous behaviour. |
Checklist
Reset the build number to0
(if the version changed)conda-smithy
(Use the phrase@conda-forge-admin, please rerender
in a comment in this PR for automated rerendering)Closes #625