LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   C compiler cannot create executables CentOS (https://www.linuxquestions.org/questions/linux-software-2/c-compiler-cannot-create-executables-centos-645751/)

cramerdy 05-30-2008 12:36 AM

C compiler cannot create executables CentOS
 
Hello:

I know this has been posted in the past, but I could not find anything that related to my exact problem. I am trying to compile the libssh2 package from a tar. I am running CentOS 5. When I run ./configure, I get the error "C compiler cannot create executables" and I check in the config.log file to see the exact error. I find the following:

configure:1773: $? = 1
configure:1796: checking for C compiler default output file name
configure:1799: gcc conftest.c >&5
/usr/bin/ld: crtbegin.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure:1802: $? = 1
configure: failed program was:
| /* confdefs.h. */

I have installed gcc, glibc gcc-devel, gcc-c++, Development Tools, and everything that relates to gcc imaginable but yet it is still missing that crtbegin.o file...

Does anyone have a suggestions as to how I might patch this up?

Thanks

pinniped 05-30-2008 02:23 AM

Hehehe - you left out the 'libc' development files.

knudfl 05-30-2008 05:17 AM

For CentOS : glibc-devel

Rgds

cramerdy 05-31-2008 05:18 PM

I got glibc-devel in there too, just forgot to list it.

jailbait 05-31-2008 06:18 PM

Quote:

Originally Posted by cramerdy (Post 3168937)

/usr/bin/ld: crtbegin.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure:1802: $? = 1
configure: failed program was:
| /* confdefs.h. */


The error message says it can't find crtbegin.o. Maybe the file does not exist or maybe it is someplace not on the ld path. Try searching your entire system for crtbegin.o

find / -iname "*crtbegin.o*"

-------------------
Steve Stites

cramerdy 06-01-2008 01:58 PM

There seemed to be these random 'holes' in the gcc packages. I fixed it by simply using yum remove to remove all of the packages and then reinstall them, apparently filling the holes...

Thanks


All times are GMT -5. The time now is 05:05 AM.