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

CMake soversion differs from Autotools #475

Open
opoplawski opened this issue Jan 31, 2024 · 4 comments
Open

CMake soversion differs from Autotools #475

opoplawski opened this issue Jan 31, 2024 · 4 comments
Assignees
Labels
Component - Build CMake, Autotools Component - C Library Core C library issues Priority - 0. Blocker ⛔ This MUST be merged for the release to happen Type - Improvement Improvements that don't add a new feature or functionality
Milestone

Comments

@opoplawski
Copy link

The autotools build creates a library with a soversion of 0 (soname of libdf.so.0), but the cmake build makes one with a soversion of 4 (soname of libdf.so.4). Why? Shouldn't the libraries be equivalent?

@byrnHDF
Copy link
Collaborator

byrnHDF commented Jan 31, 2024

Unfortunately, hdf4 never had versioning.

@derobins derobins added Component - Build CMake, Autotools Component - C Library Core C library issues Type - Improvement Improvements that don't add a new feature or functionality Priority - 0. Blocker ⛔ This MUST be merged for the release to happen labels Feb 1, 2024
@derobins derobins added this to the 4.3.0 milestone Feb 1, 2024
@opoplawski
Copy link
Author

Interesting, I think I just realized that the library name itself changed as well from libdf to libhdf. Is that right? That's quite the change.

@derobins
Copy link
Member

The name change was an oversight when CMake was added

@derobins derobins moved this to In Progress in HDF4 4.3.0 Feb 22, 2024
@derobins derobins modified the milestones: 4.3.0, 4.4.0 Feb 26, 2024
@derobins
Copy link
Member

I looked into this and the problem is that -version-info isn't specified for the Autotools, so you just get 0.0.0 for current.revision.age. If I try to add this flag to libdf and libmfdf, they don't build their shared libraries and I get linkage errors downstream. This appears to be due to the unwise mingling of Fortran 77 and C code in the library source directories, which forces usage of the Fortran linker. We have some hacks to work around this, but it's possible they are conflicting with per-target Automake linker options.

It's possible that this is a solvable problem, even with the weird C/Fortran scheme, but I'm going to kick this to 4.4.0, for release next February, when we'll be reworking the Fortran interface to behave like HDF5's. If I rip out all the Fortran code, I can use -version-info normally, so this problem will hopefully go away in at that time, when I can drag over HDF5's Autotools soversion scheme.

@derobins derobins changed the title Why is the cmake soversion different? CMake soversion differs from Autotools Mar 3, 2024
@derobins derobins removed this from HDF4 4.3.0 Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Build CMake, Autotools Component - C Library Core C library issues Priority - 0. Blocker ⛔ This MUST be merged for the release to happen Type - Improvement Improvements that don't add a new feature or functionality
Projects
None yet
Development

No branches or pull requests

3 participants