Created attachment 640872 [details] build.log.gz Under a "no binutils/gcc symlinks" system (See bug #724454): checking for assembler .type directive... .type $1,@$2 checking for assembler .size directive... .size $1,$2 checking for assembler local label prefix... configure.wrapped: WARNING: "nm" failure configure.wrapped: WARNING: cannot determine local label, using default L L checking for assembler byte directive... .byte checking how to define a 32-bit word... /var/tmp/portage/dev-libs/gmp-6.2.0-r1/work/gmp-6.2.0/configure.wrapped: line 21722: nm: command not found /var/tmp/portage/dev-libs/gmp-6.2.0-r1/work/gmp-6.2.0/configure.wrapped: line 21722: nm: command not found configure.wrapped: error: cannot determine how to define a 32-bit word * Package: dev-libs/gmp-6.2.0-r1 * Repository: gentoo * Maintainer: toolchain@gentoo.org * USE: abi_x86_32 abi_x86_64 amd64 asm cxx elibc_glibc kernel_linux userland_GNU * FEATURES: ccache compressdebug network-sandbox preserve-libs sandbox splitdebug userpriv usersandbox
Created attachment 640874 [details] config.log
It's a problem in NM detection for USE=abi_x86_32. ./configure --host=i686-pc-linux-gnu assumes that 'i686-pc-linux-gnu-nm' exists. Otherwise it falls back to 'nm'. Binutils only installs 'x86_64-pc-linux-gnu-nm' on ARCH=amd64. I think it's multilib.eclass's deficiency: at https://gitweb.gentoo.org/repo/gentoo.git/tree/eclass/multilib.eclass#n486 We don't override NM here but we should. And probably a bunch of other variables like AR.
Sent for review as https://archives.gentoo.org/gentoo-dev/message/31ff4f1b297542b755f11fd930906a18
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd35b529194fdcadf324fd4f0a466a61aa1dfadb commit dd35b529194fdcadf324fd4f0a466a61aa1dfadb Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-05-22 22:36:50 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-05-23 08:17:14 +0000 multilib.eclass: populate AR, NM, RANLIB, OBJDUMP, STRIP, bug #724558 For both multilib and non-multilib profiles binutils provides tools with native CHOST prefix only. For example on amd64 there is only 'x86_64-pc-linux-gnu-nm' and 'nm'. On abi_x86_32 tools are usually configured with --host=i686-pc-linux-gnu. Configure tries i686-pc-linux-gnu-nm, then falls back to 'nm'. The change overrides NM and friends to 'x86_64-pc-linux-gnu-nm' for multilib setup similar to other environment variables. Reported-by: Kent Fredric Closes: https://bugs.gentoo.org/724558 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> eclass/multilib.eclass | 5 +++++ 1 file changed, 5 insertions(+)
(In reply to comment #4) > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > ?id=dd35b529194fdcadf324fd4f0a466a61aa1dfadb > > commit dd35b529194fdcadf324fd4f0a466a61aa1dfadb > Author: Sergei Trofimovich <slyfox@gentoo.org> > AuthorDate: 2020-05-22 22:36:50 +0000 > Commit: Sergei Trofimovich <slyfox@gentoo.org> > CommitDate: 2020-05-23 08:17:14 +0000 > > multilib.eclass: populate AR, NM, RANLIB, OBJDUMP, STRIP, bug #724558 You forgot to update 2 lists of temporarily modified variables above: for v in CHOST CBUILD AS CC CXX F77 FC LD PKG_CONFIG_{LIBDIR,PATH} ; do
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #5) > (In reply to comment #4) > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > > ?id=dd35b529194fdcadf324fd4f0a466a61aa1dfadb > > > > commit dd35b529194fdcadf324fd4f0a466a61aa1dfadb > > Author: Sergei Trofimovich <slyfox@gentoo.org> > > AuthorDate: 2020-05-22 22:36:50 +0000 > > Commit: Sergei Trofimovich <slyfox@gentoo.org> > > CommitDate: 2020-05-23 08:17:14 +0000 > > > > multilib.eclass: populate AR, NM, RANLIB, OBJDUMP, STRIP, bug #724558 > > > You forgot to update 2 lists of temporarily modified variables above: > > for v in CHOST CBUILD AS CC CXX F77 FC LD PKG_CONFIG_{LIBDIR,PATH} ; do I assume you meant https://gitweb.gentoo.org/repo/gentoo.git/tree/eclass/multilib.eclass#n454 """ # First restore any saved state we have laying around. if [[ ${_DEFAULT_ABI_SAVED} == "true" ]] ; then for v in CHOST CBUILD AS CC CXX F77 FC LD PKG_CONFIG_{LIBDIR,PATH} ; do vv="_abi_saved_${v}" [[ ${!vv+set} == "set" ]] && export ${v}="${!vv}" || unset ${v} unset ${vv} done unset _DEFAULT_ABI_SAVED fi # We want to avoid the behind-the-back magic of gcc-config as it # screws up ccache and distcc. See #196243 for more info. if [[ ${ABI} != ${DEFAULT_ABI} ]] ; then # Back that multilib-ass up so we can restore it later for v in CHOST CBUILD AS CC CXX F77 FC LD PKG_CONFIG_{LIBDIR,PATH} ; do vv="_abi_saved_${v}" [[ ${!v+set} == "set" ]] && export ${vv}="${!v}" || unset ${vv} done export _DEFAULT_ABI_SAVED="true" ... """ Looks legit. Do you plan to send a patch?
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1975b0bb9e07557c0a7b06c53b4e78950fe46eda commit 1975b0bb9e07557c0a7b06c53b4e78950fe46eda Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-05-24 20:40:50 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-05-24 21:03:30 +0000 multilib.eclass: save/restore AR, NM, RANLIB, OBJDUMP, STRIP, bug #724558 A follow-up to commit dd35b529194fdc ("populate AR, NM, RANLIB, OBJDUMP, STRIP, bug #724558") Before the change AR and friends were set for non-default ABI and were not restored to defaults for next native ABI. It should not be a problem for default case as both do match. For consistency with other variables now we restore possibly unset values for native ABI. Noticed by Arfrever Frehtes Taifersar Arahesis. Reported-by: Arfrever Frehtes Taifersar Arahesis Bug: https://bugs.gentoo.org/724558 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> eclass/multilib.eclass | 5 +++++ 1 file changed, 5 insertions(+)