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

netcdf-cxx4 (now cmake build) uses different library names than previous autotools build #44122

Open
4 tasks done
climbfuji opened this issue May 10, 2024 · 2 comments
Open
4 tasks done

Comments

@climbfuji
Copy link
Contributor

Steps to reproduce the issue

Old autotools build:

> ls -l envs/unified-env/install/apple-clang/13.1.6/netcdf-cxx4-4.3.1-2eyxe4b/lib/
total 8896
-rwxr-xr-x  1 heinzell  CIT\Domain Users   405576 Apr  1 13:35 libnetcdf_c++4.1.dylib
-rw-r--r--  1 heinzell  CIT\Domain Users  4142576 Apr  1 13:35 libnetcdf_c++4.a
lrwxr-xr-x  1 heinzell  CIT\Domain Users       22 Apr  1 13:35 libnetcdf_c++4.dylib -> libnetcdf_c++4.1.dylib
drwxr-sr-x  3 heinzell  CIT\Domain Users       96 Apr  1 13:35 pkgconfig

Same version (!!!), new cmake build:

> ls -l envs/unified-env/install/apple-clang/13.1.6/netcdf-cxx4-4.3.1-ul7tkg3/lib/
total 800
drwxr-sr-x  3 heinzell  CIT\Domain Users      96 May 10 10:00 cmake
-rw-r--r--  1 heinzell  CIT\Domain Users     901 May 10 10:00 libnetcdf-cxx.settings
-rwxr-xr-x  1 heinzell  CIT\Domain Users  402339 May 10 10:00 libnetcdf-cxx4.1.1.0.dylib
lrwxr-xr-x  1 heinzell  CIT\Domain Users      26 May 10 10:00 libnetcdf-cxx4.1.dylib -> libnetcdf-cxx4.1.1.0.dylib
lrwxr-xr-x  1 heinzell  CIT\Domain Users      22 May 10 10:00 libnetcdf-cxx4.dylib -> libnetcdf-cxx4.1.dylib

Error message

This creates errors for downstream packages such as met that look for the netcdf-cxx4 libraries with the old names. Having different library names for different build systems but for the same version of a package is not a good idea.

Information on your system

* **Spack:** 0.22.0.dev0 (86d6f90a1d79050c65de98eb72b1e239849b24da)
* **Python:** 3.8.9
* **Platform:** darwin-monterey-m1
* **Concretizer:** clingo

Additional information

n/a

@WardF mentioning you as a maintainer of netcdf-cxx4

General information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have run spack maintainers <name-of-the-package> and @mentioned any maintainers
  • I have uploaded the build log and environment files
  • I have searched the issues of this repo and believe this is not a duplicate
@climbfuji
Copy link
Contributor Author

I think everything up to and including netcdf-cxx4@4.3.1 should keep using the old and proven autotools build system!

@Chrismarsh
Copy link
Contributor

I proposed the move to cmake in #42766 because the mixing of autotools and cmake causes problems where cmake would use a system cmake netcdf-c instead of the autotools netcdf-c or vice versa. I had not noticed the discrepancy in library names, but I also don't use hard-coded library names (which, imo, should always be avoided).

I see this is already flagged upstream in Unidata/netcdf-cxx4#113 as of a few years ago. Curious to see what @WardF thinks. But this and pkgconfig compatibility might be good reason to have the complexity of maintaining both buildsystem code paths

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

No branches or pull requests

2 participants