Debug mode on + getopts dvlhkr opt + shift 1 + case "" in + '[' -z ']' + tty -s + trap ErrorCheck EXIT + '[' '!' -z '' ']' + EXTRA_ARGS= + RUN_IN_PLACE=yes + echo RUN_IN_PLACE=yes + LINUXCNCVERSION=2.6.0~pre + export LINUXCNCVERSION + INIVAR=inivar + HALCMD='halcmd ' + PICKCONFIG='/usr/bin/wish8.5 /home/saahil/git/linuxcnc/tcl/bin/pickconfig.tcl' + LINUXCNC_EMCSH=/usr/bin/wish8.5 + echo LINUXCNC_DIR= + echo LINUXCNC_BIN_DIR=/home/saahil/git/linuxcnc/bin + echo LINUXCNC_TCL_DIR=/home/saahil/git/linuxcnc/tcl + echo LINUXCNC_SCRIPT_DIR= + echo LINUXCNC_RTLIB_DIR=/home/saahil/git/linuxcnc/rtlib + echo LINUXCNC_CONFIG_DIR= + echo LINUXCNC_LANG_DIR=/home/saahil/git/linuxcnc/src/objects + echo INIVAR=inivar + echo HALCMD=halcmd + echo LINUXCNC_EMCSH=/usr/bin/wish8.5 + export LINUXCNC_TCL_DIR + export LINUXCNC_EMCSH + export LINUXCNC_HELP_DIR + export LINUXCNC_LANG_DIR + export REALTIME + export HALCMD + '[' -z ']' + echo 'LINUXCNC - 2.6.0~pre' + '[' '!' -z '' ']' + '[' '!' -n '' ']' ++ /usr/bin/wish8.5 /home/saahil/git/linuxcnc/tcl/bin/pickconfig.tcl + INIFILE=/home/saahil/git/linuxcnc/configs/sim/axis/axis.ini + '[' '!' -n /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini ']' + INI_NAME=axis.ini + INI_DIR=/home/saahil/git/linuxcnc/configs/sim/axis + CONFIG_DIR=/home/saahil/git/linuxcnc/configs/sim/axis + export CONFIG_DIR + export PATH=/home/saahil/git/linuxcnc/configs/sim/axis/bin:/home/saahil/git/linuxcnc/scripts:/home/saahil/git/linuxcnc/bin:/home/saahil/git/linuxcnc/bin:/home/saahil/git/linuxcnc/scripts:/home/saahil/git/linuxcnc/tcl:/usr/lib/x86_64-linux-gnu/libfm:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + PATH=/home/saahil/git/linuxcnc/configs/sim/axis/bin:/home/saahil/git/linuxcnc/scripts:/home/saahil/git/linuxcnc/bin:/home/saahil/git/linuxcnc/bin:/home/saahil/git/linuxcnc/scripts:/home/saahil/git/linuxcnc/tcl:/usr/lib/x86_64-linux-gnu/libfm:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + '[' -z ']' + echo 'Machine configuration directory is '\''/home/saahil/git/linuxcnc/configs/sim/axis'\''' + echo 'Machine configuration file is '\''axis.ini'\''' + '[' '!' -f /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini ']' + echo INIFILE=/home/saahil/git/linuxcnc/configs/sim/axis/axis.ini + retval= + GetFromIni PARAMETER_FILE RS274NGC + name=PARAMETER_FILE ++ inivar -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -var PARAMETER_FILE -sec RS274NGC + retval=sim.var + '[' '!' -n PARAMETER_FILE ']' + echo PARAMETER_FILE=sim.var + RS274NGC_PARAMFILE=sim.var + GetFromIniEx MOT MOT EMCMOT EMCMOT motmod + original_var='[MOT]MOT' + '[' 5 -ge 2 ']' ++ inivar -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -var MOT -sec MOT + retval= + shift 2 + '[' 3 -ge 2 ']' ++ inivar -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -var EMCMOT -sec EMCMOT + retval=motmod + return + EMCMOT=motmod.so + GetFromIniEx IO IO EMCIO EMCIO io + original_var='[IO]IO' + '[' 5 -ge 2 ']' ++ inivar -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -var IO -sec IO + retval= + shift 2 + '[' 3 -ge 2 ']' ++ inivar -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -var EMCIO -sec EMCIO + retval=io + return + EMCIO=io + GetFromIni TASK TASK + name=TASK ++ inivar -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -var TASK -sec TASK + retval=milltask + '[' '!' -n TASK ']' + echo TASK=milltask + EMCTASK=milltask + '[' milltask = emctask ']' + EMCSERVER=linuxcncsvr + GetFromIniQuiet HALUI HAL + name=HALUI ++ inivar -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -var HALUI -sec HAL + retval=halui + '[' '!' -n HALUI ']' + echo HALUI=halui + HALUI=halui + GetFromIni DISPLAY DISPLAY + name=DISPLAY ++ inivar -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -var DISPLAY -sec DISPLAY + retval=axis + '[' '!' -n DISPLAY ']' + echo DISPLAY=axis ++ set -- axis ++ echo axis + EMCDISPLAY=axis ++ set -- axis ++ shift ++ echo + EMCDISPLAYARGS= + case $EMCDISPLAY in + GetFromIniEx NML_FILE LINUXCNC NML_FILE EMC /home/saahil/git/linuxcnc/configs/common/linuxcnc.nml + original_var='[LINUXCNC]NML_FILE' + '[' 5 -ge 2 ']' ++ inivar -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -var NML_FILE -sec LINUXCNC + retval= + shift 2 + '[' 3 -ge 2 ']' ++ inivar -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -var NML_FILE -sec EMC + retval= + shift 2 + '[' 1 -ge 2 ']' + '[' 1 -eq 0 ']' + retval=/home/saahil/git/linuxcnc/configs/common/linuxcnc.nml + NMLFILE=/home/saahil/git/linuxcnc/configs/common/linuxcnc.nml + export NMLFILE + KILL_TASK= + KILL_TIMEOUT=20 + LOCKFILE=/tmp/linuxcnc.lock + '[' -f /tmp/linuxcnc.lock ']' + echo Starting LinuxCNC... + trap 'Cleanup ; exit 0' SIGINT SIGTERM + cd /home/saahil/git/linuxcnc/configs/sim/axis + touch /tmp/linuxcnc.lock ++ inivar -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -var INTRO_GRAPHIC -sec DISPLAY + img=linuxcnc.gif ++ inivar -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -var INTRO_TIME -sec DISPLAY + imgtime=5 + '[' 5 = '' ']' + '[' linuxcnc.gif '!=' '' ']' + '[' -e linuxcnc.gif ']' + '[' -e /home/saahil/git/linuxcnc/configs/sim/axis/linuxcnc.gif ']' + '[' -e /home/saahil/git/linuxcnc/linuxcnc.gif ']' + img=/home/saahil/git/linuxcnc/linuxcnc.gif + '[' /home/saahil/git/linuxcnc/linuxcnc.gif '!=' '' ']' + '[' -x /home/saahil/git/linuxcnc/tcl/bin/popimage ']' + echo 'Starting LinuxCNC server program: linuxcncsvr' + /home/saahil/git/linuxcnc/tcl/bin/popimage /home/saahil/git/linuxcnc/linuxcnc.gif 5 + program_available linuxcncsvr + type -path linuxcncsvr + export INI_FILE_NAME=/home/saahil/git/linuxcnc/configs/sim/axis/axis.ini + INI_FILE_NAME=/home/saahil/git/linuxcnc/configs/sim/axis/axis.ini + sleep 1 + linuxcncsvr -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini + echo 'Loading Real Time OS, RTAPI, and HAL_LIB modules' + /home/saahil/git/linuxcnc/scripts/realtime start + export HAL_RTMOD_DIR=/home/saahil/git/linuxcnc/rtlib + HAL_RTMOD_DIR=/home/saahil/git/linuxcnc/rtlib + '[' io '!=' '' ']' + echo 'Starting LinuxCNC IO program: io' + program_available io + type -path io + echo io started + halcmd loadusr -Wn iocontrol io -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini + echo halcmd loadusr io started + '[' -n halui ']' + echo 'Starting HAL User Interface program: halui' + program_available halui + type -path halui + halcmd loadusr -Wn halui halui -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini ++ inivar -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -var TWOPASS -sec HAL -num 1 + TWOPASS= + '[' -n '' ']' + NUM=1 ++ inivar -tildeexpand -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -var HALFILE -sec HAL -num 1 + CFGFILE=core_sim.hal + '[' -n core_sim.hal ']' + case $CFGFILE in + halcmd -i /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -f core_sim.hal + NUM=2 ++ inivar -tildeexpand -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -var HALFILE -sec HAL -num 2 + CFGFILE=sim_spindle_encoder.hal + '[' -n sim_spindle_encoder.hal ']' + case $CFGFILE in + halcmd -i /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -f sim_spindle_encoder.hal + NUM=3 ++ inivar -tildeexpand -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -var HALFILE -sec HAL -num 3 + CFGFILE=axis_manualtoolchange.hal + '[' -n axis_manualtoolchange.hal ']' + case $CFGFILE in + halcmd -i /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -f axis_manualtoolchange.hal + NUM=4 ++ inivar -tildeexpand -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -var HALFILE -sec HAL -num 4 + CFGFILE=simulated_home.hal + '[' -n simulated_home.hal ']' + case $CFGFILE in + halcmd -i /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -f simulated_home.hal + NUM=5 ++ inivar -tildeexpand -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -var HALFILE -sec HAL -num 5 + CFGFILE=check_constraints.hal + '[' -n check_constraints.hal ']' + case $CFGFILE in + halcmd -i /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -f check_constraints.hal + NUM=6 ++ inivar -tildeexpand -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -var HALFILE -sec HAL -num 6 + CFGFILE= + '[' -n '' ']' + NUM=1 ++ inivar -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -var HALCMD -sec HAL -num 1 + HALCOMMAND= + '[' -n '' ']' + halcmd start + echo 'Starting TASK program: milltask' + program_available milltask + type -path milltask + unset LD_PRELOAD + '[' -n '' ']' + echo task pid=22445 + echo 'Starting DISPLAY program: axis' + result=0 + case $EMCDISPLAY in + program_available axis + type -path axis + axis -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini + milltask -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini Traceback (most recent call last): File "/home/saahil/git/linuxcnc/bin/hal_manualtoolchange", line 66, in nf.start(app); nf.makecommand(app, "_", _) File "/home/saahil/git/linuxcnc/lib/python/nf.py", line 119, in start source_lib_tcl(r, "support.tcl") File "/home/saahil/git/linuxcnc/lib/python/nf.py", line 111, in source_lib_tcl r.tk.call("source", os.path.join(tcl_libdir, f)) _tkinter.TclError: can't find package Img Traceback (most recent call last): File "/home/saahil/git/linuxcnc/bin/axis", line 123, in nf.start(root_window) File "/home/saahil/git/linuxcnc/lib/python/nf.py", line 119, in start source_lib_tcl(r, "support.tcl") File "/home/saahil/git/linuxcnc/lib/python/nf.py", line 111, in source_lib_tcl r.tk.call("source", os.path.join(tcl_libdir, f)) _tkinter.TclError: can't find package Img + result=1 + Cleanup + echo 'Shutting down and cleaning up LinuxCNC...' + for KILL_TASK in xlinuxcnc ylinuxcnc linuxcncpanel keystick iosh linuxcncsh linuxcncrsh linuxcnctop mdi debuglevel + /bin/pidof -x xlinuxcnc + for KILL_TASK in xlinuxcnc ylinuxcnc linuxcncpanel keystick iosh linuxcncsh linuxcncrsh linuxcnctop mdi debuglevel + /bin/pidof -x ylinuxcnc + for KILL_TASK in xlinuxcnc ylinuxcnc linuxcncpanel keystick iosh linuxcncsh linuxcncrsh linuxcnctop mdi debuglevel + /bin/pidof -x linuxcncpanel + for KILL_TASK in xlinuxcnc ylinuxcnc linuxcncpanel keystick iosh linuxcncsh linuxcncrsh linuxcnctop mdi debuglevel + /bin/pidof -x keystick + for KILL_TASK in xlinuxcnc ylinuxcnc linuxcncpanel keystick iosh linuxcncsh linuxcncrsh linuxcnctop mdi debuglevel + /bin/pidof -x iosh + for KILL_TASK in xlinuxcnc ylinuxcnc linuxcncpanel keystick iosh linuxcncsh linuxcncrsh linuxcnctop mdi debuglevel + /bin/pidof -x linuxcncsh + for KILL_TASK in xlinuxcnc ylinuxcnc linuxcncpanel keystick iosh linuxcncsh linuxcncrsh linuxcnctop mdi debuglevel + /bin/pidof -x linuxcncrsh + for KILL_TASK in xlinuxcnc ylinuxcnc linuxcncpanel keystick iosh linuxcncsh linuxcncrsh linuxcnctop mdi debuglevel + /bin/pidof -x linuxcnctop + for KILL_TASK in xlinuxcnc ylinuxcnc linuxcncpanel keystick iosh linuxcncsh linuxcncrsh linuxcnctop mdi debuglevel + /bin/pidof -x mdi + for KILL_TASK in xlinuxcnc ylinuxcnc linuxcncpanel keystick iosh linuxcncsh linuxcncrsh linuxcnctop mdi debuglevel + /bin/pidof -x debuglevel + program_available axis-remote + type -path axis-remote + '[' '!' -z :0.0 ']' + axis-remote --ping + '[' '' = other ']' ++ inivar -ini /home/saahil/git/linuxcnc/configs/sim/axis/axis.ini -var SHUTDOWN -sec HAL + SHUTDOWN= + '[' -n '' ']' + for KILL_TASK in linuxcncsvr milltask + /bin/pidof -x linuxcncsvr 22379 + KillTaskWithTimeout + '[' '!' -n '' ']' ++ /bin/pidof -x linuxcncsvr + KILL_PIDS=22379 + '[' '!' -n 22379 ']' + for KILL_PID in '$KILL_PIDS' + echo 'Killing task linuxcncsvr, PID=22379' + /bin/kill 22379 + WAIT=20 + '[' 20 -gt 1 ']' + /bin/ps 22379 PID TTY STAT TIME COMMAND + WAIT=0 + '[' 0 -gt 1 ']' + '[' 0 -gt 0 ']' + '[' 0 -gt 0 ']' + KILL_PIDS= + KILL_TASK= + for KILL_TASK in linuxcncsvr milltask + /bin/pidof -x milltask 22445 + KillTaskWithTimeout + '[' '!' -n '' ']' ++ /bin/pidof -x milltask + KILL_PIDS=22445 + '[' '!' -n 22445 ']' + for KILL_PID in '$KILL_PIDS' + echo 'Killing task milltask, PID=22445' + /bin/kill 22445 + WAIT=20 + '[' 20 -gt 1 ']' + /bin/ps 22445 PID TTY STAT TIME COMMAND + WAIT=0 + '[' 0 -gt 1 ']' + '[' 0 -gt 0 ']' + '[' 0 -gt 0 ']' + KILL_PIDS= + KILL_TASK= + echo 'Stopping realtime threads' Stopping realtime threads + halcmd stop + echo 'Unloading hal components' Unloading hal components + halcmd unload all ++ seq 10 + for i in '`seq 10`' ++ halcmd list comp ++ wc -w + '[' 1 = 1 ']' + break + echo 'Removing HAL_LIB, RTAPI, and Real Time OS modules' + /home/saahil/git/linuxcnc/scripts/realtime stop + echo 'Removing NML shared memory segments' + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + ipcrm -M 1001 + read b x t x x x x x x m x + case $b$t in + ipcrm -M 1002 + read b x t x x x x x x m x + case $b$t in + ipcrm -M 1003 + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + ipcrm -M 1004 + read b x t x x x x x x m x + case $b$t in + ipcrm -M 1005 + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + case $b$t in + read b x t x x x x x x m x + '[' -f /tmp/linuxcnc.lock ']' + rm /tmp/linuxcnc.lock + echo 'Cleanup done' + exit 1 + ErrorCheck + result=1 + '[' '!' -z :0.0 ']' + echo 'catch {send -async popimage destroy .}; destroy .' + /usr/bin/wish8.5 + '[' 1 -ne 0 ']' + tty -s + '[' -f /dev/fd/2 ']' + echo '(debug information was sent to stderr)' + '[' -f /tmp/linuxcnc.print.GrY3a5 ']' + cp /tmp/linuxcnc.print.GrY3a5 /home/saahil/linuxcnc_print.txt + echo 'LinuxCNC terminated with an error. You can find more information in the log: /home/saahil/linuxcnc_debug.txt and /home/saahil/linuxcnc_print.txt as well as in the output of the shell command '\''dmesg'\'' and in the terminal' + rm -f /dev/fd/2 /tmp/linuxcnc.print.GrY3a5 + exit 1