Página 1 de 1

problema para instalar Expect

MensagemEnviado: 08 Jun 2010 14:05
por lasfclestat
Prezados....

Estou tentando instalar o Expect porém está dando o erro descrito abaixo:

Código: Selecionar todos

# make
gcc -c  -I. -I. -I/usr/src/tcl8.5.8/generic -I/usr/src/tk8.5.8/generic  -DEXP_VERSION=\"5.43.0\" -DSCRIPTDIR=\"/usr/local/lib/expect5.43\" -DEXECSCRIPTDIR=\"/usr/local/lib/expect5.43\" -DTCL_DEBUGGER -DUSE_NON_CONST -DSTTY_BIN=\"/bin/stty\" -pipe  -DDFLT_STTY="\"sane\""  exp_command.c
In file included from /usr/src/tcl8.5.8/generic/tclInt.h:3946,
                 from exp_command.c:62:
/usr/src/tcl8.5.8/generic/tclPort.h:27:28: error: tclUnixPort.h: No such file or directory
In file included from /usr/src/tcl8.5.8/generic/tclInt.h:3948,
                 from exp_command.c:62:
/usr/src/tcl8.5.8/generic/tclIntPlatDecls.h:98: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/usr/src/tcl8.5.8/generic/tclIntPlatDecls.h:113: warning: ‘struct in_addr’ declared inside parameter list
/usr/src/tcl8.5.8/generic/tclIntPlatDecls.h:113: warning: its scope is only this definition or declaration, which is probably not what you want
/usr/src/tcl8.5.8/generic/tclIntPlatDecls.h:394: error: expected specifier-qualifier-list before ‘Tcl_DirEntry’
In file included from exp_command.c:72:
exp_command.h:117: error: expected specifier-qualifier-list before ‘WAIT_STATUS_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:345: error: ‘ExpState’ has no member named ‘leaveopen’
exp_command.c: In function ‘exp_init_spawn_ids’:
exp_command.c:462: error: ‘ExpState’ has no member named ‘keepForever’
exp_command.c:465: error: ‘ExpState’ has no member named ‘keepForever’
exp_command.c:469: error: ‘ExpState’ has no member named ‘keepForever’
exp_command.c: In function ‘Exp_SpawnCmd’:
exp_command.c:849: error: ‘ExpState’ has no member named ‘leaveopen’
exp_command.c:856: error: ‘ExpState’ has no member named ‘wait’
exp_command.c:1234: error: ‘ExpState’ has no member named ‘wait’
exp_command.c: At top level:
exp_command.c:2465: error: expected specifier-qualifier-list before ‘WAIT_STATUS_TYPE’
exp_command.c: In function ‘fork_clear_all’:
exp_command.c:2475: error: ‘struct forked_proc’ has no member named ‘next’
exp_command.c:2476: error: ‘struct forked_proc’ has no member named ‘link_status’
exp_command.c:2476: error: ‘not_in_use’ undeclared (first use in this function)
exp_command.c: In function ‘fork_init’:
exp_command.c:2486: error: ‘struct forked_proc’ has no member named ‘link_status’
exp_command.c:2486: error: ‘wait_not_done’ undeclared (first use in this function)
exp_command.c: In function ‘fork_add’:
exp_command.c:2496: error: ‘struct forked_proc’ has no member named ‘next’
exp_command.c:2497: error: ‘struct forked_proc’ has no member named ‘link_status’
exp_command.c:2497: error: ‘not_in_use’ undeclared (first use in this function)
exp_command.c:2503: error: ‘struct forked_proc’ has no member named ‘next’
exp_command.c: In function ‘Exp_WaitCmd’:
exp_command.c:2577: error: ‘struct ExpState’ has no member named ‘wait’
exp_command.c:2585: error: ‘struct ExpState’ has no member named ‘wait’
exp_command.c:2616: error: ‘struct forked_proc’ has no member named ‘next’
exp_command.c:2617: error: ‘struct forked_proc’ has no member named ‘link_status’
exp_command.c:2617: error: ‘not_in_use’ undeclared (first use in this function)
exp_command.c:2619: error: ‘struct forked_proc’ has no member named ‘wait_status’
exp_command.c:2651: error: ‘struct ExpState’ has no member named ‘wait’
exp_command.c:2651: error: ‘struct forked_proc’ has no member named ‘wait_status’
exp_command.c:2665: error: ‘struct ExpState’ has no member named ‘wait’
exp_command.c:2665: error: ‘struct ExpState’ has no member named ‘wait’
exp_command.c:2666: error: ‘struct ExpState’ has no member named ‘wait’
exp_command.c:2666: error: ‘struct ExpState’ has no member named ‘wait’
exp_command.c:2668: error: ‘struct ExpState’ has no member named ‘wait’
exp_command.c:2668: error: ‘struct ExpState’ has no member named ‘wait’
exp_command.c:2669: error: ‘struct ExpState’ has no member named ‘wait’
exp_command.c:2669: error: ‘struct ExpState’ has no member named ‘wait’
exp_command.c:2670: error: ‘struct ExpState’ has no member named ‘wait’
exp_command.c:2670: error: ‘struct ExpState’ has no member named ‘wait’
exp_command.c:2672: error: ‘struct ExpState’ has no member named ‘wait’
exp_command.c:2672: error: ‘struct ExpState’ has no member named ‘wait’
exp_command.c:2673: error: ‘struct ExpState’ has no member named ‘wait’
exp_command.c:2673: error: ‘struct ExpState’ has no member named ‘wait’
exp_command.c:2678: error: ‘struct forked_proc’ has no member named ‘link_status’
exp_command.c: In function ‘Exp_DisconnectCmd’:
exp_command.c:2775: error: ‘ExpState’ has no member named ‘valid’
exp_command.c:2790: error: ‘ExpState’ has no member named ‘valid’
make: *** [exp_command.o] Error 1




Eu abaixei os programas para instalar do sites abaixos.

http://expect.nist.gov/
http://www.tcl.tk/doc/howto/compile.html

Estou tentando em duas maquinas com linux fedora 7 e esta dando o erro descrito acima.

Em umas das maquinas dei o comando yum instal expect, instalou corretamente, porem na outra maquina, eu não tenho interface com a internet disponivel.

Alguem sabe o que poderia estar ocasionando esse erro?

Desde ja agradeço.

[]s

MensagemEnviado: 08 Jun 2010 14:15
por xultz
O problema é este:
tclUnixPort.h: No such file or directory

Todos os demais erros são por causa deste primeiro.

Eu não sei como procurar qual pacote tem esse arquivo (muito provavelmente vai ser um tcl alguma coisa devel), mas soltando esse arquivo .h no google + fedora retorna várias dicas.

MensagemEnviado: 08 Jun 2010 15:00
por lasfclestat
Obrigado pela dica, estou procurando por esses arquivo.
Qdo conseguir solucionar eu posto o resultado.

Obrigado

MensagemEnviado: 08 Jun 2010 15:51
por lasfclestat
Eu instalei pelo Packge manager o pacote tcl-devel-8.4.19-16.fc7.i386

esse pacote instala...
usr/include/tcl-private
/usr/include/tcl-private/generic
/usr/include/tcl-private/generic/regcustom.h
/usr/include/tcl-private/generic/regerrs.h
/usr/include/tcl-private/generic/regex.h
/usr/include/tcl-private/generic/regguts.h
/usr/include/tcl-private/generic/tcl.h
/usr/include/tcl-private/generic/tclCompile.h
/usr/include/tcl-private/generic/tclDecls.h
/usr/include/tcl-private/generic/tclIO.h
/usr/include/tcl-private/generic/tclInitScript.h
/usr/include/tcl-private/generic/tclInt.h
/usr/include/tcl-private/generic/tclIntDecls.h
/usr/include/tcl-private/generic/tclIntPlatDecls.h
/usr/include/tcl-private/generic/tclMath.h
/usr/include/tcl-private/generic/tclPlatDecls.h
/usr/include/tcl-private/generic/tclPort.h
/usr/include/tcl-private/generic/tclRegexp.h
/usr/include/tcl-private/unix
/usr/include/tcl-private/unix/tclUnixPort.h
/usr/include/tcl-private/unix/tclUnixThrd.h
/usr/include/tcl.h
/usr/include/tclDecls.h
/usr/include/tclPlatDecls.h
/usr/lib64/libtcl.so
/usr/lib64/libtclstub8.4.a
/usr/lib64/tclConfig.sh

Pedi para instalar novamente e continuou dando o mesmo erro, sendo assim eu copiei o arquivo usr/include/tcl-private/unix/tclUnixPort.h para /usr/src/tcl8.5.8/generic/tclUnixPort.h

Ao mandar instalar novamente (make) apareceu um novo erro:

Código: Selecionar todos

# make
gcc -c  -I. -I. -I/usr/src/tcl8.5.8/generic -I/usr/src/tk8.5.8/generic  -DEXP_VERSION=\"5.43.0\" -DSCRIPTDIR=\"/usr/local/lib/expect5.43\" -DEXECSCRIPTDIR=\"/usr/local/lib/expect5.43\" -DTCL_DEBUGGER -DUSE_NON_CONST -DSTTY_BIN=\"/bin/stty\"  -DDFLT_STTY="\"sane\""  expect.c
In file included from /usr/src/tcl8.5.8/generic/tclInt.h:3948,
                 from /usr/src/tcl8.5.8/generic/tclUnixPort.h:29,
                 from /usr/src/tcl8.5.8/generic/tclPort.h:27,
                 from exp_command.h:26,
                 from expect.c:34:
/usr/src/tcl8.5.8/generic/tclIntPlatDecls.h:98: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/usr/src/tcl8.5.8/generic/tclIntPlatDecls.h:113: warning: ‘struct in_addr’ declared inside parameter list
/usr/src/tcl8.5.8/generic/tclIntPlatDecls.h:113: warning: its scope is only this definition or declaration, which is probably not what you want
/usr/src/tcl8.5.8/generic/tclIntPlatDecls.h:394: error: expected specifier-qualifier-list before ‘Tcl_DirEntry’
expect.c: In function ‘exp_eval_with_one_arg’:
expect.c:346: warning: assignment discards qualifiers from pointer target type
make: *** [expect.o] Error 1





Código: Selecionar todos

tclIntPlatDecls.h

#define TclpReaddir_TCL_DECLARED
/* 10 */
EXTERN Tcl_DirEntry *   TclpReaddir (DIR * dir); [b]//[Linha 98][/b]
#endif

#ifndef TclpInetNtoa_TCL_DECLARED
#define TclpInetNtoa_TCL_DECLARED
/* 13 */
EXTERN char *      TclpInetNtoa (struct in_addr addr); [b]//[linha 113][/b]
#endif

#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
    void (*tclGetAndDetachPids) (Tcl_Interp * interp, Tcl_Channel chan); /* 0 */
    int (*tclpCloseFile) (TclFile file); /* 1 */
    Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr); /* 2 */
    int (*tclpCreatePipe) (TclFile * readPipe, TclFile * writePipe); /* 3 */
    int (*tclpCreateProcess) (Tcl_Interp * interp, int argc, CONST char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); /* 4 */
    void *reserved5;
    TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */
    TclFile (*tclpOpenFile) (CONST char * fname, int mode); /* 7 */
    int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */
    TclFile (*tclpCreateTempFile) (CONST char * contents); /* 9 */
    Tcl_DirEntry * (*tclpReaddir) (DIR * dir); /* 10 */ [b]//[Linha 394][/b]
    struct tm * (*tclpLocaltime_unix) (CONST time_t * clock); /* 11 */
    struct tm * (*tclpGmtime_unix) (CONST time_t * clock); /* 12 */
    char * (*tclpInetNtoa) (struct in_addr addr); /* 13 */
    int (*tclUnixCopyFile) (CONST char * src, CONST char * dst, CONST Tcl_StatBuf * statBufPtr, int dontCopyAtts); /* 14 */
#endif /* UNIX */



Hoje a noite tentarei instalar no ubuntu, para ver se acontece os mesmos erros....

[]s