You are not logged in.

#1 2004-10-13 14:22:14

nagoola
Member
From: Germany / Ahrensburg
Registered: 2004-03-15
Posts: 52

error: C compiler cannot create executables [SOLVED!!!]

hi,

i am trying to make an evolution package that includes support for a palm pilot. i got the PKGBUILD file from somebody else and copied it to a directory. In that directory I then executed

makepkg

and tried to compile it. It goes pretty smooth until it complains about the following thing:

error: C compiler cannot create executables

i dont really know how to solve that problem and any help would be appriciated.
thanks

Offline

#2 2004-10-13 14:29:04

dadexter
Member
From: Dorval, QC, Canada
Registered: 2004-09-07
Posts: 274
Website

Re: error: C compiler cannot create executables [SOLVED!!!]

Try the basics...

Create a file with the following text:

#include <stdio.h>

int main() {
  printf("Hello world");
  return 0;
}

Save the file has hello.c and compile it with

gcc -Wall hello.c -o hello

and see if you get any errors... you might be having issues with packages like glibc or gcc that would maybe need to be reinstalled


Normally, if it claims that gcc can't create exec's, you should see an error before that warning that would tell you what the problem is

Offline

#3 2004-10-13 14:37:40

nagoola
Member
From: Germany / Ahrensburg
Registered: 2004-03-15
Posts: 52

Re: error: C compiler cannot create executables [SOLVED!!!]

hmm, i did that and it really doesnt work:

[hbadekow@henrik16 hbadekow]$ gcc -Wall test.c -o test
/usr/bin/ld: unrecognized option '--as-needed'
/usr/bin/ld: use the --help option for usage information
collect2: ld gab 1 als Ende-Status zurück

what does that mean?? how can i fix that? any ideas?
thank you for your help!!!!!

Offline

#4 2004-10-13 14:43:32

nagoola
Member
From: Germany / Ahrensburg
Registered: 2004-03-15
Posts: 52

Re: error: C compiler cannot create executables [SOLVED!!!]

problem soved!!!
the version i had didnt support the option --as-needed and i just updated binutils/ld and it worked!!!
thanks again though!!!

Offline

#5 2004-10-13 15:20:12

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: error: C compiler cannot create executables [SOLVED!!!]

yet another reason why you should keep your system up to date

Offline

Board footer

Powered by FluxBB