[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1088166: glibc fails to cross build for multilib architectures: dpkg-shlibdeps fails to find multilib libraries



Source: glibc
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap

Hi Aurelien,

since a while I am observing that some multilib-enabled cross builds
fail in dpkg-shlibdeps. Examples:

https://jenkins.debian.net/job/rebootstrap_mips64el_gcc14/6/console
https://jenkins.debian.net/job/rebootstrap_mips64_gcc14/10/console
https://jenkins.debian.net/job/rebootstrap_i386_gcc14_diffoscope/4/console
https://jenkins.debian.net/job/rebootstrap_i386_gcc14_supported_diffoscope/4/console
https://jenkins.debian.net/job/rebootstrap_mips64r6el_gcc14_supported/7/console

The common pattern is failure to locate libc.so.6 in the multilib call
for dpkg-shlibdeps. I think we need to explicitly pass the correct
library directory here. As a result, I came up with the attached
one-line change to the dh_makeshlibs invocation. It looks up the slibdir
for the current pass and appends it via the -l flag. What do you think
about the proposed change? Does it have any downsides? It appears to
practically solve instances of the mentioned problem. Please let me know
if you would like further details to assess the proposed change.

Helmut
--- a/debian/rules.d/debhelper.mk
+++ b/debian/rules.d/debhelper.mk
@@ -109,7 +109,7 @@
 	./debian/shlibs-add-udebs $(curpass)
 
 	dh_installdeb -p$(curpass)
-	dh_shlibdeps -p$(curpass)
+	dh_shlibdeps $(if $($(lastword $(subst -, ,$(curpass)))_slibdir),-l$(CURDIR)/debian/$(curpass)/$($(lastword $(subst -, ,$(curpass)))_slibdir)) -p$(curpass)
 	dh_gencontrol -p$(curpass)
 	if [ $(curpass) = nscd ] ; then \
 		sed -i -e "s/\(Depends:.*libc[0-9.]\+\)-[a-z0-9]\+/\1/" debian/nscd/DEBIAN/control ; \

Reply to: