#96 Expect5.45​: on fc15 (i686) : Lot of warnings during "make" if we ignore and proceed, leads to core dumps while running the program

open
nobody
None
5
2015-02-11
2013-12-26
Priyanka
No

I've installed expect5.45.tar.gz on my linux system.

While installing, i got many warnings for the make command.
The output(partial that makes sense) was as follows.

[root@indbringup70 expect5.45]# make

gcc -DPACKAGE_NAME=\"expect\" -DPACKAGE_TARNAME=\"expect\" -DPACKAGE_VERSION=\"5.45\" -DPACKAGE_STRING=\"expect\ 5.45\" -DPACKAGE_BUGREPORT=\"\" -DBUILD_expect= -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DMODULE_SCOPE=extern\ attribute((visibility(\"hidden\"))) -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_OPEN64=1 -DHAVE_LSEEK64=1 -DHAVE_TYPE_OFF64_T=1 -DUSE_TCL_STUBS=1 -DUSE_TCL_STUBS=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_SYSMACROS_H=1 -DHAVE_SYS_FCNTL_H=1 -DRETSIGTYPE=void -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_STRUCT_TM_TM_ZONE=1 -DHAVE_TM_ZONE=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_OPENPTY=1 -DHAVE_MEMMOVE=1 -DHAVE_SYSCONF=1 -DHAVE_STRFTIME=1 -DHAVE_STRCHR=1 -DHAVE_TIMEZONE=1 -DHAVE_SIGLONGJMP=1 -DHAVE_MEMCPY=1 -DWNOHANG_BACKUP_VALUE=1 -DSELECT_MASK_TYPE=fd_set -DHAVE_TCSETATTR=1 -DPOSIX=1 -DHAVE_TERMIO=1 -DHAVE_TERMIOS=1 -DSETPGRP_VOID=1 -DHAVE_SV_TIMEZONE=1 -DHAVE_LONG_FILE_NAMES=1 -DTCL_DEBUGGER -DUSE_NON_CONST -DSCRIPTDIR=\"/usr/lib/expect5.45\" -DEXECSCRIPTDIR=\"/usr/lib/expect5.45\" -DSTTY_BIN=\"/bin/stty\" -DDFLT_STTY="\"sane\"" -I. -I"." -I"/usr/include" -pipe -O2 -fomit-frame-pointer -Wall -fPIC -c echo exp_command.c -o exp_command.o
exp_command.c: In function \u2018Exp_SpawnObjCmd\u2019:
exp_command.c:587:9: warning: unused variable \u2018ttyfd\u2019 [-Wunused-variable]
exp_command.c: In function \u2018Exp_DisconnectObjCmd\u2019:
exp_command.c:3120:9: warning: unused variable \u2018ttyfd\u2019 [-Wunused-variable]
exp_command.c: At top level:
exp_command.c:537:1: warning: \u2018expSetpgrp\u2019 defined but not used [-Wunused-function]
exp_command.c: In function \u2018Exp_SpawnObjCmd\u2019:
exp_command.c:955:22: warning: \u2018channel\u2019 may be used uninitialized in this function [-Wuninitialized]
exp_command.c:940:8: warning: \u2018write_master\u2019 may be used uninitialized in this function [-Wuninitialized]
exp_command.c:924:9: warning: \u2018wfd\u2019 may be used uninitialized in this function [-Wuninitialized]
exp_command.c:923:61: warning: \u2018rfd\u2019 may be used uninitialized in this function [-Wuninitialized]
exp_command.c: In function \u2018Exp_SendObjCmd\u2019:
exp_command.c:2140:5: warning: \u2018rc\u2019 may be used uninitialized in this function [-Wuninitialized]
exp_command.c:2063:14: warning: \u2018string\u2019 may be used uninitialized in this function [-Wuninitialized]
-pipe -O2 -fomit-frame-pointer -Wall -fPIC -c echo expect.c -o expect.o
expect.c: In function \u2018exp_eval_with_one_arg\u2019:
expect.c:287:9: warning: variable \u2018rc\u2019 set but not used [-Wunused-but-set-variable]
expect.c: In function \u2018expIRead\u2019:
expect.c:1763:9: warning: variable \u2018size\u2019 set but not used [-Wunused-but-set-variable]
expect.c: In function \u2018Exp_ExpectObjCmd\u2019:
expect.c:2547:12: warning: variable \u2018start_time\u2019 set but not used [-Wunused-but-set-variable]
expect.c: In function \u2018process_di\u2019:
expect.c:2955:12: warning: \u2018esPtr\u2019 may be used uninitialized in this function [-Wuninitialized]
expect.c: In function \u2018Exp_ExpectObjCmd\u2019:
expect.c:2735:14: warning: \u2018end_time\u2019 may be used uninitialized in this function [-Wuninitialized]
-pipe -O2 -fomit-frame-pointer -Wall -fPIC -c echo exp_inter.c -o exp_inter.o
exp_inter.c:709:13: warning: \u2018return_cmd\u2019 defined but not used [-Wunused-variable]
exp_inter.c:710:13: warning: \u2018interpreter_cmd\u2019 defined but not used [-Wunused-variable]
exp_inter.c: In function \u2018Exp_InteractObjCmd\u2019:
exp_inter.c:420:28: warning: \u2018offsetBytes\u2019 may be used uninitialized in this function [-Wuninitialized]
exp_inter.c:408:9: note: \u2018offsetBytes\u2019 was declared here
exp_inter.c:420:5: warning: \u2018echoBytes\u2019 may be used uninitialized in this function [-Wuninitialized]
exp_inter.c:407:9: note: \u2018echoBytes\u2019 was declared here
exp_inter.c:1557:11: warning: \u2018matchLen\u2019 may be used uninitialized in this function [-Wuninitialized]
exp_inter.c:1412:16: warning: \u2018previous_time\u2019 may be used uninitialized in this function [-Wuninitialized]
-pipe -O2 -fomit-frame-pointer -Wall -fPIC -c echo exp_regexp.c -o exp_regexp.o
-pipe -O2 -fomit-frame-pointer -Wall -fPIC -c echo exp_tty.c -o exp_tty.o
exp_tty.c: In function \u2018exec_stty\u2019:
exp_tty.c:323:6: warning: variable \u2018rc\u2019 set but not used [-Wunused-but-set-variable]
-pipe -O2 -fomit-frame-pointer -Wall -fPIC -c echo exp_main_sub.c -o exp_main_sub.o
exp_main_sub.c: In function \u2018exp_interpreter\u2019:
exp_main_sub.c:306:2: warning: implicit declaration of function \u2018exp_tty_cooked_echo\u2019 [-Wimplicit-function-declaration]
" -pipe -O2 -fomit-frame-pointer -Wall -fPIC -c echo exp_pty.c -o exp_pty.o
exp_pty.c:138:21: warning: \u2018oldHupHandler\u2019 defined but not used [-Wunused-variable]
" -pipe -O2 -fomit-frame-pointer -Wall -fPIC -c echo exp_trap.c -o exp_trap.o
-pipe -O2 -fomit-frame-pointer -Wall -fPIC -c echo exp_strf.c -o exp_strf.o
-pipe -O2 -fomit-frame-pointer -Wall -fPIC -c echo exp_console.c -o exp_console.o
-pipe -O2 -fomit-frame-pointer -Wall -fPIC -c echo exp_glob.c -o exp_glob.o
-pipe -O2 -fomit-frame-pointer -Wall -fPIC -c echo exp_win.c -o exp_win.o
exp_win.c: In function \u2018exp_win2_size_get\u2019:
exp_win.c:165:1: warning: control reaches end of non-void function [-Wreturn-type]
exp_win.c: In function \u2018exp_win2_size_set\u2019:
exp_win.c:154:1: warning: control reaches end of non-void function [-Wreturn-type]
exp_win.c: In function \u2018exp_window_size_get\u2019:
exp_win.c:105:1: warning: control reaches end of non-void function [-Wreturn-type]
exp_win.c: In function \u2018exp_window_size_set\u2019:
exp_win.c:90:1: warning: control reaches end of non-void function [-Wreturn-type]
gcc -DPACKAGE_NAME=\"expect\" -DPACKAGE_TARNAME=\"expect\" - -pipe -O2 -fomit-frame-pointer -Wall -fPIC -c echo exp_clib.c -o exp_clib.o
exp_clib.c: In function \u2018exp_spawnv\u2019:
exp_clib.c:1855:3: warning: implicit declaration of function \u2018exp_init_tty\u2019 [-Wimplicit-function-declaration]
exp_clib.c:1839:6: warning: unused variable \u2018ttyfd\u2019 [-Wunused-variable]
exp_clib.c: In function \u2018exp_disconnect\u2019:
exp_clib.c:2859:6: warning: unused variable \u2018ttyfd\u2019 [-Wunused-variable]
exp_clib.c: At top level:
exp_clib.c:1815:1: warning: \u2018exp_setpgrp\u2019 defined but not used [-Wunused-function]
exp_clib.c: In function \u2018expectv\u2019:
exp_clib.c:2447:6: warning: \u2018return_val\u2019 may be used uninitialized in this function [-Wuninitialized]
-pipe -O2 -fomit-frame-pointer -Wall -fPIC -c echo exp_closetcl.c -o exp_closetcl.o
" -pipe -O2 -fomit-frame-pointer -Wall -fPIC -c echo exp_memmove.c -o exp_memmove.o
-pipe -O2 -fomit-frame-pointer -Wall -fPIC -c echo exp_tty_comm.c -o exp_tty_comm.o
-pipe -O2 -fomit-frame-pointer -Wall -fPIC -c echo exp_chan.c -o exp_chan.o
exp_chan.c:61:5: warning: initialization from incompatible pointer type [enabled by default]
exp_chan.c:61:5: warning: (near initialization for \u2018expChannelType.version\u2019) [enabled by default]
exp_chan.c: In function \u2018expWaitOnAny\u2019:
exp_chan.c:568:2: warning: passing argument 2 of \u2018waitpid\u2019 from incompatible pointer type [enabled by default]
/usr/include/sys/wait.h:139:16: note: expected \u2018int \u2019 but argument is of type \u2018union wait \u2019
exp_chan.c: In function \u2018exp_background_channelhandlers_run_all\u2019:
exp_chan.c:610:6: warning: implicit declaration of function \u2018exp_background_channelhandler\u2019 [-Wimplicit-function-declaration]

Dbg.c: In function \u2018debugger_trap\u2019:
Dbg.c:632:2: warning: enumeration value \u2018none\u2019 not handled in switch [-Wswitch]
Dbg.c:632:2: warning: enumeration value \u2018up\u2019 not handled in switch [-Wswitch]
Dbg.c:632:2: warning: enumeration value \u2018down\u2019 not handled in switch [-Wswitch]
Dbg.c:632:2: warning: enumeration value \u2018where\u2019 not handled in switch [-Wswitch]
Dbg.c:698:2: warning: enumeration value \u2018none\u2019 not handled in switch [-Wswitch]
Dbg.c:698:2: warning: enumeration value \u2018up\u2019 not handled in switch [-Wswitch]
Dbg.c:698:2: warning: enumeration value \u2018down\u2019 not handled in switch [-Wswitch]
Dbg.c:293:18: warning: \u2018framePtr\u2019 may be used uninitialized in this function [-Wuninitialized]
Dbg.c:242:16: note: \u2018framePtr\u2019 was declared here

-pipe -O2 -fomit-frame-pointer -Wall -fPIC  -c `echo pty_termios.c` -o pty_termios.o

pty_termios.c: In function \u2018exp_getptymaster\u2019:
pty_termios.c:473:2: warning: implicit declaration of function \u2018openpty\u2019 [-Wimplicit-function-declaration]
pty_termios.c:379:6: warning: unused variable \u2018num\u2019 [-Wunused-variable]
pty_termios.c:376:14: warning: unused variable \u2018stat_buf\u2019 [-Wunused-variable]
pty_termios.c:375:14: warning: unused variable \u2018bank\u2019 [-Wunused-variable]
pty_termios.c:375:8: warning: unused variable \u2018hex\u2019 [-Wunused-variable]
pty_termios.c: In function \u2018exp_getptyslave\u2019:
pty_termios.c:644:3: warning: implicit declaration of function \u2018expErrnoMsg\u2019 [-Wimplicit-function-declaration]
pty_termios.c:644:3: warning: format \u2018%s\u2019 expects argument of type \u2018char *\u2019, but argument 5 has type \u2018int\u2019 [-Wformat]
pty_termios.c:639:7: warning: unused variable \u2018buf\u2019 [-Wunused-variable]
pty_termios.c:638:13: warning: unused variable \u2018slave2\u2019 [-Wunused-variable]
gcc -DPACKAGE_NAME=\"expect\" -DPACKAGE_TARNAME=\"expect\" -DPACKAGE_VERSION=\"5.45\" -DPACKAGE_STRING=\"expect\ 5.45\" -DPACKAGE_BUGREPORT=\"\" -DBUILD_expect= -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DMODULE_SCOPE=extern\ attribute((visibility(\"hidden\"))) -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_OPEN64=1 -DHAVE_LSEEK64=1 -DHAVE_TYPE_OFF64_T=1 -DUSE_TCL_STUBS=1 -DUSE_TCL_STUBS=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_SYSMACROS_H=1 -DHAVE_SYS_FCNTL_H=1 -DRETSIGTYPE=void -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_STRUCT_TM_TM_ZONE=1 -DHAVE_TM_ZONE=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_OPENPTY=1 -DHAVE_MEMMOVE=1 -DHAVE_SYSCONF=1 -DHAVE_STRFTIME=1 -DHAVE_STRCHR=1 -DHAVE_TIMEZONE=1 -DHAVE_SIGLONGJMP=1 -DHAVE_MEMCPY=1 -DWNOHANG_BACKUP_VALUE=1 -DSELECT_MASK_TYPE=fd_set -DHAVE_TCSETATTR=1 -DPOSIX=1 -DHAVE_TERMIO=1 -DHAVE_TERMIOS=1 -DSETPGRP_VOID=1 -DHAVE_SV_TIMEZONE=1 -DHAVE_LONG_FILE_NAMES=1 -DTCL_DEBUGGER -DUSE_NON_CONST -DSCRIPTDIR=\"/usr/lib/expect5.45\" -DEXECSCRIPTDIR=\"/usr/lib/expect5.45\" -DSTTY_BIN=\"/bin/stty\" -DDFLT_STTY="\"sane\"" -I. -I"." -I"/usr/include" -pipe -O2 -fomit-frame-pointer -Wall -fPIC -c echo exp_select.c -o exp_select.o
gcc -DPACKAGE_NAME=\"expect\" -DPACKAGE_TARNAME=\"expect\" -DPACKAGE_VERSION=\"5.45\" -DPACKAGE_STRING=\"expect\ 5.45\" -DPACKAGE_BUGREPORT=\"\" -DBUILD_expect= -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DMODULE_SCOPE=extern\ attribute((visibility(\"hidden\"))) -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_OPEN64=1 -DHAVE_LSEEK64=1 -DHAVE_TYPE_OFF64_T=1 -DUSE_TCL_STUBS=1 -DUSE_TCL_STUBS=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_SYSMACROS_H=1 -DHAVE_SYS_FCNTL_H=1 -DRETSIGTYPE=void -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_STRUCT_TM_TM_ZONE=1 -DHAVE_TM_ZONE=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_OPENPTY=1 -DHAVE_MEMMOVE=1 -DHAVE_SYSCONF=1 -DHAVE_STRFTIME=1 -DHAVE_STRCHR=1 -DHAVE_TIMEZONE=1 -DHAVE_SIGLONGJMP=1 -DHAVE_MEMCPY=1 -DWNOHANG_BACKUP_VALUE=1 -DSELECT_MASK_TYPE=fd_set -DHAVE_TCSETATTR=1 -DPOSIX=1 -DHAVE_TERMIO=1 -DHAVE_TERMIOS=1 -DSETPGRP_VOID=1 -DHAVE_SV_TIMEZONE=1 -DHAVE_LONG_FILE_NAMES=1 -DTCL_DEBUGGER -DUSE_NON_CONST -DSCRIPTDIR=\"/usr/lib/expect5.45\" -DEXECSCRIPTDIR=\"/usr/lib/expect5.45\" -DSTTY_BIN=\"/bin/stty\" -DDFLT_STTY="\"sane\"" -I. -I"." -I"/usr/include" -pipe -O2 -fomit-frame-pointer -Wall -fPIC -c echo exp_event.c -o exp_event.o
exp_event.c: In function \u2018exp_unblock_background_channelhandler\u2019:
exp_event.c:116:5: warning: enumeration value \u2018armed\u2019 not handled in switch [-Wswitch]
exp_event.c:116:5: warning: enumeration value \u2018unarmed\u2019 not handled in switch [-Wswitch]
rm -f libexpect5.45.so
gcc -shared -pipe -O2 -fomit-frame-pointer -Wall -fPIC -Wl,--export-dynamic -o libexpect5.45.so exp_command.o expect.o exp_inter.o exp_regexp.o exp_tty.o exp_log.o exp_main_sub.o exp_pty.o exp_trap.o exp_strf.o exp_console.o exp_glob.o exp_win.o exp_clib.o exp_closetcl.o exp_memmove.o exp_tty_comm.o exp_chan.o Dbg.o pty_termios.o exp_select.o exp_event.o -lutil -lieee -lm -Wl,-rpath,/usr/lib -L/usr/lib -ltclstub8.6
: libexpect5.45.so

gcc \ -pipe -O2 -fomit-frame-pointer -Wall -fPIC \ -Wl,--export-dynamic \ -o expect exp_main_exp.o \ -L/root/expect5.45 -lexpect5.45 \ -L/usr/lib -ltcl8.6 \ -ldl -lieee -lm \ -Wl,-rpath,/usr/lib \ -Wl,-rpath,/usr/lib/expect5.45
: expect
(echo 'if {![package vsatisfies [package provide Tcl] 8.6]} {return}' ; \ echo 'package ifneeded Expect 5.45 \ [list load [file join $dir libexpect5.45.so]]'\ ) > pkgIndex.tcl

[root@indbringup70 expect5.45]#

Warnings during make is usually not a serious issue, so i went ahead and installed. but now, when i execute the c program using the functions defined in expect.c it gives,

Segmentation fault(Core dumped)

Please tell me what is the solution for this and how to execute the program without any errors.

Thanks in advance

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks