Summary: | sci-libs/netcdf-4.7.4: hardcodes path to libdl.so in CMake files (was: sci-libs/vtk-9.0.3-r1 fails to build with sys-libs/glibc-2.34-r2 -- missing /usr/lib64/libdl.so symlink) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Michelangelo Scopelliti <kernelpanic> |
Component: | Current packages | Assignee: | Gentoo Science Related Packages <sci> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dan, dflogeras2, egorr.berd, gustav.schaffter, ian, jaak, jouni.kosonen, koprut, posting, proxy-maint, sam, sargastic, waebbl-gentoo |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.archlinux.org/task/73898 https://bugs.gentoo.org/show_bug.cgi?id=839954 |
||
Whiteboard: | Workaround: rebuild netcdf | ||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 851468 | ||
Bug Blocks: | 803482, 843602 | ||
Attachments: |
build log
netCDFTargets.cmake |
Description
Michelangelo Scopelliti
2021-11-24 19:33:39 UTC
I had the same issue on vtk-9.0.3-r2 but was able to resolve this by reemerging sci-libs/netcdf. In my case /usr/lib64/cmake/netCDF/netCDFTargets.cmake added a hard dependency to /usr/lib64/libdl.so instead of /usr/lib64/libdl.a. Recompiling fixed this (manually changing might also work but I rather have the package manager handle this) The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03e409f30d966755e399c476cc7bf2f508cafae4 commit 03e409f30d966755e399c476cc7bf2f508cafae4 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-11-25 01:44:46 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-11-25 01:45:05 +0000 sci-libs/netcdf: add 4.8.1 Doesn't seem to hardcode libdl path anymore which avoids glibc-2.34 issues. Closes: https://bugs.gentoo.org/827188 Signed-off-by: Sam James <sam@gentoo.org> sci-libs/netcdf/Manifest | 1 + .../files/netcdf-4.8.1-big-endian-build.patch | 24 +++++++ sci-libs/netcdf/netcdf-4.8.1.ebuild | 74 ++++++++++++++++++++++ 3 files changed, 99 insertions(+) *** Bug 828020 has been marked as a duplicate of this bug. *** please add '-r1' to current stable netcdf-4.7.4 (In reply to tonich from comment #4) > please add '-r1' to current stable netcdf-4.7.4 Yeah, that seems like a good workaround, but this is kind of tricky. It's not going to fix things unless this new version (not just -r1) is stabled before glibc-2.34 is. (In reply to Sam James from comment #5) > (In reply to tonich from comment #4) > > please add '-r1' to current stable netcdf-4.7.4 > > Yeah, that seems like a good workaround, but this is kind of tricky. It's > not going to fix things unless this new version (not just -r1) is stabled > before glibc-2.34 is. Actually, I'm.. inclined to say this is self-inflicted? We should stable the newer netcdf once it's had more time to soak, but a revbump is only going to help users who keyworded the new glibc up to the point I revbump. It won't help folks who did it after. I also can't reproduce this anymore (I think I could in the past) -- I don't see any libdl reference in /usr/$(get_libdir)/cmake/netCDF/*, so I'm guessing it's fixed in 4.8.1. Please shout if you think it isn't. I was having problems building FreeCAD 0.19.4 this evening which I traced to a similar error with a missing /usr/lib64/libdl.so. Rebuilding netcdf got the FreeCAD ebuild working again, AFAICT (it's compiling now, while earlier it failed at the beginning of compilation). *** Bug 837071 has been marked as a duplicate of this bug. *** (In reply to Sam James from comment #7) > I also can't reproduce this anymore (I think I could in the past) -- I don't > see any libdl reference in /usr/$(get_libdir)/cmake/netCDF/*, so I'm > guessing it's fixed in 4.8.1. > > Please shout if you think it isn't. Not to libdl.so, but the INTERFACE_LINK_LIBRARIES in netCDFTargets.cmake now contains a reference to /usr/lib64/libdl.a instead. It's an empty static library so I'm not entirely sure if it even needs to be there but I suppose it takes care of anyone using -ldl now that those symbols are in the glibc-2.34 itself. (In reply to Jouni Kosonen from comment #10) > (In reply to Sam James from comment #7) > > I also can't reproduce this anymore (I think I could in the past) -- I don't > > see any libdl reference in /usr/$(get_libdir)/cmake/netCDF/*, so I'm > > guessing it's fixed in 4.8.1. > > > > Please shout if you think it isn't. > > Not to libdl.so, but the INTERFACE_LINK_LIBRARIES in netCDFTargets.cmake now > contains a reference to /usr/lib64/libdl.a instead. It's an empty static > library so I'm not entirely sure if it even needs to be there but I suppose > it takes care of anyone using -ldl now that those symbols are in the > glibc-2.34 itself. # grep -rsin "libdl" /usr/lib64/cmake/netCDF # grep -rsin "libdl" /usr/lib64/cmake/netCDF/netCDFTargets.cmake Can you attach your bad CMake* files and I can see about just stripping them at install time for now? (In reply to Sam James from comment #11) > (In reply to Jouni Kosonen from comment #10) > > (In reply to Sam James from comment #7) > > > I also can't reproduce this anymore (I think I could in the past) -- I don't > > > see any libdl reference in /usr/$(get_libdir)/cmake/netCDF/*, so I'm > > > guessing it's fixed in 4.8.1. > > > > > > Please shout if you think it isn't. > > > > Not to libdl.so, but the INTERFACE_LINK_LIBRARIES in netCDFTargets.cmake now > > contains a reference to /usr/lib64/libdl.a instead. It's an empty static > > library so I'm not entirely sure if it even needs to be there but I suppose > > it takes care of anyone using -ldl now that those symbols are in the > > glibc-2.34 itself. > > # grep -rsin "libdl" /usr/lib64/cmake/netCDF > # grep -rsin "libdl" /usr/lib64/cmake/netCDF/netCDFTargets.cmake $ grep libdl /usr/lib64/cmake/netCDF/* /usr/lib64/cmake/netCDF/netCDFTargets.cmake: INTERFACE_LINK_LIBRARIES "/usr/lib64/libhdf5_hl.so;/usr/lib64/libhdf5.so;/usr/lib64/libsz.so;/usr/lib64/libz.so;/usr/lib64/libdl.a;/usr/lib64/libm.so;/usr/lib64/libcurl.so;/usr/lib64/libzip.so" $ ls -l /usr/lib64/libdl.a -rw-r--r-- 1 root root 8 2. Apr 13:04 /usr/lib64/libdl.a $ ar t /usr/lib64/libdl.a $ I just re-emerged netcdf before posting, after I have discovered this as well, to ensure all is up-to-date. Created attachment 769325 [details]
netCDFTargets.cmake
netCDFTargets.cmake for netcdf-4.8.1-r1
# emerge -pqv --usepkg=n netcdf
[ebuild R ] sci-libs/netcdf-4.8.1-r1 USE="dap hdf5 szip tools -doc -examples -hdf -mpi -test"
I encountered this problem also. With sci-libs/netcdf-4.8.1-r1 built on 10.02.2022: stephen@t470 2022-04-21 23:28:12 ~ $ grep -rsin "libdl" /usr/lib64/cmake/netCDF/netCDFTargets.cmake 67: INTERFACE_LINK_LIBRARIES "/usr/lib64/libhdf5_hl.so;/usr/lib64/libhdf5.so;/usr/lib64/libz.so;/usr/lib64/libdl.so;/usr/lib64/libm.so;/usr/lib64/libcurl.so;/usr/lib64/libzip.so" After rebuilding sci-libs/netcdf-4.8.1-r1 on 21.04.2022: stephen@t470 2022-04-21 23:29:55 ~ $ grep -rsin "libdl" /usr/lib64/cmake/netCDF/netCDFTargets.cmake 67: INTERFACE_LINK_LIBRARIES "/usr/lib64/libhdf5_hl.so;/usr/lib64/libhdf5.so;/usr/lib64/libz.so;/usr/lib64/libdl.a;/usr/lib64/libm.so;/usr/lib64/libcurl.so;/usr/lib64/libzip.so" sci-libs/vtk-9.0.3-r4 seems to be building normally now. *** Bug 839954 has been marked as a duplicate of this bug. *** I ran into this bug today, simply rebuilding netcdf-4.8.1-r1 as Stephen Bosch notes in comment #15 seems to help. My netcdf-4.8.1-r1 was previously built on 2022-01-12 with the errant libdl.so listing in /usr/lib64/cmake/netCDF/netCDFTargets.cmake *** Bug 840728 has been marked as a duplicate of this bug. *** I ran into this bug today too, 'emerge -1 netcdf' fixed vtk compilation. I've got: ''' ninja: error: '/usr/lib64/libdl.so', needed by 'lib64/libvtkexodusII-9.1.so.9.1.0', missing and no known rule to make it * ERROR: sci-libs/vtk-9.1.0-r2::gentoo failed (compile phase): * ninja -v -j40 -l32 failed ''' rebuilding netcdf fixed this as Bernd said. (#13) Thank you. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d80313248373f4ba7b2ff7ddb940cac16476129e commit d80313248373f4ba7b2ff7ddb940cac16476129e Author: Sam James <sam@gentoo.org> AuthorDate: 2022-06-08 05:18:39 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-06-08 05:19:38 +0000 sci-libs/netcdf: avoid broken libdl hardcoding Closes: https://bugs.gentoo.org/827188 Signed-off-by: Sam James <sam@gentoo.org> sci-libs/netcdf/netcdf-4.8.1-r2.ebuild | 83 ++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) |