| View previous topic :: View next topic |
| Author |
Message |
nevynxxx Veteran

Joined: 12 Nov 2003 Posts: 1123 Location: Manchester - UK
|
Posted: Mon Sep 04, 2006 3:15 pm Post subject: glibc upgrade and the death of GCC |
|
|
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 |
|
 |
NightTwix n00b

Joined: 06 Jan 2005 Posts: 58
|
Posted: Mon Sep 04, 2006 8:21 pm Post subject: |
|
|
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 |
|
 |
nevynxxx Veteran

Joined: 12 Nov 2003 Posts: 1123 Location: Manchester - UK
|
Posted: Tue Sep 05, 2006 9:38 am Post subject: |
|
|
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 |
|
 |
Mohij n00b

Joined: 03 May 2005 Posts: 42 Location: Mosbach, Germany
|
Posted: Tue Sep 05, 2006 9:18 pm Post subject: |
|
|
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 |
|
 |
nevynxxx Veteran

Joined: 12 Nov 2003 Posts: 1123 Location: Manchester - UK
|
Posted: Wed Sep 06, 2006 7:20 am Post subject: |
|
|
Fantastic, that worked, Thanks. _________________ My Public Key
Wanted: Instructor in the art of Bowyery |
|
| Back to top |
|
 |
Mohij n00b

Joined: 03 May 2005 Posts: 42 Location: Mosbach, Germany
|
Posted: Sat Sep 09, 2006 4:01 pm Post subject: |
|
|
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 |
|
 |
zBrain Apprentice


Joined: 14 Apr 2006 Posts: 183
|
Posted: Sat Sep 16, 2006 11:30 pm Post subject: um |
|
|
| I had the same problem & solution. Did anyone file a bug report? |
|
| Back to top |
|
 |
behorn n00b


Joined: 10 Mar 2005 Posts: 7
|
Posted: Mon Nov 06, 2006 11:52 pm Post subject: |
|
|
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 |
|
 |
hielvc Advocate

Joined: 19 Apr 2002 Posts: 2805 Location: Oceanside, Ca
|
|
| Back to top |
|
 |
uprooter n00b

Joined: 06 Mar 2005 Posts: 70
|
Posted: Tue Nov 07, 2006 11:21 am Post subject: |
|
|
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 |
|
 |
behorn n00b


Joined: 10 Mar 2005 Posts: 7
|
Posted: Wed Nov 08, 2006 8:13 pm Post subject: |
|
|
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 |
|
 |
Mohij n00b

Joined: 03 May 2005 Posts: 42 Location: Mosbach, Germany
|
Posted: Fri Nov 10, 2006 9:40 pm Post subject: |
|
|
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 |
|
 |
Perkele n00b

Joined: 22 Apr 2005 Posts: 68
|
Posted: Sat Nov 11, 2006 1:49 pm Post subject: |
|
|
| 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 |
|
 |
Mohij n00b

Joined: 03 May 2005 Posts: 42 Location: Mosbach, Germany
|
Posted: Tue Nov 14, 2006 8:29 pm Post subject: |
|
|
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 |
|
 |
EDinATL n00b

Joined: 13 Mar 2004 Posts: 10
|
Posted: Sat May 26, 2007 2:09 am Post subject: Thank you |
|
|
| I had this problem, thanks so much! |
|
| Back to top |
|
 |
|