From: Romain Naour Date: Thu, 23 Jul 2020 00:05:32 +0200 Subject: [Buildroot] [PATCH 2/4] package/localedef: use upstream glibc version In-Reply-To: <20200721212729.41a9374e@windsurf.home> References: <20200720164723.359198-1-romain.naour@gmail.com> <20200720164723.359198-2-romain.naour@gmail.com> <20200721212729.41a9374e@windsurf.home> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Hello, Le 21/07/2020 ? 21:27, Thomas Petazzoni a ?crit?: > Hello, > > On Mon, 20 Jul 2020 18:47:21 +0200 > Romain Naour wrote: > >> From: "Yann E. MORIN" >> >> Since the upstream version and site are always defined in Kconfig now, >> they are always available, so we can use them to define the localedef >> version and site. We also change the localedef hash file to be a >> symlink to the glibc one. >> >> Now, there is no manual action to do to keep localedef and glibc in >> sync for the internal toolchain. >> >> External toolchains will use the upstream glibc version (as is currently >> the case already); with some luck, it is good enough if the external >> toolchain is not too old (2.26 or older may have issues, but there's >> nothing we can do as we can't know what version is used). >> >> Additionally, for some architectures, the internall toolchain uses a >> forked glibc tree. In theory, we would also want to use the localedef >> from those trees, but that would mean we would have to carry a patch for >> each, to be able to build only localedef. This is highly inpractical. >> >> However, those architectures are close enought to upstream that upstream >> localedef is compatible. Besides, the current behaviour is already to >> use an upstream localedef for those architectures anyway, so we keep >> doing that. >> >> Signed-off-by: Yann E. MORIN >> Signed-off-by: Romain Naour > > Unfortunately, this breaks building host-localedef for external > toolchains. Indeed, package/glibc/Config.in is only included in the > Config.in machinery when the internal toolchain backend is used. I'm > not sure what is the best way to solve this. Indeed... > Another concern is that this change doesn't make it as "transparent" as > it seems to update the glibc version: the idea was that changing > BR2_GLIBC_VERSION_UPSTREAM would be sufficient, and localedef would > automatically use that new version. Unfortunately, this doesn't work > due to the hash file of localedef: > > package/localedef/2.30-67-g4748829f86a458b76642f3e98b1d80f7b868e427/localedef.hash -> ../../glibc/2.30-67-g4748829f86a458b76642f3e98b1d80f7b868e427/glibc.hash > > This symlink anyway needs to be updated in localedef whenever > BR2_GLIBC_VERSION_UPSTREAM is changed. > > With PATCH 3/4 in this series, it becomes worse as another symlink is > needed for the other glibc version that we would support. > > Another concern with localedef, though not related to this series, is > that with external toolchains, you don't know which glibc version is > used in the toolchain. We may need a post-2.27 localedef, or a pre-2.27 > localedef. I'm not sure how to solve that though. Random thought: for > the internal toolchains, have a host-glibc package that builds > localedef for the host, so that its version is naturally in sync with > the target glibc. For external toolchains, have the host-localedef > package with a version choice between different upstream glibc > versions, and it's up to the user to select the right thing ? I'm not sure how we can check if the localedef version is compatible with the external toolchain glibc version (add a check in toolchain/helpers.mk?). We only have BR2_TOOLCHAIN_USES_GLIBC to know it's a glibc toolchain. I'm not sure we want to introduce BR2_TOOLCHAIN_GLIBC_AT_LEAST_x_xx just to build the right localedef version. > > Overall, this is quite complicated, and it's annoying to keep glibc > 2.31 unsupported because of this. To me, it feels like glibc 2.31 has > been around for quite a while now. Why not just make the jump, keep a > single glibc version that we bump to 2.31 ? This was the initial question: http://lists.busybox.net/pipermail/buildroot/2020-April/279015.html Initially I didn't take into acount the host-localedef problem, In previous series version host-localedef was at the same version as the latest upstream glibc. My concern is about having only one glibc version choice (the latest) to build the internal toolchain. It's pity to block on host-localedef problem not related to the glibc version choice. Note, glibc 2.32 will be released next week (2020-08-01). Maybe we should merge the glibc version bump without introducing the version choice now and wait for glibc 2.32 version bump series. Best regards, Romain > > Thomas >