You are not logged in.

#1 2007-08-15 10:25:06

thoughtpolice
Member
Registered: 2007-08-15
Posts: 3

GCC 4.2.1/binutils problem

Hi!

Recently I've been having a problem with GCC v4.2.1, that is, it cannot compile binaries, and I feel that this may be due to an incompatability with binutils.

Here's an excerpt from the command line:

[austin@continuum ~]$ gcc --version | head -1
gcc (GCC) 4.2.1
[austin@continuum ~]$ cat > test.c
int main() { return 42; }
[austin@continuum ~]$ gcc test.c -o test
/usr/lib/gcc/i686-pc-linux-gnu/4.2.1/ld: unrecognized option '--hash-style=both'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.1/ld: use the --help option for usage information
collect2: ld returned 1 exit status
[austin@continuum ~]$

I can still compile (as I have gcc34 installed,) but this is truly a very annoying error and if anybody can offer any help as to how to fix it, I would be most appreciative. I'm afraid there's not much more to the question than that, but I'm totally willing to provide any sort of information about my system if it's needed.

Thanks in advance!

Offline

#2 2007-08-15 10:41:15

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: GCC 4.2.1/binutils problem

is your system up to date? no self compiled packages?

Offline

#3 2007-08-15 12:57:37

thoughtpolice
Member
Registered: 2007-08-15
Posts: 3

Re: GCC 4.2.1/binutils problem

I just updated a few hours ago.

I have compiled a few applications, naturally (I deal with BSD besides archlinux, and so I end up compiling my software a lot.) I haven't, however, compiled a new GCC or any such thing.

Offline

#4 2007-08-15 16:16:13

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: GCC 4.2.1/binutils problem

Delete the file that generates this error. You have copied an outdated version of binutils to that location. When compiling, gcc adds that directory to the path before /usr/bin, which causes the old ld binary to get executed.

Offline

#5 2007-08-16 12:32:30

thoughtpolice
Member
Registered: 2007-08-15
Posts: 3

Re: GCC 4.2.1/binutils problem

Thanks a lot!

JGC++ smile

Offline

Board footer

Powered by FluxBB