libdl.so missing in impish and jammy

Bug #1951340 reported by Steve Langasek
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
glibc (Ubuntu)
Invalid
High
Unassigned
Impish
Invalid
High
Unassigned
Jammy
Invalid
High
Unassigned

Bug Description

In impish and later, libc6-dev is missing the libdl.so symlink to the shared library, only shipping libdl.a. Anything trying to link against -ldl will surprisingly get static linkage.

I noticed this because it causes openems to FTBFS, because previously-built libraries have hard-coded references to the libdl.so that causes reverse-dependencies to fail to link:

[ 94%] Building CXX object CMakeFiles/QCSXCAD.dir/qrc_resources.cpp.o
/usr/bin/c++ -DGIT_VERSION=\"v0.6.2\" -DQCSXCAD_EXPORTS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -DTIXML_USE_STL -DvtkDomainsChemistry_AUTOINIT="1(vtkDomainsChemistryOpenGL2)" -DvtkFiltersCore_AUTOINIT="1(vtkFiltersParallelDIY2)" -DvtkFiltersFlowPaths_AUTOINIT="1(vtkFiltersParallelFlowPaths)" -DvtkIOExodus_AUTOINIT="1(vtkIOParallelExodus)" -DvtkIOGeometry_AUTOINIT="1(vtkIOMPIParallel)" -DvtkIOImage_AUTOINIT="1(vtkIOMPIImage)" -DvtkIOParallel_AUTOINIT="1(vtkIOMPIParallel)" -DvtkIOSQL_AUTOINIT="2(vtkIOMySQL,vtkIOPostgreSQL)" -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL2)" -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL2)" -DvtkRenderingFreeType_AUTOINIT="2(vtkRenderingFreeTypeFontConfig,vtkRenderingMatplotlib)" -DvtkRenderingLICOpenGL2_AUTOINIT="1(vtkRenderingParallelLIC)" -DvtkRenderingOpenGL2_AUTOINIT="1(vtkRenderingGL2PSOpenGL2)" -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL2)" -I/<<BUILDDIR>>/openems-0.0.35+git20190103.6a75e98+dfsg.1/QCSXCAD/build/QCSXCAD_autogen/include -I/<<BUILDDIR>>/openems-0.0.35+git20190103.6a75e98+dfsg.1/debian/tmp/usr/include/CSXCAD -I/usr/include/vtk-7.1 -I/usr/include/freetype2 -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/include/python3.9 -I/usr/include/hdf5/openmpi -I/usr/include/jsoncpp -I/usr/include/libxml2 -I/usr/include/tcl -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt5/QtXml -g -fPIC -fPIC -MD -MT CMakeFiles/QCSXCAD.dir/qrc_resources.cpp.o -MF CMakeFiles/QCSXCAD.dir/qrc_resources.cpp.o.d -o CMakeFiles/QCSXCAD.dir/qrc_resources.cpp.o -c /<<BUILDDIR>>/openems-0.0.35+git20190103.6a75e98+dfsg.1/QCSXCAD/build/qrc_resources.cpp
make[4]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libdl.so', needed by 'libQCSXCAD.so.0.6.2'. Stop.

Tags: fr-1870
Steve Langasek (vorlon)
Changed in glibc (Ubuntu):
importance: Undecided → High
Changed in glibc (Ubuntu Impish):
importance: Undecided → High
tags: added: fr-1870
Revision history for this message
Matthias Klose (doko) wrote :

No, nothing gets static linkage. libdl.a is an empty library:

$ ls -l /usr/lib/x86_64-linux-gnu/libdl.a
-rw-r--r-- 1 root root 8 Sep 28 01:38 /usr/lib/x86_64-linux-gnu/libdl.a

There's nothing to fix in glibc itself. What we need to do is to identify references to libdl.so in all Makefiles, and then just rebuild these packages.

It's also questionable that cmake (?) is adding these dependencies instead of just linking with -ldl ...

Revision history for this message
Florian Weimer (fweimer) wrote :

libdl.a is empty, it exists only to make -ldl work. This is a curiosity in some Cmake-based build systems. We had to do some rebuilds to make those legacy file references go away, for example:

https://bugzilla.redhat.com/show_bug.cgi?id=1977878

Revision history for this message
Steve Langasek (vorlon) wrote :

vtk7 build failure now fixed, so openems is sorted.

Changed in glibc (Ubuntu Impish):
status: New → Invalid
Changed in glibc (Ubuntu Jammy):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.