Installing EXPECT on unix

Friends,

I thought of installing EXPECT but unable to execute 'make', its throwing errors. Am not a 'root' user, will I not be able to install EXPECT in my home directory?

What sort of errors is make throwing? Can you provide some examples?

/export/home/tbnaadh/tcl/expect-5.43 $ make test

/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_command.c
"/qawac/home/tbnaadh/tcl/tcl8.5.7/generic/tclInt.h", line 66: warning: typedef redeclared: ptrdiff_t
"/qawac/home/tbnaadh/tcl/tcl8.5.7/generic/tclPort.h", line 27: cannot find include file: "tclUnixPort.h"
"/qawac/home/tbnaadh/tcl/tcl8.5.7/generic/tclIntPlatDecls.h", line 98: syntax error before or at: *
"/qawac/home/tbnaadh/tcl/tcl8.5.7/generic/tclIntPlatDecls.h", line 98: syntax error before or at: *
"/qawac/home/tbnaadh/tcl/tcl8.5.7/generic/tclIntPlatDecls.h", line 98: warning: old-style declaration or incorrect type for: TclpRea
ddir
"/qawac/home/tbnaadh/tcl/tcl8.5.7/generic/tclIntPlatDecls.h", line 113: warning: dubious tag declaration: struct in_addr
"/qawac/home/tbnaadh/tcl/tcl8.5.7/generic/tclIntPlatDecls.h", line 394: syntax error before or at: Tcl_DirEntry
"/qawac/home/tbnaadh/tcl/tcl8.5.7/generic/tclIntPlatDecls.h", line 394: cannot recover from previous errors
*** Error code 10
make: Fatal error: Command failed for target `exp_command.o'

Where did you get the expect sources from? Is there a header (include file) named "tclUnixPort.h" on your system?

I downloaded the Expect from "http://expect.nist.gov/\#unix.". I have the below said header file on my system.

/qawac/home/tbnaadh/tcl/tcl8.5.7/unix/tclUnixPort.h

Why isn't make could not figure out this header file.

---------- Post updated at 11:09 AM ---------- Previous update was at 09:02 AM ----------

Now getting a different error. i have added the absolute path in tclPort.h file as shown below
#if defined(__WIN32__)
# include "tclWinPort.h"
#else
# include "/export/home/tbnaadh/tcl/tcl8.5.7/unix/tclUnixPort.h"
#endif

Now i am getting the below error while "make"

/export/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
"exp_inter.c", line 294: undefined symbol: TCL_REG_BOSONLY
"exp_inter.c", line 866: undefined symbol: TCL_REG_BOSONLY
*** Error code 2
make: Fatal error: Command failed for target `exp_inter.o'

That is the wrong way to include a header from a non-standard location.

You need to add a -I<path_to_location> option to the compiler.

fpmurphy,

I dont have much experience. Can you pleae make me understandable by the above statement. What should I run @ command prompt?

man gcc

You basically need to modify your Makefile.

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/