This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bootstrap/82037] New: powerpc64-unknown-linux-gnu bootstrap breaks in stage2 with gcc/liblto_plugin.so: wrong ELF class: ELFCLASS64


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

            Bug ID: 82037
           Summary: powerpc64-unknown-linux-gnu bootstrap breaks in stage2
                    with gcc/liblto_plugin.so: wrong ELF class: ELFCLASS64
           Product: gcc
           Version: 7.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dclarke at blastwave dot org
  Target Milestone: ---

Debian 8.8 on powerpc64-unknown-linux-gnu thus : 

ppc64$ ../gcc-7.2.0/config.guess 
powerpc64-unknown-linux-gnu
ppc64$ 

ppc64$ uname -a 
Linux charon 3.16.0-4-powerpc64 #1 SMP Debian 3.16.43-2 (2017-04-30) ppc64
GNU/Linux
ppc64$ 

configure looked good : 

ppc64$ ../gcc-7.2.0/configure --build=powerpc64-unknown-linux-gnu \
> --target=powerpc64-unknown-linux-gnu --host=powerpc64-unknown-linux-gnu \
> --enable-targets=powerpc-linux,powerpc64-linux --prefix=/usr/local/gcc7 \
> --disable-nls --enable-threads=posix --enable-shared \
> --with-cpu=970 --enable-bootstrap \
> --enable-libstdcxx-debug --enable-libstdcxx-time=yes \
> --enable-__cxa_atexit --with-system-zlib --enable-objc-gc \
> --enable-multiarch --with-long-double-128 --enable-multilib \
> --enable-stage1-languages=c,c++ --enable-stage1-checking=misc \
> --enable-languages=ada,c,c++,fortran,go,lto,objc,obj-c++ \
> --with-pkgversion='genunix Wed Aug 30 02:32:29 UTC 2017'
checking build system type... powerpc64-unknown-linux-gnu
checking host system type... powerpc64-unknown-linux-gnu
checking target system type... powerpc64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... no
checking for mawk... mawk
checking for libatomic support... yes
checking for libcilkrts support... no
checking for libitm support... yes
checking for libsanitizer support... yes
checking for libvtv support... no
checking for libmpx support... no
checking for libhsail-rt support... no
checking for powerpc64-unknown-linux-gnu-gcc... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for powerpc64-unknown-linux-gnu-g++... no
checking for powerpc64-unknown-linux-gnu-c++... no
checking for powerpc64-unknown-linux-gnu-gpp... no
checking for powerpc64-unknown-linux-gnu-aCC... no
checking for powerpc64-unknown-linux-gnu-CC... no
checking for powerpc64-unknown-linux-gnu-cxx... no
checking for powerpc64-unknown-linux-gnu-cc++... no
checking for powerpc64-unknown-linux-gnu-cl.exe... no
checking for powerpc64-unknown-linux-gnu-FCC... no
checking for powerpc64-unknown-linux-gnu-KCC... no
checking for powerpc64-unknown-linux-gnu-RCC... no
checking for powerpc64-unknown-linux-gnu-xlC_r... no
checking for powerpc64-unknown-linux-gnu-xlC... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether g++ accepts -static-libstdc++ -static-libgcc... yes
checking for powerpc64-unknown-linux-gnu-gnatbind... no
checking for gnatbind... gnatbind
checking for powerpc64-unknown-linux-gnu-gnatmake... no
checking for gnatmake... gnatmake
checking whether compiler driver understands Ada... yes
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1
$$f2
checking for objdir... .libs
configure: WARNING: using in-tree isl, disabling version check
The following languages will be built: c,ada,c++,fortran,go,lto,objc,obj-c++
checking for bdw garbage collector... using bdw-gc in default locations
*** This configuration is not supported in the following subdirectories:
     zlib target-libcilkrts target-libvtv target-libmpx target-libhsail-rt
target-liboffloadmic
    (Any other directories should still work fine.)
checking for default BUILD_CONFIG... bootstrap-debug
checking for --enable-vtable-verify... no
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... expect
checking for runtest... runtest
checking for powerpc64-unknown-linux-gnu-ar... no
checking for ar... ar
checking for powerpc64-unknown-linux-gnu-as... no
checking for as... as
checking for powerpc64-unknown-linux-gnu-dlltool... no
checking for dlltool... no
checking for powerpc64-unknown-linux-gnu-ld... no
checking for ld... ld
checking for powerpc64-unknown-linux-gnu-lipo... no
checking for lipo... no
checking for powerpc64-unknown-linux-gnu-nm... no
checking for nm... nm
checking for powerpc64-unknown-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for powerpc64-unknown-linux-gnu-strip... no
checking for strip... strip
checking for powerpc64-unknown-linux-gnu-windres... no
checking for windres... no
checking for powerpc64-unknown-linux-gnu-windmc... no
checking for windmc... no
checking for powerpc64-unknown-linux-gnu-objcopy... no
checking for objcopy... objcopy
checking for powerpc64-unknown-linux-gnu-objdump... no
checking for objdump... objdump
checking for powerpc64-unknown-linux-gnu-readelf... no
checking for readelf... readelf
checking for powerpc64-unknown-linux-gnu-cc... no
checking for cc... cc
checking for powerpc64-unknown-linux-gnu-c++... no
checking for c++... c++
checking for powerpc64-unknown-linux-gnu-gcc... no
checking for gcc... gcc
checking for powerpc64-unknown-linux-gnu-gfortran... no
checking for gfortran... gfortran
checking for powerpc64-unknown-linux-gnu-gccgo... no
checking for gccgo... no
checking for ar... no
checking for powerpc64-unknown-linux-gnu-ar... no
checking for ar... ar
checking for as... no
checking for powerpc64-unknown-linux-gnu-as... no
checking for as... as
checking for dlltool... no
checking for powerpc64-unknown-linux-gnu-dlltool... no
checking for dlltool... no
checking for ld... no
checking for powerpc64-unknown-linux-gnu-ld... no
checking for ld... ld
checking for lipo... no
checking for powerpc64-unknown-linux-gnu-lipo... no
checking for lipo... no
checking for nm... no
checking for powerpc64-unknown-linux-gnu-nm... no
checking for nm... nm
checking for objcopy... no
checking for powerpc64-unknown-linux-gnu-objcopy... no
checking for objcopy... objcopy
checking for objdump... no
checking for powerpc64-unknown-linux-gnu-objdump... no
checking for objdump... objdump
checking for ranlib... no
checking for powerpc64-unknown-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for readelf... no
checking for powerpc64-unknown-linux-gnu-readelf... no
checking for readelf... readelf
checking for strip... no
checking for powerpc64-unknown-linux-gnu-strip... no
checking for strip... strip
checking for windres... no
checking for powerpc64-unknown-linux-gnu-windres... no
checking for windres... no
checking for windmc... no
checking for powerpc64-unknown-linux-gnu-windmc... no
checking for windmc... no
checking where to find the target ar... host tool
checking where to find the target as... host tool
checking where to find the target cc... just compiled
checking where to find the target c++... just compiled
checking where to find the target c++ for libstdc++... just compiled
checking where to find the target dlltool... host tool
checking where to find the target gcc... just compiled
checking where to find the target gfortran... just compiled
checking where to find the target gccgo... just compiled
checking where to find the target ld... host tool
checking where to find the target lipo... host tool
checking where to find the target nm... host tool
checking where to find the target objcopy... host tool
checking where to find the target objdump... host tool
checking where to find the target ranlib... host tool
checking where to find the target readelf... host tool
checking where to find the target strip... host tool
checking where to find the target windres... host tool
checking where to find the target windmc... host tool
checking whether to enable maintainer-specific portions of Makefiles... no
configure: creating ./config.status
config.status: creating Makefile



Runs through stage1 fine and late in stage2 just after tmp-libgcc.map is
renamed to libgcc.map we see :


mv tmp-libgcc.map libgcc.map
# @multilib_flags@ is still needed because this may use
# /usr/local/build/gcc-7.2.0_linux_3.16.0-4-powerpc64.002/./gcc/xgcc
-B/usr/local/build/gcc-7.2.0_linux_3.16.0-4-powerpc64.002/./gcc/
-B/usr/local/gcc7/powerpc64-unknown-linux-gnu/bin/
-B/usr/local/gcc7/powerpc64-unknown-linux-gnu/lib/ -isystem
/usr/local/gcc7/powerpc64-unknown-linux-gnu/include -isystem
/usr/local/gcc7/powerpc64-unknown-linux-gnu/sys-include    and -O2  -g -O2
-DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem
./include   -fPIC -mlong-double-128 -mno-minimal-toc -g -DIN_LIBGCC2
-fbuilding-libgcc -fno-stack-protector  directly.
# @multilib_dir@ is not really necessary, but sometimes it has
# more uses than just a directory name.
/bin/bash ../../../../gcc-7.2.0/libgcc/../mkinstalldirs 32
mkdir -p -- 32
/usr/local/build/gcc-7.2.0_linux_3.16.0-4-powerpc64.002/./gcc/xgcc
-B/usr/local/build/gcc-7.2.0_linux_3.16.0-4-powerpc64.002/./gcc/
-B/usr/local/gcc7/powerpc64-unknown-linux-gnu/bin/
-B/usr/local/gcc7/powerpc64-unknown-linux-gnu/lib/ -isystem
/usr/local/gcc7/powerpc64-unknown-linux-gnu/include -isystem
/usr/local/gcc7/powerpc64-unknown-linux-gnu/sys-include    -O2  -g -O2 -DIN_GCC
   -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fPIC
-mlong-double-128 -mno-minimal-toc -g -DIN_LIBGCC2 -fbuilding-libgcc
-fno-stack-protector  -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1
-Wl,--version-script=libgcc.map -o 32/libgcc_s.so.1.tmp -g -O2 -m32 -B./
addsf3_s.o subsf3_s.o negsf2_s.o mulsf3_s.o divsf3_s.o eqsf2_s.o nesf2_s.o
gesf2_s.o gtsf2_s.o lesf2_s.o ltsf2_s.o unordsf2_s.o fixsfsi_s.o floatsisf_s.o
floatunsisf_s.o adddf3_s.o subdf3_s.o negdf2_s.o muldf3_s.o divdf3_s.o
eqdf2_s.o nedf2_s.o gedf2_s.o gtdf2_s.o ledf2_s.o ltdf2_s.o unorddf2_s.o
fixdfsi_s.o floatsidf_s.o floatunsidf_s.o extendsfdf2_s.o truncdfsf2_s.o
_muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o
_ucmpdi2_s.o _clear_cache_s.o _trampoline_s.o __main_s.o _absvsi2_s.o
_absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o
_mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o
_clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o
_popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o
_powidf2_s.o _powixf2_s.o _powitf2_s.o _mulhc3_s.o _mulsc3_s.o _muldc3_s.o
_mulxc3_s.o _multc3_s.o _divhc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o
_divtc3_s.o _bswapsi2_s.o _bswapdi2_s.o _clrsbsi2_s.o _clrsbdi2_s.o
_fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o
_fixxfdi_s.o _fixtfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o
_fixunstfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatditf_s.o
_floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _floatunditf_s.o _divdi3_s.o
_moddi3_s.o _divmoddi4_s.o _udivdi3_s.o _umoddi3_s.o _udivmoddi4_s.o
_udiv_w_sdiv_s.o ibm-ldouble_s.o tramp_s.o ppc64-fp_s.o
enable-execute-stack_s.o unwind-dw2_s.o unwind-dw2-fde-dip_s.o unwind-sjlj_s.o
unwind-c_s.o emutls_s.o libgcc.a -lc && rm -f 32/libgcc_s.so && if [ -f
32/libgcc_s.so.1 ]; then mv -f 32/libgcc_s.so.1 32/libgcc_s.so.1.backup; else
true; fi && mv 32/libgcc_s.so.1.tmp 32/libgcc_s.so.1 && (echo "/* GNU ld
script"; echo "   Use the shared library, but some functions are only in"; echo
"   the static library.  */"; echo "GROUP ( libgcc_s.so.1 -lgcc )" ) >
32/libgcc_s.so
/usr/bin/ld:
/usr/local/build/gcc-7.2.0_linux_3.16.0-4-powerpc64.002/./gcc/liblto_plugin.so:
error loading plugin:
/usr/local/build/gcc-7.2.0_linux_3.16.0-4-powerpc64.002/./gcc/liblto_plugin.so:
wrong ELF class: ELFCLASS64
collect2: error: ld returned 1 exit status
gmake[5]: *** [libgcc_s.so] Error 1
gmake[5]: Leaving directory
`/usr/local/build/gcc-7.2.0_linux_3.16.0-4-powerpc64.002/powerpc64-unknown-linux-gnu/32/libgcc'
gmake[4]: *** [multi-do] Error 1
gmake[4]: Leaving directory
`/usr/local/build/gcc-7.2.0_linux_3.16.0-4-powerpc64.002/powerpc64-unknown-linux-gnu/libgcc'
gmake[3]: *** [all-multi] Error 2
gmake[3]: Leaving directory
`/usr/local/build/gcc-7.2.0_linux_3.16.0-4-powerpc64.002/powerpc64-unknown-linux-gnu/libgcc'
gmake[2]: *** [all-stage2-target-libgcc] Error 2
gmake[2]: Leaving directory
`/usr/local/build/gcc-7.2.0_linux_3.16.0-4-powerpc64.002'
gmake[1]: *** [stage2-bubble] Error 2
gmake[1]: Leaving directory
`/usr/local/build/gcc-7.2.0_linux_3.16.0-4-powerpc64.002'
gmake: *** [bootstrap] Error 2
Command exited with non-zero status 2
real 37071.46
user 36314.41
sys 787.75
ppc64$

I had run /usr/bin/time -p before the "gmake bootstrap" thus it was over 
ten hours for this process. 

Looks like some sort of linker confusion about the arch required.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]