sys-libs/glibc-2.33-r1 emerge エラー CONFIG_IA32_EMULATION

emerge -uDN @worldをしようとすると、またもやハマりました。
sys-libs/glibcがアップデートできません。

 * ERROR: sys-libs/glibc-2.33-r1::gentoo failed (pretend phase):
 *   CONFIG_IA32_EMULATION must be enabled in the kernel to compile a multilib glibc.

そうですか。
で、調べてみました。

gentoo ~ # grep CONFIG_IA32_EMULATION /usr/src/linux/.config
CONFIG_IA32_EMULATION=y

あら? セットされてますね。
binutilsが古いからという話もあり、過去記事を参考にbinutilsをアップデート。

gentoolinux.hatenablog.com

最新にアップデートしても同じようにコケます。
同じような方がGentoo's Bugzillaにいらっしゃいました。

bugs.gentoo.org

この方は、ebuildのCONFIG_IA32_EMULATIONチェックをコメントアウトしてglibcコンパイル
さらにコメントアウトをもとに戻して再コンパイルし、動作したそうです。

では、私もebuildを改変してみます。

/usr/portage/sys-libs/glibc/glibc-2.33-r1.ebuildの653行目から674行目あたりをすべてコントアウトします。
(↓コメントアウト前ですが、このあたり。)

# ABI-specific checks follow here. Hey, we have a lot more specific conditions that
# we test for...
if ! is_crosscompile ; then
	if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then
		ebegin "Checking that IA32 emulation is enabled in the running kernel"
		echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c"
		local STAT
		if "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then
			"${T}/check-ia32-emulation.elf32"
			STAT=$?
		else
			# Don't fail here to allow single->multi ABI switch
			# or recover from breakage like bug #646424
			ewarn "Failed to compile the ABI test. Broken host glibc?"
			STAT=0
		fi
		rm -f "${T}/check-ia32-emulation.elf32"
		eend $STAT
		[[ $STAT -eq 0 ]] || die "CONFIG_IA32_EMULATION must be enabled in the kernel to compile a multilib glibc."
	fi

fi

このままemergeするとダイジェストでサイズが違うと怒られるので、ebuildコマンドでdigestを改変します。

gentoo ~ # ebuild /usr/portage/sys-libs/glibc/glibc-2.33-r1.ebuild digest

これで、glibcのemergeが走ります。
glibcアップデート後にコメントアウトをもとに戻してもemergeできるのかどうかは、この後実施します。