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.
No, nothing gets static linkage. libdl.a is an empty library:
$ ls -l /usr/lib/ x86_64- linux-gnu/ libdl.a x86_64- linux-gnu/ libdl.a
-rw-r--r-- 1 root root 8 Sep 28 01:38 /usr/lib/
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 ...