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

Bug#862756: gcc-7 cross compiler build: generated dependencies on multilib libcs unsatisfiable

Source: gcc-7
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap

Hi Matthias,

there is yet another issue with the current cross compiler build (using
-$arch-cross packages, not the with_deps_on_target_arch patchset). In
the unstaged cross compiler build, unannotated dependencies on the
multilib libc packages are emitted. See this installation failure for

| Setting up gcc-7-cross-base (7.1.0-5) ...
| Setting up gcc-7-mips-linux-gnu-base:amd64 (7.1.0-5) ...
| dpkg: dependency problems prevent configuration of lib64atomic1-mips-cross:
|  lib64atomic1-mips-cross depends on libc6-mips64 (>= 2.24); however:
|   Package libc6-mips64 is not installed.
| dpkg: error processing package lib64atomic1-mips-cross (--install):
|  dependency problems - leaving unconfigured
| dpkg: dependency problems prevent configuration of lib64gcc-7-dev-mips-cross:
|  lib64gcc-7-dev-mips-cross depends on lib64atomic1-mips-cross (>= 7.1.0-5); however:
|   Package lib64atomic1-mips-cross is not configured yet.

Here, we can see that lib64atomic1-mips-cross depends on libc6-mips64.
For lib64atomic1, that would be the correct dependency, but for a
dpkg-cross'ed package, it should have transformed the dependency to
libc6-mips64-mips-cross. The updating should happen in a sed expression
transforming the corresponding substvars file in debian/rules.defs. The
attached patch fixes the sed expression.

In principle, this bug also applies to gcc-6, but I don't think it is
worth fixing there.

--- a/debian/rules.defs
+++ b/debian/rules.defs
@@ -1960,7 +1960,7 @@
 	if [ -f debian/$(1).substvars ]; then \
 	  sed -i \
 	    -e 's/:$(DEB_TARGET_ARCH)/$(cross_lib_arch)/g' \
-	    -e 's/\(libc[.0-9]*-[^:]*\):\([a-z0-9-]*\)/\1-\2-cross/g' \
+	    -e 's/\(libc[.0-9]*-[^: ]*\)\(:$(DEB_TARGET_ARCH)\)\?/\1$(cross_lib_arch)/g' \
 	    $(if $(filter armel,$(DEB_TARGET_ARCH)),-e 's/:armhf/-armhf-cross/g') \
 	    $(if $(filter armhf,$(DEB_TARGET_ARCH)),-e 's/:armel/-armel-cross/g') \
 	    debian/$(1).substvars; \

Reply to: