netcdf-c: major refactoring, new variants and versions#36485
netcdf-c: major refactoring, new variants and versions#36485alalazo merged 45 commits intospack:developfrom
Conversation
|
@skosukhin Apologies, but clicking "Rebase the PR" to trigger tests run resulted in this mess somehow 😟 So, can you please push the branch again and ping me for a review? EDIT: otherwise I can also force push on your branch, if you'd like me to. |
|
@skosukhin Fixed it manually, I rebased and push forced to your branch - since permission was granted for it. |
@skosukhin No, not all the problems are related to the new version, although I can't say which are because I can't get through a single build of any version right now. The current issues seem related to the new variants/dependencies you've added. The first is that the CMake builder was not updated with the appropriate cmake args to handle the |
Co-authored-by: John W. Parent <[email protected]>
|
A quick solution for bzip2 could be to make |
I'm more than happy to remove the dep on bzip2 for Windows for the time being until I have more time to sort that out, but that means disabling the use of bzip2 in netcdf-c entirely for Windows as there is no guarantee that the package will be available to the build. Windows does not vendor compression utilities, only tar. |
But Netcdf-c does. |
Nice, very useful! I wish more libraries did this, would make my life on Windows far easier. In that case, yeah, lets disable an external bzip2 for Windows, but can we get some modeling in Spack indicating that we're using this? For example VTK/Paraview/CMake have a variant for the use of the dependencies they also vendor, as perhaps it would also be useful on unix to have this. Something like: |
|
The usage of vendored libraries that are already spackaged is discouraged as well as the variants that enable it. And I agree with that. UPD: However, I'm fine with using the vendored bzip2 on Windows as a temporary workaround. |
|
And I'm sorry but in my opinion, by making the decision to build libraries from sources on Windows you chose against having easy life :) |
There is already precedent for exceptions to this idiom for reasons that parallel this one. Don't define the other variants, but if we're making this choice IMO it should be clear to the users. Make the variant only available on Windows if need be, but if builds fails because of a bz2 it should be immediately clear where it's coming from as the default assumption would generally be a spack derived bz2. Maybe I'm completely off base here. FWIW I'm likely just going to contribute a CMake system for bz2 as the issues are fairly fundamental (there's no shared option on Windows right now whatsoever) so this fix is going to have to hold up for a while. Edit:
Someone has to build from source to produce the binaries for everyone else, no reason why that process shouldn't be reproduceable... |
If we need a variant, let's make it Windows only. In general, I'd avoid to have platform specific variants creep into other platforms. |
Makes sense/I agree. |
|
@johnwparent please, check whether it works now. As for the platform-specific variant that enables the usage of a vendored library, I don't agree with that but I'm not the one with the merge button here :) |
Running the build now. I also do not have any merge power so I guess someone else gets to make that decision for us! Sorry @alalazo. |
|
@skosukhin The build itself succeeds for both the new version added by this PR and the old version! However the compiler wrapper filters fail on Windows with the stack trace: FWIW I disabled the compiler wrapper filter on the HDF5 package, so we may want to do something like that here. We don't use the Spack compiler wrappers on Windows at the moment anyway, so it's a no-op either way. |
| depends_on("automake", type="build") | ||
| depends_on("libtool", type="build") | ||
| depends_on("m4", type="build") | ||
| del __s |
There was a problem hiding this comment.
This will bite us at some point, when the argument is stored as is by some object 😟 So far they are string and they get transformed to specs internally, so it's fine. I wouldn't try to encourage people to use this idiom.
|
@johnwparent Fine with you to merge this, and have a follow up later? |
I'm on mobile at the moment so I can't tell if my compiler wrappers comments have been addressed. If they have, yes, LGTM! |
|
@johnwparent I don't see changes to So to summarize:
In case we can make |
|
Looks like netcdf-c is already broken in develop (yet another argument for getting the Windows CI on it's feet) so this PR looks great, apologies for the false alarm, as you can see it's bit of a can of worms to keep things functional and stable on Windows at the moment. LGTM! |
johnwparent
left a comment
There was a problem hiding this comment.
Looks great now! Thanks for bearing with me/dealing with Windows!
LGTM
|
@skosukhin - apologies if this isn't the correct place to ask this... Is there a reason you no longer link to libcurl when If I change the package.py as follows, the build works without issue: |
This is a major update for the
netcdf-cpackage. I don't think that we can or should support new versions of the library before we merge this.Brief summary of changes (see commit messages for the full one):
szipandbloscto enable/disable the respective compression plugins and consistent handling of the rest of the plugins (all compression plugins are enabled by default).nczarr_zipto enable/disable the zipfile format storage (disabled by default; NCZarr format itself is unconditionally enabled starting version4.8.1, which is similar to how we currently treat HDF5).byterangeto enable/disable the byte-range I/O (disabled by default).4.9.2.I understand that this PR modifies a lot of things and it might be difficult to review it but the commit history is rather clean and almost every commit in it can become a separate PR if it helps.
Also, I am not ready to support the
CMakebuilder yet (I have only removed a single obviously redundant line of code there). Therefore, the new variants might not work as expected whenbuild_system=cmakeand especially whenplatform=windows.