GCC not working after upgrade [Solved]

Discussion in general that pertains to Sabayon Linux - Must Pertain to Sabayon Linux

Moderator: Moderators

Post Reply
necrophcodr
Baby Hen
Posts: 2
Joined: Tue Feb 06, 2018 21:17

GCC not working after upgrade [Solved]

Post by necrophcodr » Tue Feb 06, 2018 21:24

Recently I've upgraded my Sabayon system, and in messing about with some things eventually my GCC installation (or binutils) broke.

The problem would manifest even by compiling a hello world C file, such as

Code: Select all

int main() { return 0; }
Which when compiled would error:

Code: Select all

/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../lib64/Scrt1.o: unrecognized relocation (0x2a) in section `.text'
After trying a lot of things out, including emerging binaries from a different Gentoo system, I finally reverted, and got the problem solved thanks to optiz0r (for solving my issue) and Ryuno-Ki[m] (for letting me know about optiz0rs reply when I had logged off).

The solution in my case

Code: Select all

sudo binutils-config x86_64-pc-linux-gnu-2.29.1
Very simple! The solution to your problem may differ, but running

Code: Select all

sudo binutils-config -l
may reveal the version you can enter instead of the version I used.
Last edited by necrophcodr on Wed Feb 07, 2018 19:49, edited 1 time in total.

gentmixer
Simple Hen
Posts: 60
Joined: Wed Jan 17, 2018 17:21

Re: GCC not working after upgrade

Post by gentmixer » Wed Feb 07, 2018 14:15

Thanks!

User avatar
albfneto
Sagely Hen
Posts: 1870
Joined: Fri Nov 16, 2007 1:15
Location: Ribeirão Preto City, São Paulo State, Brazil
Contact:

Re: GCC not working after upgrade

Post by albfneto » Wed Feb 07, 2018 15:49

if solved, please mark the topic as [Solved].
ALBERTO FEDERMAN NETO
albfneto
[email protected]
Favorite Distros: Sabayon, Gentoo, Mageia and OpenSUSE

necrophcodr
Baby Hen
Posts: 2
Joined: Tue Feb 06, 2018 21:17

Re: GCC not working after upgrade

Post by necrophcodr » Wed Feb 07, 2018 19:50

albfneto wrote:if solved, please mark the topic as [Solved].
Thanks! It's been a few years since I've really posted in forums like this. I've changed it to fit now.

keyn
Baby Hen
Posts: 6
Joined: Thu Jan 15, 2015 0:22

Re: GCC not working after upgrade [Solved]

Post by keyn » Sun Feb 11, 2018 0:07

That's how serious the problem is, and how easy it is solved. Although in my case Binutils had first to be removed (previous version) with the corresponding parameter, then installed and selected. Thank you very much necrophcodr!

mhzuchini
Simple Hen
Posts: 70
Joined: Mon Aug 20, 2007 18:46
Location: Campinas, Brazil

Re: GCC not working after upgrade [Solved]

Post by mhzuchini » Fri Mar 16, 2018 15:08

necrophcodr wrote:Recently I've upgraded my Sabayon system, and in messing about with some things eventually my GCC installation (or binutils) broke.
[...]

Code: Select all

/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../lib64/Scrt1.o: unrecognized relocation (0x2a) in section `.text'
[...]
The solution in my case

Code: Select all

sudo binutils-config x86_64-pc-linux-gnu-2.29.1
Many, many, many thanks for this post!
I've been struggling with this error since yesterday night and that's exactly the problem!
______
Dell Inspiron 15 5547 - Gnome
Linux sabayonx86-64 4.2.0-sabayon

Post Reply