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

            Bug ID: 116119
           Summary: Error building gcc 8.3.0
           Product: gcc
           Version: 8.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: h.sousou97 at gmail dot com
  Target Milestone: ---

Created attachment 58770
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58770&action=edit
config.log file

I am Following this tutorial to cross compile a Qt app for RPi 4:
https://github.com/alexandraB99/embedded_development_Qt_course_aux?tab=readme-ov-file

I started building the toolchain.

- Using ubuntu 20.04:
- Installed binutils 2.31 with following : 

../../src/binutils-2.31/configure --target=${TARGET}
--prefix=${PREFIX}--with-arch=armv8-a --with-fpu=vfp --with-float=hard
--disable-multilib
make -j6
make install        // no errors


then building gcc for raspberry pi 4 :
Download gcc-8.3.0
contrib/download_prerequisites

../../src/gcc-8.3.0/configure --prefix=${PREFIX} --target=${TARGET}
--with-sysroot=${SYSROOT} --enable-languages=c,c++ --disable-multilib
--enable-multiarch --with-arch=armv8-a --with-fpu=vfp --with-float=hard
make -j6

Compilation error :   
checking for arm-linux-gnueabihf-gcc...
/home/sofiane/rpi0/toolchain/build/gcc2/./gcc/xgcc
-B/home/sofiane/rpi0/toolchain/build/gcc2/./gcc/
-B/home/sofiane/rpi0/toolchain/toolchain/arm-linux-gnueabihf/bin/
-B/home/sofiane/rpi0/toolchain/toolchain/arm-linux-gnueabihf/lib/ -isystem
/home/sofiane/rpi0/toolchain/toolchain/arm-linux-gnueabihf/include -isystem
/home/sofiane/rpi0/toolchain/toolchain/arm-linux-gnueabihf/sys-include   
checking for suffix of object files... configure: error: in
`/home/sofiane/rpi0/toolchain/build/gcc2/arm-linux-gnueabihf/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
mv -f .deps/findcomp.Tpo .deps/findcomp.Plo
/bin/bash ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.
-I../../../src/gcc-8.3.0/libcc1  -I ../../../src/gcc-8.3.0/libcc1/../include -I
../../../src/gcc-8.3.0/libcc1/../libgcc -I ../gcc
-I../../../src/gcc-8.3.0/libcc1/../gcc -I
../../../src/gcc-8.3.0/libcc1/../gcc/c-family -I
../../../src/gcc-8.3.0/libcc1/../libcpp/include -I
../../../src/gcc-8.3.0/libcc1/../gcc/cp
-I/home/sofiane/rpi0/toolchain/build/gcc2/./gmp
-I/home/sofiane/rpi0/toolchain/src/gcc-8.3.0/gmp
-I/home/sofiane/rpi0/toolchain/build/gcc2/./mpfr/src
-I/home/sofiane/rpi0/toolchain/src/gcc-8.3.0/mpfr/src
-I/home/sofiane/rpi0/toolchain/src/gcc-8.3.0/mpc/src   -W -Wall 
-fvisibility=hidden -g -O2 -MT libcp1plugin.lo -MD -MP -MF
.deps/libcp1plugin.Tpo -c -o libcp1plugin.lo
../../../src/gcc-8.3.0/libcc1/libcp1plugin.cc
mv -f .deps/connection.Tpo .deps/connection.Plo
make[1]: *** [Makefile:14251: configure-target-libgcc] Error 1


when looking at the config.log: 

/home/sofiane/rpi0/toolchain/build/gcc2/./gcc/as: 106: exec: -march=armv8-a:
not found
configure:3687: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/";
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3701: error: in
`/home/sofiane/rpi0/toolchain/build/gcc2/arm-linux-gnueabihf/libgcc':
configure:3704: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

somehow /home/sofiane/rpi0/toolchain/build/gcc2/./gcc/as is called I don't know
why.

I added the lib path to gmp, mpc and mpfr libs, LD_LIBRARY_PATH : 
/home/sofiane/rpi0/toolchain/toolchain/lib:/lib:/home/sofiane/rpi0/sysroot/usr/lib/aarch64-linux-gnu::/usr/local/qt6/lib/

/home/sofiane/rpi0/sysroot/usr/lib/aarch64-linux-gnu contains the gmp, mpc and
mpfr libs : 
libmpcdec.so.6      libmpcdec.so.6.1.0  libmpc.so.3         libmpc.so.3.2.0 
libmpfr.so.6      libmpfr.so.6.1.0
libgmp.so.10      libgmp.so.10.4.1

I spent two days trying to figure out the source of the problem, I'm stuck.

Reply via email to