It took a lot of effort to expect the source code, and then refer to the Expect install documentation, also need to TCL/TK source code support, and then downloaded the source of the TCL/TK, put them all to the/usr/local/src below. First compile and install Tcl and TK, and then into the expect folder below,./configure, the results of the error, said that the tclInt.h found. So in the TCL source files folder under the search tclInt.h, found that the file does exist, under generic. Also refer to the Expect install documentation, just know that you can add--withtclincluse= options, and then configure again:
./configure--withtclinclude=/usr/local/src/tcl8.6b1/generic
Configure success. Then input make, the formal compilation, the results found the following error:
Exp_main_exp.c:32:error: ' Tcl_interp ' has no member named ' Result '
Exp_main_exp.c:33:warning:incompatible implicit declaration of built-in function ' exit '
Make: * * * [EXP_MAIN_EXP.O] Error 1
A search on the internet, in Http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/e63b1bd2d350d024/8bbd5758f6193120?show _docid=8bbd5758f6193120&pli=1 found that someone had encountered the same problem. The reason was given in Http://www.tcl.tk/cgi-bin/tct/tip/330.html because Tcl_interp was renamed Unused1 in the new version (8.6) of Tcl's Tcl.h, And expect source code does not make the corresponding modification. And the solution is to add the predefined use_interp_result, or use the TCL source code below 8.5.
I did not continue to attempt to compile the installation expect. I think up can try to install through Yum, so input yum install expect, unexpectedly succeeded. However, the installation of expect at the same time, but also automatically installed tcl8.5.3, estimated that this is because the installation of expect is based on tcl8.5 source code variation.
It seems that expect developers, so long time this bug has not been repaired, alas ...