New issue
Advanced search Search tips

Issue 647033 link

Starred by 1 user

Issue metadata

Status: Verified
Owner: ----
Closed: Feb 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

glibc: crossdev fails with new installing libc headers for mips.

Project Member Reported by yunlian@chromium.org, Sep 14 2016

Issue description

When I try to upgrade glibc. I got the error when testing chromiumos-sdk.

https://uberchromegw.corp.google.com/i/chromiumos.tryserver/builders/chromiumos-sdk/builds/2013

It fails to build glibc-headers.

/var/tmp/portage/cross-mipsel-cros-linux-gnu/glibc-2.23-r2/work/glibc-2.23/configure --disable-sanity-checks --enable-hacker-mode --without-cvs --disable-werror --enable-bind-now --build=x86_64-pc-linux-gnu --host=mipsel-cros-linux-gnu --with-headers=/usr/mipsel-cros-linux-gnu/usr/include --prefix=/usr --with-bugurl=http://crbug.com/new --enable-add-ons=
configure: loading site script /usr/share/config.site
checking build system type... x86_64-pc-linux-gnu
checking host system type... mipsel-cros-linux-gnu
checking for mipsel-cros-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-pc-linux-gnu-gcc accepts -g... yes
checking for gcc... gcc
checking for mipsel-cros-linux-gnu-readelf... mipsel-cros-linux-gnu-readelf
checking for mipsel-cros-linux-gnu-g++... no
checking for mipsel-cros-linux-gnu-c++... no
checking for mipsel-cros-linux-gnu-gpp... no
checking for mipsel-cros-linux-gnu-aCC... no
checking for mipsel-cros-linux-gnu-CC... no
checking for mipsel-cros-linux-gnu-cxx... no
checking for mipsel-cros-linux-gnu-cc++... no
checking for mipsel-cros-linux-gnu-cl.exe... no
checking for mipsel-cros-linux-gnu-FCC... no
checking for mipsel-cros-linux-gnu-KCC... no
checking for mipsel-cros-linux-gnu-RCC... no
checking for mipsel-cros-linux-gnu-xlC_r... no
checking for mipsel-cros-linux-gnu-xlC... no
checking for g++... g++
configure: WARNING: using cross tools not prefixed with host triplet
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether g++ can link programs... yes
checking for sysdeps preconfigure fragments... aarch64 alpha arm hppa i386 m68k microblaze mips configure: error: Unable to determine ABI.
 * ERROR: cross-mipsel-cros-linux-gnu/glibc-2.23-r2::crossdev failed (configure phase):

When building libc-headers, there is no compiler yet. It chooses the host compiler instead. In the 

sysdeps/mips/preconfigure

It has the following script to test the ABI. Because at this time, the $CC is set to x86_64-pc-linux-gnu-gcc, so it could not find mips information from the compiler and the error happens.

case "$machine" in
mips*)
        abiflag=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define _MIPS_SIM \(.*\)/\1/p'`
        mips16flag=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define __mips16 \(.*\)/\1/p'`
        echo "$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define _MIPS_SIM \(.*\)/\1/p'"
        base_machine=mips
        if test "$abiflag" = "_ABIO32" ; then
                if test "$mips16flag" = "1" ; then
                        machine=mips/mips32/mips16
                else
                        machine=mips/mips32
                fi
        elif test "$abiflag" = "_ABIN32" ; then
                machine=mips/mips64/n32
        elif test "$abiflag" = "_ABI64" ; then
                machine=mips/mips64/n64
        else
                as_fn_error $? "Unable to determine ABI." "$LINENO" 5
        fi

 
Summary: glibc: crosdev fails with new installing libc headers for mips. (was: glibc: crosdev fails with new glibc)
It seems that I need to update some files under eblits dir, will try that first.

Comment 4 by vapier@chromium.org, Sep 20 2016

i vaguely recall fixing this in the glibc ebuild.  see:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34b6c39b5395f3475477bba386108fbbf8b8fbdf

please verify that you've updated everything properly first.
I could not open the commit #4 provides.
I used the latest checkout of glibc from gentoo upstream and the problem is still there.
This fix is already in my checkout and error is still there.

Comment 8 by vapier@chromium.org, Sep 20 2016

you can also try the crossdev bump:
  https://chromium-review.googlesource.com/386946

but either way, i'm not sure patching glibc is required.  last i looked, it was working in Gentoo, and i recall doing it this year.
The new crossdev does not solve this problem.
Summary: glibc: crossdev fails with new installing libc headers for mips. (was: glibc: crosdev fails with new installing libc headers for mips.)
i've pushed this change upstream:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43e0e8838d4f259a2c9252da59649de4677f36f1

this way it only affects building the glibc headers and not building the full glibc later on
Status: Fixed (was: Untriaged)

Comment 12 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 13 by dchan@google.com, May 30 2017

Labels: VerifyIn-60
Labels: VerifyIn-61
Status: Verified (was: Fixed)
Closing. Please reopen it if its not fixed. Thanks!

Sign in to add a comment