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

Clarify message when failing with 'requires v4.7.4' error. #431

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

WardF
Copy link
Member

@WardF WardF commented Feb 12, 2024

There may be an elegant solution, but for now we will just provide instructions alongside the error. When cmake invokes CHECK_LIBRARY_EXISTS() against a static library (such as libnetcdf.a), the dependencies must be specified manually, since there is no way to infer these dependencies with static libraries; this can be handled programmatically in the CMakeLists.txt file, where we check for nc-config and, if present, use the output of nc-config --libs, but for now we will just present this information when encountering this error.

The fix is to set LDFLAGS to the output from nc-config --libs.

…message when using a static libnetcdf library (libnetcdf.a)
@WardF WardF self-assigned this Feb 12, 2024
@WardF WardF merged commit 808e5ac into Unidata:main Feb 12, 2024
21 checks passed
@WardF WardF deleted the static-link-message.wif branch February 12, 2024 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Requires netCDF 4.7.4 or greater, but 4.7.4 is already installed
1 participant