Source: glibc Version: 2.43-7 User: [email protected] Usertags: rebootstrap
Hi Aurelien et al, my request may sound strange. I was the one lobbying for using "...-for-host" dependencies. Now I ask to avoid them. What? Thus far, the early phase of cross bootstrap has largely worked by not paying attention to dependencies too much and just installing whatever looks right. I would like to move away from that. When building glibc stage2 I am faced with not having a gcc-VER-for-host package. Where this package originates is not yet settled. At present, it originates in gcc's stage3 build, but there are good reasons to rather emit it from DEB_STAGE=rtlibs (see #1069065). Either way, the gcc stage1 does not give us that package, so in theory we have a cycle: * src:glibc Build-Depends on gcc-VER-for-host * gcc-VER-for-host originates from src:gcc-VER stage3 or rtlibs * src:gcc-VER stage3 and rtlibs both Build-Depends on libcVER-dev * libcVER-dev originates from src:glibc stage2 Technically speaking, gcc-VER stage1 could produce them, but doing so is not easy. This also is being difficult because both gcc-VER stage1 and stage3 produce a gcc-VER-TRIPLET package that has very different features. For instance, hurd builds a hurd-dev that provides hurd-headers-dev and its stage1 builds hurd-headers-dev instead. With gcc, we cannot tell the stage1 and stage3 compiler apart from the package metadata. Not sure how to fix this, but it is surely going to take long. I found a relatively easy way to enable glibc to replace the -for-host suffix. I am attaching a patch for discussion. With this patch, I can regenerate debian/control in such a way that glibc stage2's Build-Depends actually become satisfiable in the target setting. This is a very valuable feature to me, because it is a step towards being able to build this inside sbuild eventually (rather than the poorly defined build environment that I am using now). Please don't just apply this patch. It surely is sort of a band-aid. Once applied, I don't see too much need for gcc to change urgently, so it would stick in the glibc packaging for quite some time. Do you agree with the problem statement? (Making B-D actually satisfiable) What do you think about the proposed band-aid? Do you see any alternatives worth exploring? (as in you suggest, I explore) Helmut
--- a/debian/control.in/main +++ b/debian/control.in/main @@ -8,8 +8,8 @@ mig-for-host (>= 1.8+git20200618-7~) [hurd-any], gnumach-dev (>= 2:1.8+git20200710-2~) [hurd-any], hurd-dev (>= 1:0.9.git20201127-4~) [hurd-any] | hurd-headers-dev [hurd-any], binutils-for-host, - gcc@DEB_GCC_VERSION@-for-host, gcc@DEB_GCC_VERSION@-multilib [amd64 i386 mips mipsel mipsn32 mipsn32el mips64 mips64el mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el powerpc ppc64 sparc sparc64 x32] <!nobiarch>, - g++@DEB_GCC_VERSION@-for-host <!nocheck>, g++@DEB_GCC_VERSION@-multilib [amd64 i386 mips mipsel mipsn32 mipsn32el mips64 mips64el mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el powerpc ppc64 sparc sparc64 x32] <!nobiarch !nocheck>, + gcc@DEB_GCC_VERSION@@DEB_GCC_PKG_SUFFIX@, gcc@DEB_GCC_VERSION@-multilib [amd64 i386 mips mipsel mipsn32 mipsn32el mips64 mips64el mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el powerpc ppc64 sparc sparc64 x32] <!nobiarch>, + g++@DEB_GCC_VERSION@@DEB_GCC_PKG_SUFFIX@ <!nocheck>, g++@DEB_GCC_VERSION@-multilib [amd64 i386 mips mipsel mipsn32 mipsn32el mips64 mips64el mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el powerpc ppc64 sparc sparc64 x32] <!nobiarch !nocheck>, python3:native, libidn2-0 <!nocheck>, libc-bin (>= @DEB_VERSION_UPSTREAM@) <cross>, --- a/debian/rules +++ b/debian/rules @@ -99,6 +99,9 @@ BASE_MIG = mig # If you override DEB_GCC_VERSION, consider adding DEB_CFLAGS_APPEND=-Wno-error. DEB_GCC_VERSION ?= -15 +# During cross bootstrap, -for-host packages may not exist and a concrete +# architecture may be requested. +DEB_GCC_PKG_SUFFIX ?= -for-host RUN_TESTSUITE = yes TIMEOUTFACTOR = 25 --- a/debian/rules.d/control.mk +++ b/debian/rules.d/control.mk @@ -32,7 +32,7 @@ (echo; cat debian/control.in/mipsn32) >> $@T (echo; cat debian/control.in/mips64) >> $@T (echo; cat debian/control.in/x32) >> $@T - sed -e 's%@libc@%$(libc)%g' -e 's%@DEB_VERSION_UPSTREAM@%$(DEB_VERSION_UPSTREAM)%g' -e 's%@DEB_GCC_VERSION@%$(DEB_GCC_VERSION)%g' < $@T > debian/control + sed -e 's%@libc@%$(libc)%g' -e 's%@DEB_VERSION_UPSTREAM@%$(DEB_VERSION_UPSTREAM)%g' -e 's%@DEB_GCC_VERSION@%$(DEB_GCC_VERSION)%g' -e 's%@DEB_GCC_PKG_SUFFIX@%$(DEB_GCC_PKG_SUFFIX)%g' < $@T > debian/control rm $(addprefix debian/control.in/, $(libc_packages)) rm $@T

