Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
glibc upgrade and the death of GCC
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
nevynxxx
Veteran
Veteran


Joined: 12 Nov 2003
Posts: 1123
Location: Manchester - UK

PostPosted: Mon Sep 04, 2006 3:15 pm    Post subject: glibc upgrade and the death of GCC Reply with quote

Just updated glibc as part of a regular wmerge -uDav world. Now GCC is failing with
Code:
checking for C compiler default output file name... configure: error: C compiler
 cannot create executables


Any way around this....I cannot see any way of getting back to a working gclibc that will allow gcc to work.
_________________
My Public Key

Wanted: Instructor in the art of Bowyery
Back to top
View user's profile Send private message
NightTwix
n00b
n00b


Joined: 06 Jan 2005
Posts: 58

PostPosted: Mon Sep 04, 2006 8:21 pm    Post subject: Reply with quote

I get exactly the same error. A solution would be great as i cant compile anything which, well ... sucks!
Maybe this thread can help you: https://forums.gentoo.org/viewtopic-t-493662.html
There are 2 possible solution on the last pages, but they didnt work for me :(

Update:

my solution was this:

I grepped in /etc/env.d and found a 05binutils with links to old binutils.

And i corrected the symlinks inside these directories (they were pointing to old binutils as well):
/usr/i686-pc-linux-gnu/bin
/usr/i686-pc-linux-gnu/lib
Back to top
View user's profile Send private message
nevynxxx
Veteran
Veteran


Joined: 12 Nov 2003
Posts: 1123
Location: Manchester - UK

PostPosted: Tue Sep 05, 2006 9:38 am    Post subject: Reply with quote

That other thread is not much help.....gcc was working fine, until glibc was upgraded....

if I try to compile a simple test program I get

Code:
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../../i686-pc-linux-gnu/bin/ld:/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../libc.so: file format not recognized; treating as linker script
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../../i686-pc-linux-gnu/bin/ld:/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../libc.so:5: syntax error
collect2: ld returned 1 exit status


even after using gcc-config to swap between gcc versions.
_________________
My Public Key

Wanted: Instructor in the art of Bowyery
Back to top
View user's profile Send private message
Mohij
n00b
n00b


Joined: 03 May 2005
Posts: 42
Location: Mosbach, Germany

PostPosted: Tue Sep 05, 2006 9:18 pm    Post subject: Reply with quote

nevynxxx: I found the solution to your problem (I got the same).
libc.so is wrong.

Old one:
Code:
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf32-i386)
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( /lib/ld-linux.so/* GNU ld script


New one:
Code:
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf32-i386)
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )


That fixed it. I have no idea why (in fact I just copied the libc.so from my brother), but it works for me, I hope it helps.
Greetings,
moHiJ
_________________
Even a fool is thought wise if he keeps silent, and discerning if he holds his tongue.
Proverbs 17,28
Back to top
View user's profile Send private message
nevynxxx
Veteran
Veteran


Joined: 12 Nov 2003
Posts: 1123
Location: Manchester - UK

PostPosted: Wed Sep 06, 2006 7:20 am    Post subject: Reply with quote

Fantastic, that worked, Thanks.
_________________
My Public Key

Wanted: Instructor in the art of Bowyery
Back to top
View user's profile Send private message
Mohij
n00b
n00b


Joined: 03 May 2005
Posts: 42
Location: Mosbach, Germany

PostPosted: Sat Sep 09, 2006 4:01 pm    Post subject: Reply with quote

Fine to see that it worked for you too. But this is a bug, is it? And fixing it for you and me doesn't solve the problem.
Perhaps some one should do a bug report.
mohij
_________________
Even a fool is thought wise if he keeps silent, and discerning if he holds his tongue.
Proverbs 17,28
Back to top
View user's profile Send private message
zBrain
Apprentice
Apprentice


Joined: 14 Apr 2006
Posts: 183

PostPosted: Sat Sep 16, 2006 11:30 pm    Post subject: um Reply with quote

I had the same problem & solution. Did anyone file a bug report?
Back to top
View user's profile Send private message
behorn
n00b
n00b


Joined: 10 Mar 2005
Posts: 7

PostPosted: Mon Nov 06, 2006 11:52 pm    Post subject: Reply with quote

I have the same problem as you had. But I can not figure out what you exactly did to fix it. Could someone post a little more precise description, please?
Which file has to be edited or replaced?
_________________
Hope dies last!
Back to top
View user's profile Send private message
hielvc
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2805
Location: Oceanside, Ca

PostPosted: Tue Nov 07, 2006 2:42 am    Post subject: Reply with quote

Try
Code:
less /usr/lib/libc.so

_________________
An A-Z Index of the Linux BASH command line
Back to top
View user's profile Send private message
uprooter
n00b
n00b


Joined: 06 Mar 2005
Posts: 70

PostPosted: Tue Nov 07, 2006 11:21 am    Post subject: Reply with quote

Had the same bug & solution on amd64.
I just had to modify the new lines to reflect the correct arch ( /lib64 instead of /lib and
elf64-x86-64 instead of elf32...
Back to top
View user's profile Send private message
behorn
n00b
n00b


Joined: 10 Mar 2005
Posts: 7

PostPosted: Wed Nov 08, 2006 8:13 pm    Post subject: Reply with quote

Ha! That was easy. Thanks a lot! I looked in /lib/ and found only binary code I can of course not read.
Now I am compiling again.

Bye!
_________________
Hope dies last!
Back to top
View user's profile Send private message
Mohij
n00b
n00b


Joined: 03 May 2005
Posts: 42
Location: Mosbach, Germany

PostPosted: Fri Nov 10, 2006 9:40 pm    Post subject: Reply with quote

Well, finally I reported a bug,
https://bugs.gentoo.org/show_bug.cgi?id=154723

hope it helps,
greetings,
moHiJ
_________________
Even a fool is thought wise if he keeps silent, and discerning if he holds his tongue.
Proverbs 17,28
Back to top
View user's profile Send private message
Perkele
n00b
n00b


Joined: 22 Apr 2005
Posts: 68

PostPosted: Sat Nov 11, 2006 1:49 pm    Post subject: Reply with quote

Everytime portage updates glibc i have to modify libc.so as posted above (like today). Quite annoying, why wasn't it fixed in the first place? Apparantly not everyone has this problem.
Back to top
View user's profile Send private message
Mohij
n00b
n00b


Joined: 03 May 2005
Posts: 42
Location: Mosbach, Germany

PostPosted: Tue Nov 14, 2006 8:29 pm    Post subject: Reply with quote

Well, after posting this bug and some time wasting, because dumb me posted the wrong file, Vapier pointed me to another bug and the solution.
Just see bug #126032 or have a look at my bug (and watch my dumbness :? ) and click the link.

The problem is binutils
Mark Loeser wrote:
binutils-2.15.x doesn't work with >=glibc-2.4.

Run: binutils-config 2 (this assumes binutils-2.16.* is number 2, if not,
check binutils-config -l)
And then "source /etc/profile"

Everything should work fine at that point.


Hope this helps,
moHiJ
_________________
Even a fool is thought wise if he keeps silent, and discerning if he holds his tongue.
Proverbs 17,28
Back to top
View user's profile Send private message
EDinATL
n00b
n00b


Joined: 13 Mar 2004
Posts: 10

PostPosted: Sat May 26, 2007 2:09 am    Post subject: Thank you Reply with quote

I had this problem, thanks so much!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum