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

Enhance lib / lib64 library detection for pnetcdf and netcdf #1203

Open
wants to merge 2 commits into
base: hotfix-v8.2.1
Choose a base branch
from

Conversation

islas
Copy link

@islas islas commented Jul 2, 2024

The original additions of checking lib64/ for pnetcdf/netcdf (#592) made assumptions that when the variable supplied for the respective library location, if a lib64/ folder exists to use that. This leads to problems when existence of the actual library is not checked and if a lib64/ folder does exist but the library is not installed there. As this configuration layout is not unusual, the fix is to keep the precedence of lib64/, but check that the library exists within the directory before assigning values.

islas added 2 commits July 1, 2024 17:08
This follows the same logic as before with the added check that a libpnetcdf.*
file exists in the checked directory. The change in logic will now account for
situations where PNETCDF is set to a directory containing both lib/ and lib64/
directories and libpnetcdf.* exists in just the lib/ folder. Should libpnetcdf.*
exist in both directories, the lib64/ still maintains precedence.
As the netcdf library logic mirrors the pnetcdf one, it would suffer
from the same issues noted in 3dab782 about lib/lib64 checking.
This updates the corresponding issue in the netcdf library detection
before it becomes an issue.
@islas
Copy link
Author

islas commented Jul 2, 2024

Future work should consider using pkg-config or any of the pnetcdf-config / nc-config / nf-config to supply the appropriate link / compile flags. This would generally reduce the maintenance burden from rewriting logic that is already provided by those projects. Likewise, this would lean towards more standard package / dependency management rather than project-specific variables.

@mgduda mgduda changed the base branch from master to hotfix-v8.2.1 July 2, 2024 20:02
@mgduda mgduda self-requested a review July 5, 2024 23:11
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.

None yet

2 participants