Did anybody here manage to install GCC 13.1.0 on their computer? When I try to build it from source on my 64-bit Debian Linux, I get the following error message:
/usr/bin/ld: .libs/hwasan.o: relocation R_X86_64_PC32 against undefined symbol `__ehdr_start' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: nonrepresentable section on output collect2: error: ld returned 1 exit status make[4]: *** [Makefile:559: libhwasan.la] Error 1 make[4]: Leaving directory '/home/teo/gcc-objdir/x86_64-pc-linux-gnu/libsanitizer/hwasan' make[3]: *** [Makefile:532: all-recursive] Error 1 make[3]: Leaving directory '/home/teo/gcc-objdir/x86_64-pc-linux-gnu/libsanitizer' make[2]: *** [Makefile:419: all] Error 2 make[2]: Leaving directory '/home/teo/gcc-objdir/x86_64-pc-linux-gnu/libsanitizer' make[1]: *** [Makefile:22725: all-target-libsanitizer] Error 2 make[1]: Leaving directory '/home/teo/gcc-objdir' make: *** [Makefile:1090: all] Error 2 I configured it with ../gcc-13.1.0/configure --enable-languages=c,c++ --disable-multilib. My current GCC version is:
Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/12.2.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-12.2.0/configure --enable-languages=c,c++,ada --disable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.2.0 (GCC) Since this is a linking error, I suppose my current linker may be relevant. It is:
GNU ld (GNU Binutils for Debian) 2.31.1 Copyright (C) 2018 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) a later version. This program has absolutely no warranty. So, what do you think is the problem and how can I solve it?
The probability that I will manage to install it on Windows is so low it's not even worth trying. Do you agree?
gccandg++are already in /usr/bin and if not, they are available from the repos. Start there and see if the same occurs.