Our server costs ~$56 per month to run. Please consider donating or becoming a Patron to help keep the site running. Help us gain new members by following us on Twitter and liking our page on Facebook!
Current time: August 10, 2025, 5:05 am

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installing GCC 13.1.0
#23
RE: Installing GCC 13.1.0
(May 1, 2023 at 9:53 am)HappySkeptic Wrote: It tells you the problem:

"recompile with -fPIC"

Google what that means.  I've always used it in my UNIX or LINUX compiles.  It doesn't make sense not to use it.
I've tried to do the following before running `configure`:
Code:
# Downgrade GCC to the one that comes with Debian.
export CC=/usr/bin/gcc
export CXX=/usr/bin/g++
# Tell "configure" to always add "-fPIC" when invoking GCC
export CFLAGS="-fPIC"
export CXXFLAGS=$CFLAGS
I still get exactly the same error. And I think I understand why:
1. The error occurs at the Stage 2 of the compilation of GCC. That means the GCC being invoked isn't the GCC you have already installed on your system, but the newly-built GCC 13.1. It's the `xgcc`, the minimal GCC used to compile the rest of GCC. It shouldn't matter which version of GCC was used to produce `xgcc` in the Stage 1 (unless you assume there is some weird wrong-code bug).
2. Take a look at the invocation that occurs right before the error:

Code:
libtool: link:  /home/teo/gcc-objdir/./gcc/xgcc -shared-libgcc -B/home/teo/gcc-objdir/./gcc -nostdinc++ -L/home/teo/gcc-objdir/x86_64-pc-linux-gnu/libstdc++-v3/src -L/home/teo/gcc-objdir/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/home/teo/gcc-objdir/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/usr/local/x86_64-pc-linux-gnu/bin/ -B/usr/local/x86_64-pc-linux-gnu/lib/ -isystem /usr/local/x86_64-pc-linux-gnu/include -isystem /usr/local/x86_64-pc-linux-gnu/sys-include     -fPIC -DPIC -shared -nostdlib /usr/lib/x86_64-linux-gnu/crti.o /home/teo/gcc-objdir/./gcc/crtbeginS.o  .libs/hwasan_allocation_functions.o .libs/hwasan_allocator.o .libs/hwasan.o .libs/hwasan_dynamic_shadow.o .libs/hwasan_exceptions.o .libs/hwasan_fuchsia.o .libs/hwasan_globals.o .libs/hwasan_interceptors.o .libs/hwasan_interceptors_vfork.o .libs/hwasan_linux.o .libs/hwasan_memintrinsics.o .libs/hwasan_new_delete.o .libs/hwasan_poisoning.o .libs/hwasan_report.o .libs/hwasan_setjmp_aarch64.o .libs/hwasan_setjmp_x86_64.o .libs/hwasan_tag_mismatch_aarch64.o .libs/hwasan_thread.o .libs/hwasan_thread_list.o .libs/hwasan_type_test.o  -Wl,--whole-archive ../sanitizer_common/.libs/libsanitizer_common.a ../interception/.libs/libinterception.a ../libbacktrace/.libs/libsanitizer_libbacktrace.a -Wl,--no-whole-archive  -Wl,-rpath -Wl,/home/teo/gcc-objdir/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -Wl,-rpath -Wl,/usr/local/lib/../lib64 -L/home/teo/gcc-objdir/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/home/teo/gcc-objdir/x86_64-pc-linux-gnu/libstdc++-v3/src -L/home/teo/gcc-objdir/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -ldl -lrt -lpthread ../../libstdc++-v3/src/.libs/libstdc++.so -lm -L/home/teo/gcc-objdir/./gcc -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -lc -lgcc_s /home/teo/gcc-objdir/./gcc/crtendS.o /usr/lib/x86_64-linux-gnu/crtn.o  -mshstk   -Wl,-soname -Wl,libhwasan.so.0 -o .libs/libhwasan.so.0.0.0
/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
The GNU Make does pass the `-fPIC` to the `xgcc`, it's just apparently being ignored.
Reply



Messages In This Thread
Installing GCC 13.1.0 - by FlatAssembler - May 1, 2023 at 8:39 am
RE: Installing GCC 13.1.0 - by Angrboda - May 1, 2023 at 9:03 am
RE: Installing GCC 13.1.0 - by FlatAssembler - May 1, 2023 at 10:19 am
RE: Installing GCC 13.1.0 - by Ravenshire - May 6, 2023 at 8:19 pm
RE: Installing GCC 13.1.0 - by HappySkeptic - May 1, 2023 at 9:53 am
RE: Installing GCC 13.1.0 - by FlatAssembler - May 1, 2023 at 10:20 am
RE: Installing GCC 13.1.0 - by FlatAssembler - May 2, 2023 at 10:48 am
RE: Installing GCC 13.1.0 - by FlatAssembler - May 1, 2023 at 10:16 am
RE: Installing GCC 13.1.0 - by HappySkeptic - May 1, 2023 at 10:27 am
RE: Installing GCC 13.1.0 - by Jackalope - May 1, 2023 at 10:38 am
RE: Installing GCC 13.1.0 - by FlatAssembler - May 1, 2023 at 2:41 pm
RE: Installing GCC 13.1.0 - by HappySkeptic - May 1, 2023 at 4:28 pm
RE: Installing GCC 13.1.0 - by Jackalope - May 1, 2023 at 2:56 pm
RE: Installing GCC 13.1.0 - by FlatAssembler - May 1, 2023 at 7:04 pm
RE: Installing GCC 13.1.0 - by BrianSoddingBoru4 - May 1, 2023 at 7:13 pm
RE: Installing GCC 13.1.0 - by FlatAssembler - May 1, 2023 at 7:15 pm
RE: Installing GCC 13.1.0 - by BrianSoddingBoru4 - May 1, 2023 at 7:22 pm
RE: Installing GCC 13.1.0 - by FlatAssembler - May 1, 2023 at 8:06 pm
RE: Installing GCC 13.1.0 - by FlatAssembler - May 1, 2023 at 7:18 pm
RE: Installing GCC 13.1.0 - by Jackalope - May 1, 2023 at 9:18 pm
RE: Installing GCC 13.1.0 - by FlatAssembler - May 7, 2023 at 4:59 pm
RE: Installing GCC 13.1.0 - by Angrboda - May 1, 2023 at 7:37 pm
RE: Installing GCC 13.1.0 - by FlatAssembler - May 1, 2023 at 8:07 pm
RE: Installing GCC 13.1.0 - by The Valkyrie - May 1, 2023 at 8:31 pm
RE: Installing GCC 13.1.0 - by Nay_Sayer - May 2, 2023 at 1:39 am
RE: Installing GCC 13.1.0 - by FlatAssembler - May 2, 2023 at 4:07 pm
RE: Installing GCC 13.1.0 - by BrianSoddingBoru4 - May 2, 2023 at 4:48 pm
RE: Installing GCC 13.1.0 - by FlatAssembler - May 2, 2023 at 6:00 pm
RE: Installing GCC 13.1.0 - by Angrboda - May 2, 2023 at 6:03 pm
RE: Installing GCC 13.1.0 - by FlatAssembler - May 3, 2023 at 8:09 am
RE: Installing GCC 13.1.0 - by BrianSoddingBoru4 - May 3, 2023 at 2:43 pm
RE: Installing GCC 13.1.0 - by FlatAssembler - May 3, 2023 at 5:05 pm
RE: Installing GCC 13.1.0 - by BrianSoddingBoru4 - May 3, 2023 at 6:53 pm
RE: Installing GCC 13.1.0 - by FlatAssembler - May 3, 2023 at 7:31 pm
RE: Installing GCC 13.1.0 - by BrianSoddingBoru4 - May 3, 2023 at 7:38 pm
RE: Installing GCC 13.1.0 - by FlatAssembler - May 4, 2023 at 1:49 pm
RE: Installing GCC 13.1.0 - by BrianSoddingBoru4 - May 4, 2023 at 4:34 pm
RE: Installing GCC 13.1.0 - by FlatAssembler - May 4, 2023 at 5:01 pm
RE: Installing GCC 13.1.0 - by Astreja - May 5, 2023 at 2:56 am
RE: Installing GCC 13.1.0 - by FlatAssembler - May 6, 2023 at 6:42 pm
RE: Installing GCC 13.1.0 - by Astreja - May 6, 2023 at 6:53 pm
RE: Installing GCC 13.1.0 - by FlatAssembler - May 7, 2023 at 9:02 am
RE: Installing GCC 13.1.0 - by Astreja - May 7, 2023 at 11:44 am
RE: Installing GCC 13.1.0 - by Nay_Sayer - May 2, 2023 at 6:19 pm
RE: Installing GCC 13.1.0 - by FlatAssembler - May 3, 2023 at 1:11 pm
RE: Installing GCC 13.1.0 - by Astreja - May 3, 2023 at 2:00 pm
RE: Installing GCC 13.1.0 - by FlatAssembler - May 3, 2023 at 4:45 pm
RE: Installing GCC 13.1.0 - by HappySkeptic - May 2, 2023 at 1:01 pm
RE: Installing GCC 13.1.0 - by FlatAssembler - May 2, 2023 at 2:40 pm
RE: Installing GCC 13.1.0 - by FlatAssembler - May 2, 2023 at 3:53 pm
RE: Installing GCC 13.1.0 - by arewethereyet - May 2, 2023 at 3:53 pm
RE: Installing GCC 13.1.0 - by arewethereyet - May 3, 2023 at 2:47 pm
RE: Installing GCC 13.1.0 - by Angrboda - May 3, 2023 at 3:39 pm
RE: Installing GCC 13.1.0 - by arewethereyet - May 3, 2023 at 3:45 pm
RE: Installing GCC 13.1.0 - by The Valkyrie - May 3, 2023 at 6:22 pm
RE: Installing GCC 13.1.0 - by The Valkyrie - May 5, 2023 at 4:09 am

Possibly Related Threads...
Thread Author Replies Views Last Post
  Constantly installing "new" version of Firezilla. Gawdzilla Sama 5 1362 October 30, 2016 at 8:14 pm
Last Post: Gawdzilla Sama
  Never had that kinds of troubles with installing a new video card abaris 7 1744 September 25, 2015 at 8:19 am
Last Post: abaris



Users browsing this thread: 1 Guest(s)