problems installing expect utilty

Hi all,

I am trying to install expect utility on RHEL 5. It is showing that we also need to install tcl also in order to run it.

I have downloaded expect from Tucows Tucows Download - Download Expect 5.32.1

and

tcl from SourceForge.net: Downloading ...

Can someone please tell me steps how to install it as I am getting some errors while installing expect.

These are errors.

[root@RHEL expect-5.32]# make
gcc -c  -I. -I. -I/usr/local/src/tcl8.5.2/generic   -DEXP_VERSION=\"5.32.1\" -DSCRIPTDIR=\"/usr/local/lib/expect5.32\" -DEXECSCRIPTDIR=\"/usr/local/lib/expect5.32\" -DTCL_DEBUGGER  -DDFLT_STTY="\"sane\""  exp_main_exp.c
exp_main_exp.c: In function �main':
exp_main_exp.c:26: warning: incompatible implicit declaration of built-in function �exit'
exp_main_exp.c:31: warning: incompatible implicit declaration of built-in function �exit'
if [ "xlibexpect5.32.a" != "xlibexpect5.32.a" ] ; then \
           if [ ! -d shared ] ; then \
                mkdir shared ; \
           else true; fi ; \
           gcc -c  -I. -I. -I/usr/local/src/tcl8.5.2/generic   -DEXP_VERSION=\"5.32.1\" -DSCRIPTDIR=\"/usr/local/lib/expect5.32\" -DEXECSCRIPTDIR=\"/usr/local/lib/expect5.32\" -DTCL_DEBUGGER   -DDFLT_STTY="\"sane\""  exp_main_exp.c -o shared/exp_main_exp.o ; \
        fi
gcc -c  -I. -I. -I/usr/local/src/tcl8.5.2/generic   -DEXP_VERSION=\"5.32.1\" -DSCRIPTDIR=\"/usr/local/lib/expect5.32\" -DEXECSCRIPTDIR=\"/usr/local/lib/expect5.32\" -DTCL_DEBUGGER  -DDFLT_STTY="\"sane\""  exp_command.c
In file included from /usr/local/src/tcl8.5.2/generic/tclInt.h:3836,
                 from exp_command.c:62:
/usr/local/src/tcl8.5.2/generic/tclPort.h:27:28: error: tclUnixPort.h: No such file or directory
In file included from /usr/local/src/tcl8.5.2/generic/tclInt.h:3838,
                 from exp_command.c:62:
/usr/local/src/tcl8.5.2/generic/tclIntPlatDecls.h:98: error: expected �=', �,', �;', �asm' or �__attribute__' before �*' token
/usr/local/src/tcl8.5.2/generic/tclIntPlatDecls.h:113: warning: �struct in_addr' declared inside parameter list
/usr/local/src/tcl8.5.2/generic/tclIntPlatDecls.h:113: warning: its scope is only this definition or declaration, which is probably not what you want
/usr/local/src/tcl8.5.2/generic/tclIntPlatDecls.h:388: error: expected specifier-qualifier-list before �Tcl_DirEntry'
In file included from exp_command.c:72:
exp_command.h:111: error: expected specifier-qualifier-list before �WAIT_STATUS_TYPE'
exp_command.c: In function �expStateFromChannelName':
exp_command.c:230: warning: assignment discards qualifiers from pointer target type
exp_command.c: In function �exp_wait_zero':
exp_command.c:244: error: expected declaration specifiers before �WAIT_STATUS_TYPE'
exp_command.c:248: error: �WAIT_STATUS_TYPE' undeclared (first use in this function)
exp_command.c:248: error: (Each undeclared identifier is reported only once
exp_command.c:248: error: for each function it appears in.)
exp_command.c: In function �exp_state_prep_for_invalidation':
exp_command.c:263: error: �ExpState' has no member named �fg_armed'
exp_command.c: In function �expBusy':
exp_command.c:314: error: �ExpState' has no member named �fdBusy'
exp_command.c: In function �exp_close':
exp_command.c:335: error: �ExpState' has no member named �leaveopen'
exp_command.c: In function �exp_init_spawn_ids':
exp_command.c:452: error: �ExpState' has no member named �keepForever'
exp_command.c:455: error: �ExpState' has no member named �keepForever'
exp_command.c:459: error: �ExpState' has no member named �keepForever'
exp_command.c: In function �Exp_SpawnCmd':
exp_command.c:836: error: �ExpState' has no member named �leaveopen'
exp_command.c:843: error: �ExpState' has no member named �wait'
exp_command.c:925: warning: passing argument 1 of �expErrorLogU' discards qualifiers from pointer target type
exp_command.c:1218: error: �ExpState' has no member named �wait'
exp_command.c: In function �exp_i_parse_states':
exp_command.c:1679: warning: passing argument 4 of �Tcl_SplitList' from incompatible pointer type
exp_command.c:1690: warning: passing argument 1 of �expDiagLogU' discards qualifiers from pointer target type
exp_command.c: In function �exp_i_update':
exp_command.c:1703: warning: assignment discards qualifiers from pointer target type
exp_command.c: In function �Exp_SendObjCmd':
exp_command.c:1824: warning: passing argument 3 of �Tcl_GetIndexFromObj' from incompatible pointer type
exp_command.c: At top level:
exp_command.c:2438: error: expected specifier-qualifier-list before �WAIT_STATUS_TYPE'
exp_command.c: In function �fork_clear_all':
exp_command.c:2448: error: �struct forked_proc' has no member named �next'
exp_command.c:2449: error: �struct forked_proc' has no member named �link_status'
exp_command.c:2449: error: �not_in_use' undeclared (first use in this function)
exp_command.c: In function �fork_init':
exp_command.c:2459: error: �struct forked_proc' has no member named �link_status'
exp_command.c:2459: error: �wait_not_done' undeclared (first use in this function)
exp_command.c: In function �fork_add':
exp_command.c:2469: error: �struct forked_proc' has no member named �next'
exp_command.c:2470: error: �struct forked_proc' has no member named �link_status'
exp_command.c:2470: error: �not_in_use' undeclared (first use in this function)
exp_command.c:2476: error: �struct forked_proc' has no member named �next'
exp_command.c: In function �Exp_WaitCmd':
exp_command.c:2550: error: �struct ExpState' has no member named �wait'
exp_command.c:2558: error: �struct ExpState' has no member named �wait'
exp_command.c:2589: error: �struct forked_proc' has no member named �next'
exp_command.c:2590: error: �struct forked_proc' has no member named �link_status'
exp_command.c:2590: error: �not_in_use' undeclared (first use in this function)
exp_command.c:2592: error: �struct forked_proc' has no member named �wait_status'
exp_command.c:2624: error: �struct ExpState' has no member named �wait'
exp_command.c:2624: error: �struct forked_proc' has no member named �wait_status'
exp_command.c:2638: error: �struct ExpState' has no member named �wait'
exp_command.c:2638: error: �struct ExpState' has no member named �wait'
exp_command.c:2639: error: �struct ExpState' has no member named �wait'
exp_command.c:2639: error: �struct ExpState' has no member named �wait'
exp_command.c:2641: error: �struct ExpState' has no member named �wait'
exp_command.c:2641: error: �struct ExpState' has no member named �wait'
exp_command.c:2642: error: �struct ExpState' has no member named �wait'
exp_command.c:2642: error: �struct ExpState' has no member named �wait'
exp_command.c:2643: error: �struct ExpState' has no member named �wait'
exp_command.c:2643: error: �struct ExpState' has no member named �wait'
exp_command.c:2645: error: �struct ExpState' has no member named �wait'
exp_command.c:2645: error: �struct ExpState' has no member named �wait'
exp_command.c:2646: error: �struct ExpState' has no member named �wait'
exp_command.c:2646: error: �struct ExpState' has no member named �wait'
exp_command.c:2651: error: �struct forked_proc' has no member named �link_status'
exp_command.c: In function �Exp_DisconnectCmd':
exp_command.c:2748: error: �ExpState' has no member named �valid'
exp_command.c:2763: error: �ExpState' has no member named �valid'
exp_command.c: In function �Exp_InterpreterObjCmd':
exp_command.c:2882: warning: passing argument 3 of �Tcl_GetIndexFromObj' from incompatible pointer type
make: *** [exp_command.o] Error 1
[root@RHEL expect-5.32]# make install
gcc -c  -I. -I. -I/usr/local/src/tcl8.5.2/generic   -DEXP_VERSION=\"5.32.1\" -DSCRIPTDIR=\"/usr/local/lib/expect5.32\" -DEXECSCRIPTDIR=\"/usr/local/lib/expect5.32\" -DTCL_DEBUGGER  -DDFLT_STTY="\"sane\""  exp_command.c
In file included from /usr/local/src/tcl8.5.2/generic/tclInt.h:3836,
                 from exp_command.c:62:
/usr/local/src/tcl8.5.2/generic/tclPort.h:27:28: error: tclUnixPort.h: No such file or directory
In file included from /usr/local/src/tcl8.5.2/generic/tclInt.h:3838,
                 from exp_command.c:62:
/usr/local/src/tcl8.5.2/generic/tclIntPlatDecls.h:98: error: expected �=', �,', �;', �asm' or �__attribute__' before �*' token
/usr/local/src/tcl8.5.2/generic/tclIntPlatDecls.h:113: warning: �struct in_addr' declared inside parameter list
/usr/local/src/tcl8.5.2/generic/tclIntPlatDecls.h:113: warning: its scope is only this definition or declaration, which is probably not what you want
/usr/local/src/tcl8.5.2/generic/tclIntPlatDecls.h:388: error: expected specifier-qualifier-list before �Tcl_DirEntry'
In file included from exp_command.c:72:
exp_command.h:111: error: expected specifier-qualifier-list before �WAIT_STATUS_TYPE'
exp_command.c: In function �expStateFromChannelName':
exp_command.c:230: warning: assignment discards qualifiers from pointer target type
exp_command.c: In function �exp_wait_zero':
exp_command.c:244: error: expected declaration specifiers before �WAIT_STATUS_TYPE'
exp_command.c:248: error: �WAIT_STATUS_TYPE' undeclared (first use in this function)
exp_command.c:248: error: (Each undeclared identifier is reported only once
exp_command.c:248: error: for each function it appears in.)
exp_command.c: In function �exp_state_prep_for_invalidation':
exp_command.c:263: error: �ExpState' has no member named �fg_armed'
exp_command.c: In function �expBusy':
exp_command.c:314: error: �ExpState' has no member named �fdBusy'
exp_command.c: In function �exp_close':
exp_command.c:335: error: �ExpState' has no member named �leaveopen'
exp_command.c: In function �exp_init_spawn_ids':
exp_command.c:452: error: �ExpState' has no member named �keepForever'
exp_command.c:455: error: �ExpState' has no member named �keepForever'
exp_command.c:459: error: �ExpState' has no member named �keepForever'
exp_command.c: In function �Exp_SpawnCmd':
exp_command.c:836: error: �ExpState' has no member named �leaveopen'
exp_command.c:843: error: �ExpState' has no member named �wait'
exp_command.c:925: warning: passing argument 1 of �expErrorLogU' discards qualifiers from pointer target type
exp_command.c:1218: error: �ExpState' has no member named �wait'
exp_command.c: In function �exp_i_parse_states':
exp_command.c:1679: warning: passing argument 4 of �Tcl_SplitList' from incompatible pointer type
exp_command.c:1690: warning: passing argument 1 of �expDiagLogU' discards qualifiers from pointer target type
exp_command.c: In function �exp_i_update':
exp_command.c:1703: warning: assignment discards qualifiers from pointer target type
exp_command.c: In function �Exp_SendObjCmd':
exp_command.c:1824: warning: passing argument 3 of �Tcl_GetIndexFromObj' from incompatible pointer type
exp_command.c: At top level:
exp_command.c:2438: error: expected specifier-qualifier-list before �WAIT_STATUS_TYPE'
exp_command.c: In function �fork_clear_all':
exp_command.c:2448: error: �struct forked_proc' has no member named �next'
exp_command.c:2449: error: �struct forked_proc' has no member named �link_status'
exp_command.c:2449: error: �not_in_use' undeclared (first use in this function)
exp_command.c: In function �fork_init':
exp_command.c:2459: error: �struct forked_proc' has no member named �link_status'
exp_command.c:2459: error: �wait_not_done' undeclared (first use in this function)
exp_command.c: In function �fork_add':
exp_command.c:2469: error: �struct forked_proc' has no member named �next'
exp_command.c:2470: error: �struct forked_proc' has no member named �link_status'
exp_command.c:2470: error: �not_in_use' undeclared (first use in this function)
exp_command.c:2476: error: �struct forked_proc' has no member named �next'
exp_command.c: In function �Exp_WaitCmd':
exp_command.c:2550: error: �struct ExpState' has no member named �wait'
exp_command.c:2558: error: �struct ExpState' has no member named �wait'
exp_command.c:2589: error: �struct forked_proc' has no member named �next'
exp_command.c:2590: error: �struct forked_proc' has no member named �link_status'
exp_command.c:2590: error: �not_in_use' undeclared (first use in this function)
exp_command.c:2592: error: �struct forked_proc' has no member named �wait_status'
exp_command.c:2624: error: �struct ExpState' has no member named �wait'
exp_command.c:2624: error: �struct forked_proc' has no member named �wait_status'
exp_command.c:2638: error: �struct ExpState' has no member named �wait'
exp_command.c:2638: error: �struct ExpState' has no member named �wait'
exp_command.c:2639: error: �struct ExpState' has no member named �wait'
exp_command.c:2639: error: �struct ExpState' has no member named �wait'
exp_command.c:2641: error: �struct ExpState' has no member named �wait'
exp_command.c:2641: error: �struct ExpState' has no member named �wait'
exp_command.c:2642: error: �struct ExpState' has no member named �wait'
exp_command.c:2642: error: �struct ExpState' has no member named �wait'
exp_command.c:2643: error: �struct ExpState' has no member named �wait'
exp_command.c:2643: error: �struct ExpState' has no member named �wait'
exp_command.c:2645: error: �struct ExpState' has no member named �wait'
exp_command.c:2645: error: �struct ExpState' has no member named �wait'
exp_command.c:2646: error: �struct ExpState' has no member named �wait'
exp_command.c:2646: error: �struct ExpState' has no member named �wait'
exp_command.c:2651: error: �struct forked_proc' has no member named �link_status'
exp_command.c: In function �Exp_DisconnectCmd':
exp_command.c:2748: error: �ExpState' has no member named �valid'
exp_command.c:2763: error: �ExpState' has no member named �valid'
exp_command.c: In function �Exp_InterpreterObjCmd':
exp_command.c:2882: warning: passing argument 3 of �Tcl_GetIndexFromObj' from incompatible pointer type
make: *** [exp_command.o] Error 1
[root@RHEL expect-5.32]# make
gcc -c  -I. -I. -I/usr/local/src/tcl8.5.2/generic   -DEXP_VERSION=\"5.32.1\" -DSCRIPTDIR=\"/usr/local/lib/expect5.32\" -DEXECSCRIPTDIR=\"/usr/local/lib/expect5.32\" -DTCL_DEBUGGER  -DDFLT_STTY="\"sane\""  exp_command.c
In file included from /usr/local/src/tcl8.5.2/generic/tclInt.h:3836,
                 from exp_command.c:62:
/usr/local/src/tcl8.5.2/generic/tclPort.h:27:28: error: tclUnixPort.h: No such file or directory
In file included from /usr/local/src/tcl8.5.2/generic/tclInt.h:3838,
                 from exp_command.c:62:
/usr/local/src/tcl8.5.2/generic/tclIntPlatDecls.h:98: error: expected �=', �,', �;', �asm' or �__attribute__' before �*' token
/usr/local/src/tcl8.5.2/generic/tclIntPlatDecls.h:113: warning: �struct in_addr' declared inside parameter list
/usr/local/src/tcl8.5.2/generic/tclIntPlatDecls.h:113: warning: its scope is only this definition or declaration, which is probably not what you want
/usr/local/src/tcl8.5.2/generic/tclIntPlatDecls.h:388: error: expected specifier-qualifier-list before �Tcl_DirEntry'
In file included from exp_command.c:72:
exp_command.h:111: error: expected specifier-qualifier-list before �WAIT_STATUS_TYPE'
exp_command.c: In function �expStateFromChannelName':
exp_command.c:230: warning: assignment discards qualifiers from pointer target type
exp_command.c: In function �exp_wait_zero':
exp_command.c:244: error: expected declaration specifiers before �WAIT_STATUS_TYPE'
exp_command.c:248: error: �WAIT_STATUS_TYPE' undeclared (first use in this function)
exp_command.c:248: error: (Each undeclared identifier is reported only once
exp_command.c:248: error: for each function it appears in.)
exp_command.c: In function �exp_state_prep_for_invalidation':
exp_command.c:263: error: �ExpState' has no member named �fg_armed'
exp_command.c: In function �expBusy':
exp_command.c:314: error: �ExpState' has no member named �fdBusy'
exp_command.c: In function �exp_close':
exp_command.c:335: error: �ExpState' has no member named �leaveopen'
exp_command.c: In function �exp_init_spawn_ids':
exp_command.c:452: error: �ExpState' has no member named �keepForever'
exp_command.c:455: error: �ExpState' has no member named �keepForever'
exp_command.c:459: error: �ExpState' has no member named �keepForever'
exp_command.c: In function �Exp_SpawnCmd':
exp_command.c:836: error: �ExpState' has no member named �leaveopen'
exp_command.c:843: error: �ExpState' has no member named �wait'
exp_command.c:925: warning: passing argument 1 of �expErrorLogU' discards qualifiers from pointer target type
exp_command.c:1218: error: �ExpState' has no member named �wait'
exp_command.c: In function �exp_i_parse_states':
exp_command.c:1679: warning: passing argument 4 of �Tcl_SplitList' from incompatible pointer type
exp_command.c:1690: warning: passing argument 1 of �expDiagLogU' discards qualifiers from pointer target type
exp_command.c: In function �exp_i_update':
exp_command.c:1703: warning: assignment discards qualifiers from pointer target type
exp_command.c: In function �Exp_SendObjCmd':
exp_command.c:1824: warning: passing argument 3 of �Tcl_GetIndexFromObj' from incompatible pointer type
exp_command.c: At top level:
exp_command.c:2438: error: expected specifier-qualifier-list before �WAIT_STATUS_TYPE'
exp_command.c: In function �fork_clear_all':
exp_command.c:2448: error: �struct forked_proc' has no member named �next'
exp_command.c:2449: error: �struct forked_proc' has no member named �link_status'
exp_command.c:2449: error: �not_in_use' undeclared (first use in this function)
exp_command.c: In function �fork_init':
exp_command.c:2459: error: �struct forked_proc' has no member named �link_status'
exp_command.c:2459: error: �wait_not_done' undeclared (first use in this function)
exp_command.c: In function �fork_add':
exp_command.c:2469: error: �struct forked_proc' has no member named �next'
exp_command.c:2470: error: �struct forked_proc' has no member named �link_status'
exp_command.c:2470: error: �not_in_use' undeclared (first use in this function)
exp_command.c:2476: error: �struct forked_proc' has no member named �next'
exp_command.c: In function �Exp_WaitCmd':
exp_command.c:2550: error: �struct ExpState' has no member named �wait'
exp_command.c:2558: error: �struct ExpState' has no member named �wait'
exp_command.c:2589: error: �struct forked_proc' has no member named �next'
exp_command.c:2590: error: �struct forked_proc' has no member named �link_status'
exp_command.c:2590: error: �not_in_use' undeclared (first use in this function)
exp_command.c:2592: error: �struct forked_proc' has no member named �wait_status'
exp_command.c:2624: error: �struct ExpState' has no member named �wait'
exp_command.c:2624: error: �struct forked_proc' has no member named �wait_status'
exp_command.c:2638: error: �struct ExpState' has no member named �wait'
exp_command.c:2638: error: �struct ExpState' has no member named �wait'
exp_command.c:2639: error: �struct ExpState' has no member named �wait'
exp_command.c:2639: error: �struct ExpState' has no member named �wait'
exp_command.c:2641: error: �struct ExpState' has no member named �wait'
exp_command.c:2641: error: �struct ExpState' has no member named �wait'
exp_command.c:2642: error: �struct ExpState' has no member named �wait'
exp_command.c:2642: error: �struct ExpState' has no member named �wait'
exp_command.c:2643: error: �struct ExpState' has no member named �wait'
exp_command.c:2643: error: �struct ExpState' has no member named �wait'
exp_command.c:2645: error: �struct ExpState' has no member named �wait'
exp_command.c:2645: error: �struct ExpState' has no member named �wait'
exp_command.c:2646: error: �struct ExpState' has no member named �wait'
exp_command.c:2646: error: �struct ExpState' has no member named �wait'
exp_command.c:2651: error: �struct forked_proc' has no member named �link_status'
exp_command.c: In function �Exp_DisconnectCmd':
exp_command.c:2748: error: �ExpState' has no member named �valid'
exp_command.c:2763: error: �ExpState' has no member named �valid'
exp_command.c: In function �Exp_InterpreterObjCmd':
exp_command.c:2882: warning: passing argument 3 of �Tcl_GetIndexFromObj' from incompatible pointer type
make: *** [exp_command.o] Error 1
[root@RHEL expect-5.32]#

Please tell me of there is any other way of installing it.

Thanks,
Vikas

Hi,
I got the same problem and then I figured out how to fix that.
I am using Ubuntu 8.04 (the newest version) and I solved that problem by reconfiguring Expect with the option --with-tcl=directory where directory contains tcl configuration (tclConfig.sh).
Hope this help

[quote=vikas027;302188047]
Hi all,

I am trying to install expect utility on RHEL 5. It is showing that we also need to install tcl also in order to run it.

I wonder why you are installing old version, while expect is by default available in EL-5

rpm -qf /usr/bin/expect
expect-5.43.0-5.1

Regards,
Bash

If you need the latest tcl/expect, etc..Check out ActiveState.
ActiveState - Dynamic Tools for Dynamic Languages
The installer, documentation, packages, etc..everything in one bundle.

I got the below error! can you help me?

/qawac/home/tbnaadh/tcl/expect-5.43 $ make

/opt/SUNWspro/WS6U2/bin/acc -c -I. -I. -I/qawac/home/tbnaadh/tcl/tcl8.5.7/generic -DEXP_VERSION=\"5.43.0\" -DSCRIPTDIR=\"/expor
t/home/tbnaadh/tcl/usr/local/lib/expect5.43\" -DEXECSCRIPTDIR=\"/export/home/tbnaadh/tcl/usr/local/lib/expect5.43\" -DTCL_DEBUGGER
-DUSE_NON_CONST -DSTTY_BIN=\"/bin/stty\" -DDFLT_STTY="\"sane\"" exp_inter.c
"/qawac/home/tbnaadh/tcl/tcl8.5.7/generic/tclPort.h", line 27: cannot find include file: "tclUnixPort.h"
"./exp_command.h", line 117: syntax error before or at: WAIT_STATUS_TYPE
"./exp_command.h", line 117: cannot recover from previous errors
*** Error code 10
make: Fatal error: Command failed for target `exp_inter.o'

*************************************************
I can see the file tclUnixPort.h in Unix directory of my tcl.

Vikas,

Were you able to resolve your issue... I am also trying to install Expect and getting same error

Command Failed for target `exp_command.o`

I am new to Unix and used following command for make

./configure --with-tcl=/usr/local/tcl8.5.3/unix/