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

Detect inability to link to netcdf-c library at configure time #124

Merged

Conversation

edhartnett
Copy link
Contributor

@edhartnett edhartnett commented Feb 13, 2019

Fixes #123.

We have been getting some reports of netcdf-fortran build problems with static libraries.

Everyone is using static because pnetcdf now build static-only by default, so anyone including pnetcdf runs into the problem that they cannot build shared libraries if pnetcdf is static-only. The best answer is to rebuild pnetcdf with --enable-shared, but instead, people build netcdf-c and netcdf-fortran with --disable-shared.

Static only builds work fine in netcdf-fortran, but when not all necessary library locations are specified in LDFLAGS, the build fails in a confusing way. Instead of detecting the problem during the configure step, it is ignored by configure and the user sees the problem as a linking error.

The answer is to fail out in configure if the netcdf-c library cannot be linked due to missing arguments in LDFLAGS. This allows the user to sort out their flags and try again.

This PR accomplishes that change.

@WardF WardF merged commit ed42050 into Unidata:master Feb 13, 2019
@edhartnett edhartnett deleted the ejh_static_builds branch February 13, 2019 17:34
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.

2 participants