PDA

View Full Version : Problems with GCC



Maragato
07-21-2004, 10:33 PM
I seem unable to compile anything with gcc, im using gcc-3.3.4-i486-1 under slackware linux 9.1

Everytime I try to compile anything with gcc it reports the following errors:
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/bin/ld: unrecognized option '--as-needed'
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status

anyone has some idea avout how can I fix it?

Salem
07-22-2004, 12:01 AM
Looks like a bad install to me, if you can't even compile a "hello.c"

If you've just installed the latest compiler, perhaps you also need the latest linker.

You could try
gcc --verbose hello.c
to see all the generated commands and command line options, to see where that rogue option comes from, though I'm not sure what you would do about it.

Lynux-Penguin
07-22-2004, 08:05 PM
it says your ld linker isn't working
this could be because the linker's libraries are not where they're supposed to be or it compiled incorrectly. It's not gcc's fault exactly although ld, I believe, comes with the package.

Try to recompile if the problem persists make sure you have the libraries *.so and the right includes in /usr/include

Maragato
07-29-2004, 12:47 PM
it says your ld linker isn't working
this could be because the linker's libraries are not where they're supposed to be or it compiled incorrectly. It's not gcc's fault exactly although ld, I believe, comes with the package.

Try to recompile if the problem persists make sure you have the libraries *.so and the right includes in /usr/include
You were right, my linker was obsolete towards the libs, so I've updated it with slackpkg and now everything is working fine thx a lot.

Lynux-Penguin
08-02-2004, 06:04 PM
yeah no problem ^_^

-LC