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

Bug#857074: gcc-7: fails to build with DEB_STAGE=rtlibs: dpkg-gencontrol: error: package gcc-7-<triplet>-base not in control info



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

Hi Matthias,

trying to build gcc-7 with DEB_STAGE=rtlibs results in an error over
here. A nios2 build[1] fails with:

| DEB_HOST_ARCH=nios2 dh_gencontrol -pgcc-7-nios2-linux-gnu-base -- -v7-20170226-1 '-Vlibgcc:Version=1:7-20170226-1' '-Vgcc:Version=7-20170226-1' '-Vgcc:EpochVersion=1:7-20170226-1' '-Vgcc:SoftVersion=7' '-Vgdc:Version=' '-Vgnat:Version=7-20170226-1' '-Vgnat:SoftVersion=7' '-Vbinutils:Version=2.28' '-Vdep:libgcc=libgcc1 (>= 1:7-20170226-1)' '-Vdep:libgccdev=libgcc-7-dev (= 7-20170226-1)' '-Vdep:libgccbiarch=' '-Vdep:libgccbiarchdev=' '-Vdep:libc=libc6 (>= 2.11)' '-Vdep:libcdev=libc6-dev (>= 2.13-5)' '-Vdep:libcbiarch=' '-Vdep:libcbiarchdev=' '-Vdep:libunwinddev=' '-Vdep:libcxxbiarchdev=' '-Vdep:libcxxbiarchdbg=' '-Vdep:libgnat=' '-Vbase:Breaks=gcc-4.4-base (<< 4.4.7), gcc-4.7-base (<< 4.7.3), gcj-4.4-base (<< 4.4.6-9~), gnat-4.4-base (<< 4.4.6-3~), gcj-4.6-base (<< 4.6.1-4~), gnat-4.6 (<< 4.6.1-5~)' '-Vdep:libgomp=libgomp1 (>= ${gcc:Version})' '-Vdep:libatomic=libatomic1 (>= ${gcc:Version})' '-Vdep:libx32z=' '-Vdep:gdccross=gdc-7 (>= 7)' '-Vdep:libcc1=libcc1-0 (>= ${gcc:SoftVersion})' '-Vconfl:lib32=libc6-i386 (<< 2.9-22)' '-Vmultiarch:breaks=gcc-4.3 (<< 4.3.6-1), gcc-4.4 (<< 4.4.6-4), gcc-4.5 (<< 4.5.3-2)' '-Vgolang:Conflicts=golang-go (<< 2:1.3.3-1ubuntu2)' '-VBuilt-Using=' '-Vfortran:mod-version=gfortran-mod-14' 
| 	install -d debian/gcc-7-nios2-linux-gnu-base/DEBIAN
| 	echo misc:Depends= >> debian/gcc-7-nios2-linux-gnu-base.substvars
| 	echo misc:Pre-Depends= >> debian/gcc-7-nios2-linux-gnu-base.substvars
| 	dpkg-gencontrol -pgcc-7-nios2-linux-gnu-base -ldebian/changelog -Tdebian/gcc-7-nios2-linux-gnu-base.substvars -Pdebian/gcc-7-nios2-linux-gnu-base -v7-20170226-1 -Vlibgcc:Version=1:7-20170226-1 -Vgcc:Version=7-20170226-1 -Vgcc:EpochVersion=1:7-20170226-1 -Vgcc:SoftVersion=7 -Vgdc:Version= -Vgnat:Version=7-20170226-1 -Vgnat:SoftVersion=7 -Vbinutils:Version=2.28 "-Vdep:libgcc=libgcc1 (>= 1:7-20170226-1)" "-Vdep:libgccdev=libgcc-7-dev (= 7-20170226-1)" -Vdep:libgccbiarch= -Vdep:libgccbiarchdev= "-Vdep:libc=libc6 (>= 2.11)" "-Vdep:libcdev=libc6-dev (>= 2.13-5)" -Vdep:libcbiarch= -Vdep:libcbiarchdev= -Vdep:libunwinddev= -Vdep:libcxxbiarchdev= -Vdep:libcxxbiarchdbg= -Vdep:libgnat= "-Vbase:Breaks=gcc-4.4-base (<< 4.4.7), gcc-4.7-base (<< 4.7.3), gcj-4.4-base (<< 4.4.6-9~), gnat-4.4-base (<< 4.4.6-3~), gcj-4.6-base (<< 4.6.1-4~), gnat-4.6 (<< 4.6.1-5~)" "-Vdep:libgomp=libgomp1 (>= \${gcc:Version})" "-Vdep:libatomic=libatomic1 (>= \${gcc:Version})" -Vdep:libx32z= "-Vdep:gdccross=gdc-7 (>= 7)" "-Vdep:libcc1=libcc1-0 (>= \${gcc:SoftVersion})" "-Vconfl:lib32=libc6-i386 (<< 2.9-22)" "-Vmultiarch:breaks=gcc-4.3 (<< 4.3.6-1), gcc-4.4 (<< 4.4.6-4), gcc-4.5 (<< 4.5.3-2)" "-Vgolang:Conflicts=golang-go (<< 2:1.3.3-1ubuntu2)" -VBuilt-Using= -Vfortran:mod-version=gfortran-mod-14
| dpkg-gencontrol: error: package gcc-7-nios2-linux-gnu-base not in control info
| dh_gencontrol: dpkg-gencontrol -pgcc-7-nios2-linux-gnu-base -ldebian/changelog -Tdebian/gcc-7-nios2-linux-gnu-base.substvars -Pdebian/gcc-7-nios2-linux-gnu-base -v7-20170226-1 -Vlibgcc:Version=1:7-20170226-1 -Vgcc:Version=7-20170226-1 -Vgcc:EpochVersion=1:7-20170226-1 -Vgcc:SoftVersion=7 -Vgdc:Version= -Vgnat:Version=7-20170226-1 -Vgnat:SoftVersion=7 -Vbinutils:Version=2.28 -Vdep:libgcc=libgcc1 (>= 1:7-20170226-1) -Vdep:libgccdev=libgcc-7-dev (= 7-20170226-1) -Vdep:libgccbiarch= -Vdep:libgccbiarchdev= -Vdep:libc=libc6 (>= 2.11) -Vdep:libcdev=libc6-dev (>= 2.13-5) -Vdep:libcbiarch= -Vdep:libcbiarchdev= -Vdep:libunwinddev= -Vdep:libcxxbiarchdev= -Vdep:libcxxbiarchdbg= -Vdep:libgnat= -Vbase:Breaks=gcc-4.4-base (<< 4.4.7), gcc-4.7-base (<< 4.7.3), gcj-4.4-base (<< 4.4.6-9~), gnat-4.4-base (<< 4.4.6-3~), gcj-4.6-base (<< 4.6.1-4~), gnat-4.6 (<< 4.6.1-5~) -Vdep:libgomp=libgomp1 (>= ${gcc:Version}) -Vdep:libatomic=libatomic1 (>= ${gcc:Version}) -Vdep:libx32z= -Vdep:gdccross=gdc-7 (>= 7) -Vdep:libcc1=libcc1-0 (>= ${gcc:SoftVersion}) -Vconfl:lib32=libc6-i386 (<< 2.9-22) -Vmultiarch:breaks=gcc-4.3 (<< 4.3.6-1), gcc-4.4 (<< 4.4.6-4), gcc-4.5 (<< 4.5.3-2) -Vgolang:Conflicts=golang-go (<< 2:1.3.3-1ubuntu2) -VBuilt-Using= -Vfortran:mod-version=gfortran-mod-14 returned exit code 255

When DEB_STAGE=rtlibs, debian/rules.defs sets the TS variable to an
empty string. This is propagated to m4 and thus the base package in
debian/control ends up without a target suffix. I think this is correct,
because rtlibs mostly tries to mimic a reduced cross build (not cross
compiler build). However, the make variable p_base includes the target
suffix as DEB_CROSS is set to yes. The attached patch fixes the value of
p_base when DEB_STAGE is set to rtlibs. Please consider applying it.

Helmut

[1] https://jenkins.debian.net/job/rebootstrap_nios2_gcc7_supported/3/console
--- a/debian/rules2
+++ b/debian/rules2
@@ -1822,7 +1822,7 @@
   pkg_ver := -$(BASE_VERSION)
 endif
 
-ifneq ($(DEB_CROSS),yes)
+ifeq ($(if $(filter yes,$(DEB_CROSS)),$(if $(filter rtlibs,$(DEB_STAGE)),native,cross),native),native)
   p_base = gcc$(pkg_ver)-base
   p_lbase = $(p_base)
   p_xbase = gcc$(pkg_ver)-base

Reply to: