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: March 28, 2024, 6:11 am

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installing GCC 13.1.0
#1
Installing GCC 13.1.0
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:
Code:
/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:
Code:
../gcc-13.1.0/configure --enable-languages=c,c++ --disable-multilib
I currently have GCC 12.2.0.
Since this is a linker error, I suppose it may be relevant that my GNU Linked version is 2.31.1.
So, what does this error message I am getting mean? And how can I fix that?

The probability that I will manage to install GCC 13.1.0 on Windows is so low it's not even worth trying. Do you agree?
Reply
#2
RE: Installing GCC 13.1.0
You might want to consider changing your major.
[Image: extraordinarywoo-sig.jpg]
Reply
#3
RE: Installing GCC 13.1.0
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.
Reply
#4
RE: Installing GCC 13.1.0
For now, I can access GCC 13.1.0 using GitLab CI/CD. So, I was able to tweak my AEC-to-WebAssembly compiler to compile under GCC 13.1.0 using error messages given to me by GitLab: https://gitlab.com/FlatAssembler/AECforW...4202281750
But that's not good enough for me. For one thing, GitLab is very slow, it takes it around 10 minutes to give me the error messages (or the message that it succeeded). Secondly, I can only do that for projects which I host on GitLab, and, not only that, for which I've also set up GitLab CI/CD. So, for most of my C++ projects, even those on my GitLab profile, I still don't know whether they compile using GCC 13.1.0. Furthermore, as I have a free GitLab account, I have limited minute-actions. I think I am nowhere close to that limit, but I don't know.
Those are the reasons I'd like to have the latest version of GCC, GCC 13.1.0, on my machine.
Reply
#5
RE: Installing GCC 13.1.0
(May 1, 2023 at 9:03 am)Angrboda Wrote: You might want to consider changing your major.

And which major should I switch to? And isn't there too much sunk cost, now that I have only two courses left to the diploma (Communication Skills and Basics of Automatic Control)?
Reply
#6
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 am not invoking GCC manually, it's the GNU Make that's invoking it. Unless I modify the Makefile, I have no control over how GNU Make invokes GCC.
Reply
#7
RE: Installing GCC 13.1.0
Is there not a pre-build package for Debian? Have you googled for this error and seen if anyone has a workaround?

Google is your friend. If you can't get a hit, you are probably doing something wrong. As for this one, the compiler you are using to do the build, and the configure script or Makefile must not work together. One solution might be to hack the configure or Makefile and add the -fPIC parameter.

Or, you can give up and try something different. Learn from Google.
Reply
#8
RE: Installing GCC 13.1.0
When I hire junior engineers, I don't care so much that they know an answer to a particular problem, but I do care that they can identify appropriate resources to leverage in order to find the correct answer.

This forum isn't it.

Try stackexchange, if you aren't utterly incompetent you should be able to find an answer in about five seconds.
Reply
#9
RE: Installing GCC 13.1.0
HappySkeptic Wrote:Is there not a pre-build package for Debian?
How could there be? GCC 13.1 was released only days ago. You can expect to appear on Docker (and thus GitLab) so early, not in the Debian repository.
Besides, Debian is not Fedora. Fedora provides RPMs for the version of GCC with the latest features, which would, today, be GCC 13.1.
Debian's policy is, as far as I know, to provide a DEB package for the version of GCC which is likely to have the least amount of bugs, which is, today, either GCC 10.4 or GCC 9.5.
And Oracle Linux'es policy is... I don't know what exactly, why it ships with GCC 4.8.5, but it's clearly some hyper-bug-fix release, rather than whichever happened to be the most feature-full release at the time.
HappySkeptic Wrote:Have you googled for this error and seen if anyone has a workaround?
No. I don't even know what I should type into Google.
HappySkeptic Wrote:As for this one, the compiler you are using to do the build, and the configure script or Makefile must not work together.
Or perhaps there is a bug in the version GNU linker provided with Debian. After all, it's a linker error.
Jackalope Wrote:Try stackexchange, if you aren't utterly incompetent you should be able to find an answer in about five seconds.
Then I guess I am utterly incompetent by that measure. Even though I have asked dozens of well-received questions on StackExchange.
Reply
#10
RE: Installing GCC 13.1.0
Missed the point, as usual.
Reply



Possibly Related Threads...
Thread Author Replies Views Last Post
  Constantly installing "new" version of Firezilla. Gawdzilla Sama 5 969 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 1136 September 25, 2015 at 8:19 am
Last Post: abaris



Users browsing this thread: 1 Guest(s)