https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100324

            Bug ID: 100324
           Summary: gcc-10.2.0 (and earlier) fails to build on x86_64, but
                    has builds just fine aarch64
           Product: gcc
           Version: 10.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: d
          Assignee: ibuclaw at gdcproject dot org
          Reporter: torel at simula dot no
  Target Milestone: ---

I build gcc on multiple architectures natively. Not crosscompiled such as
described in 95317.

Problem: Build of D-lang fails on x86_64, and has for some time.  At the same
time it builds and works fine on aarch64 (Cavium Tx2 CN9980, Kunpeng920-6426).
Same version. Not sure when it started, maybe on gcc-9.

Reproducing: 

mkdir Build-x86_64
cd Build-x86_64

../configure --prefix=/cm/shared/apps/gcc/10.3.0
--enable-languages=c,ada,c++,go,brig,fortran,objc,obj-c++,d
--with-gmp=/cm/shared/apps/gmp/gcc/6.2.1
--with-mpc=/cm/shared/apps/mpc/gcc/1.2.1
--with-mpfr=/cm/shared/apps/mpfr/gcc/4.1.0 --with-gcc-major-version-only
--program-suffix=-10 --enable-shared --enable-linker-build-id
--libexecdir=/cm/shared/apps/gcc/10.3.0/usr/lib --without-included-gettext
--enable-threads=posix --libdir=/cm/shared/apps/gcc/10.3.0/usr/lib --enable-nls
--enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie
--with-system-zlib --with-target-system-zlib --enable-objc-gc=auto
--enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu

make -j 64

Compile stops here:
<snip>

make[4]: Leaving directory
'/home/torel/workspace/GCC/gcc-10_3_0-release/Build-x86_64/x86_64-linux-gnu/x32/zlib'
make[3]: Leaving directory
'/home/torel/workspace/GCC/gcc-10_3_0-release/Build-x86_64/x86_64-linux-gnu/zlib'
make[2]: Leaving directory
'/home/torel/workspace/GCC/gcc-10_3_0-release/Build-x86_64/x86_64-linux-gnu/zlib'
make[2]: Entering directory
'/home/torel/workspace/GCC/gcc-10_3_0-release/Build-x86_64/x86_64-linux-gnu/libphobos'
make "AR_FLAGS=rc" "CC_FOR_BUILD=x86_64-linux-gnu-gcc"
"CC_FOR_TARGET=/home/torel/workspace/GCC/gcc-10_3_0-release/Build-x86_64/./gcc/xgcc
-B/home/torel/workspace/GCC/gcc-10_3_0-release/Build-x86_64/./gcc/"
"CCASFLAGS=-g -O2" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2 -D_GNU_SOURCE"
"CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-g -O2"
"GDC_FOR_TARGET=/home/torel/workspace/GCC/gcc-10_3_0-release/Build-x86_64/./gcc/gdc
-B/home/torel/workspace/GCC/gcc-10_3_0-release/Build-x86_64/./gcc/"
"GDC=/home/torel/workspace/GCC/gcc-10_3_0-release/Build-x86_64/./gcc/gdc
-B/home/torel/workspace/GCC/gcc-10_3_0-release/Build-x86_64/./gcc/
-B/cm/shared/apps/gcc/10.3.0/x86_64-linux-gnu/bin/
-B/cm/shared/apps/gcc/10.3.0/x86_64-linux-gnu/lib/ -isystem
/cm/shared/apps/gcc/10.3.0/x86_64-linux-gnu/include -isystem
/cm/shared/apps/gcc/10.3.0/x86_64-linux-gnu/sys-include   -fchecking=1"
"GDCFLAGS=-O2 -g" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install
-c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c"
"INSTALL_SCRIPT=/usr/bin/install -c" "LDFLAGS=" "LIBCFLAGS=-g -O2"
"LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make" "MAKEINFO=makeinfo
--split-size=5000000 --split-size=5000000 " "PICFLAG=" "PICFLAG_FOR_TARGET="
"SHELL=/bin/sh" "RUNTESTFLAGS=" "exec_prefix=/cm/shared/apps/gcc/10.3.0"
"infodir=/cm/shared/apps/gcc/10.3.0/share/info"
"libdir=/cm/shared/apps/gcc/10.3.0/usr/lib"
"includedir=/cm/shared/apps/gcc/10.3.0/include"
"prefix=/cm/shared/apps/gcc/10.3.0"
"tooldir=/cm/shared/apps/gcc/10.3.0/x86_64-linux-gnu"
"gdc_include_dir=/cm/shared/apps/gcc/10.3.0/usr/lib/gcc/x86_64-linux-gnu/10/include/d"
"AR=x86_64-linux-gnu-ar"
"AS=/home/torel/workspace/GCC/gcc-10_3_0-release/Build-x86_64/./gcc/as"
"LD=/home/torel/workspace/GCC/gcc-10_3_0-release/Build-x86_64/./gcc/collect-ld"
"RANLIB=x86_64-linux-gnu-ranlib"
"NM=/home/torel/workspace/GCC/gcc-10_3_0-release/Build-x86_64/./gcc/nm"
"NM_FOR_BUILD=" "NM_FOR_TARGET=x86_64-linux-gnu-nm" "DESTDIR=" "WERROR="
all-recursive
make[3]: Entering directory
'/home/torel/workspace/GCC/gcc-10_3_0-release/Build-x86_64/x86_64-linux-gnu/libphobos'
Making all in libdruntime
make[4]: Entering directory
'/home/torel/workspace/GCC/gcc-10_3_0-release/Build-x86_64/x86_64-linux-gnu/libphobos/libdruntime'
/bin/sh ../libtool --tag=D   --mode=compile
/home/torel/workspace/GCC/gcc-10_3_0-release/Build-x86_64/./gcc/gdc
-B/home/torel/workspace/GCC/gcc-10_3_0-release/Build-x86_64/./gcc/
-B/cm/shared/apps/gcc/10.3.0/x86_64-linux-gnu/bin/
-B/cm/shared/apps/gcc/10.3.0/x86_64-linux-gnu/lib/ -isystem
/cm/shared/apps/gcc/10.3.0/x86_64-linux-gnu/include -isystem
/cm/shared/apps/gcc/10.3.0/x86_64-linux-gnu/sys-include   -fchecking=1 -fPIC
-Wall  -frelease  -O2 -g  -nostdinc -I ../../../../libphobos/libdruntime -I .
-c -o core/atomic.lo ../../../../libphobos/libdruntime/core/atomic.d
/bin/sh: ../libtool: No such file or directory
Makefile:2280: recipe for target 'core/atomic.lo' failed
make[4]: *** [core/atomic.lo] Error 127
make[4]: Leaving directory
'/home/torel/workspace/GCC/gcc-10_3_0-release/Build-x86_64/x86_64-linux-gnu/libphobos/libdruntime'
Makefile:475: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
'/home/torel/workspace/GCC/gcc-10_3_0-release/Build-x86_64/x86_64-linux-gnu/libphobos'
Makefile:402: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory
'/home/torel/workspace/GCC/gcc-10_3_0-release/Build-x86_64/x86_64-linux-gnu/libphobos'
Makefile:22230: recipe for target 'all-target-libphobos' failed
make[1]: *** [all-target-libphobos] Error 2
make[1]: Leaving directory
'/home/torel/workspace/GCC/gcc-10_3_0-release/Build-x86_64'
Makefile:999: recipe for target 'all' failed
make: *** [all] Error 2
</snip>


Removing D from configure line is of course WorkARound (WAR).

Observation: Building on aarch64 with make -j 256 works like a charm, while on
x86_64 it sometimes stops and I have to continue serially, i.e. only with make.

Any suggestions?


--Tor

Reply via email to