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

Optionally use system provided netcdf #3184

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

StefanBruens
Copy link

Detect a system wide installed netcdf using pkgconfig and use it, in
case --enable-netcdf=system is specified.

Fixes #1542.

Detect a system wide installed netcdf using pkgconfig and use it, in
case --enable-netcdf=system is specified.

Fixes libMesh#1542.
@@ -27,6 +29,8 @@ AC_DEFUN([CONFIGURE_NETCDF],
])

AS_CASE("${netcdfversion}",
[system], [PKG_CHECK_MODULES([NETCDF], [netcdf >= 4.2])],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to make a local copy of pkg.m4 before we try to use PKG_CHECK_MODULES? My system has it installed, but we don't want bootstrap to rely on anything more than our own contrib/autotools version.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is part of pkgconf, so it should be there already.

From several years of packaging experience, bundled copies only get out of sync with upstream and are a reoccurring PITA.

Copy link
Member

@roystgnr roystgnr Mar 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is part of pkgconf, so it should be there already.

Sadly I have committed the ought-is fallacy and been burned by it too many times to not check, and ... it's almost guaranteed to be available on Ubuntu (It's a dependency for ubuntu-desktop now, of all things? The default GUI now depends on autoconf macros??), but the next system I checked was an OSX laptop, where although everything I need to build (and even bootstrap) libMesh is there, pkg.m4 isn't.

bundled copies only get out of sync with upstream and are a reoccurring PITA.

I can't disagree with this. But adding dependencies willy-nilly has gotten me in trouble too. What does pkg.m4 itself depend on? If it's self-contained (and looks like it is, in a couple hundred lines?) I'd feel safer working with a copy of it than letting people without it break.

@lindsayad
Copy link
Member

Per #3390 we will likely want to do some comparison of netcdf and hdf5 versions so that we can error out during configure if incompatible versions are detected ... although admittedly the incompatibility of netcdf 4.6.2 with hdf5 1.12 appears to only be in netcdf testing of itself and not in our uses of it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please allow external netcdf
3 participants