configure: error: C compiler cannot create executables

Posted by roly.moroz on 2011-01-10 10:43
Forums: ActiveTcl discussion | OS: Solaris

I am installing expect on Solaris (as root) and received the error...

# ./configure --with-tclconfig=/usr/sfw/lib/ --with-tkconfig=/usr/sfw/lib/
checking for correct TEA configuration... ok (TEA 3.9)
configure: configuring expect 5.45
checking for Tcl configuration... found /usr/sfw/lib/
checking for existence of /usr/sfw/lib/ loading
configure: --prefix defaulting to TCL_PREFIX /usr/sfw
configure: --exec-prefix defaulting to TCL_EXEC_PREFIX /usr/sfw
checking for gcc... no
checking for cc... cc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.

ActiveState Staff
Mon, 2011-01-10 14:48

Do you have GCC installed ?

Do you have Sun's C compiler installed ? Sun's C compiler is not installed by default AFAIK, it has to be bought separately.

roly.moroz | Tue, 2011-01-11 04:56

I think we have gcc, I just found it here...

> 0 07:49:54 $ ls -lp /usr/local/lib/
total 17772
lrwxrwxrwx 1 root other 15 Mar 28 2007 ->*
lrwxrwxrwx 1 root other 15 Mar 28 2007 ->*
-rwxr-xr-x 1 root bin 550996 Oct 9 2006
lrwxrwxrwx 1 root other 13 Mar 28 2007 ->
-rw-r--r-- 1 root bin 171544 Oct 9 2006
-rw-r--r-- 1 root bin 222184 Dec 16 2006 libpcap.a

I have tcl installed in /usr/sfw/lib/, do I need to create a logical link for gcc there?

> 0 07:53:51 $ ls -lp /usr/sfw/lib/
drwxrwxr-x 6 10001 10000 1536 Jan 10 13:10 expect5.45/
-rw-r--r-- 1 root other 2498560 Jan 7 09:47 expect5.45.tar
drwxr-xr-x 8 root bin 512 Mar 16 2006 tcl8.3/
-rw-r--r-- 1 root bin 6682 Mar 2 2002
drwxr-xr-x 4 root bin 1024 Mar 16 2006 tk8.3/
-rw-r--r-- 1 root bin 3342 Mar 2 2002


ActiveState Staff
Wed, 2011-01-12 08:33

I believe that a gcc in /usr/local/lib should be found by configure on its own. Right now I would recommend that you talk to the system administrator of the box about the various compiler installations you seem to (not) have.

Note that the file config.log in the directory you ran configure in should contain information on why gcc was not found. IIRC configure will list the paths it searched the compiler for.

roly.moroz | Thu, 2011-01-13 09:26

gcc was successfully installed but I hit another roadblock when building the expect command.

bash-2.05# cd /usr/sfw/lib/expect5.45/
bash-2.05# ./configure --with-tclconfig=/usr/sfw/lib/ --with-tkconfig=/usr/sfw/lib/
checking for Tcl public headers... /usr/sfw/include
checking for Tcl private include files... configure: error: Cannot find private header tclInt.h in /usr/sfw/src/tcl

The tclInt.h is not anywhere on my server. How do I create it?


ActiveState Staff
Fri, 2011-01-14 08:43

tclInt.h is a private header file of Tcl. You need a source distribution of Tcl. You will have to build this distribution, and then point the expect configure to its build location.

ActiveState Staff
Fri, 2011-01-14 08:45

I am wondering if it might be easier (more convenient) for you to get an ActiveTcl Business-Edition (solaris) and then install the Expect we provide in the TEApot for that ?