C compiler cannot create executables

C compiler cannot create executables

sorry for giving such stupid questions.

I installed 7.1 w/o any errors. the license file was also copied.
however when i run the icc alone like

$ icc
/usr/lib/crt1.o: In function `_start':
/usr/lib/crt1.o(.text+0x18): undefined reference to `main'

configure the default compiler as:
export LD=xild
export AR=xiar
export CC=icc
export CXX=icc

and try some linux code to compile, in the "./configure" stage, got:
checking for C compiler default output... configure: error: C compiler cannot create executables

does that mean my icc not installed properly or crt1.o (donno which package it comes from) need to be re-compiled? or any other info is needed to diagnose?

thx alot

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hello,
It seems that your shell does not support exec -a. There are two options:
if your linux distro uses bash as /bin/sh then try upgrading bash to the
latest version; or edit shellscript icc and replace
exec -a "/icc" /iccbin by exec /iccbin i.e. remove
-a and the next arg. There will be two such lines; ditto for icpc.
well, not a stupid question at all...

sumedh.

thanks a lot to sumwale and cp_jain

I deleted the args of -a "", the problem solved. the configure error is coming from my former CFLAG and CXXFLAG. when unset then, everything works fine.

>>$ icc
>>/usr/lib/crt1.o: In function `_start':
>>/usr/lib/crt1.o(.text+0x18): undefined reference to `main'

This is a known issue, you can ignore this.

You can try foll commands to check icc -

touch foo.c
icc -c foo.c

Regarding the configuration errors, please check your
config.log file - see what command is getting generated
to check your compiler.
If you want you can attach your config.log to this posting.

CP

Leave a Comment

Please sign in to add a comment. Not a member? Join today