00:52:44 LawrenceG has quit 00:54:14 LawrenceG has joined #emc-devel 03:38:27 SWPadnos is now known as SWP_Away 10:29:38 ve7it has joined #emc-devel 10:31:12 LawrenceG has quit 12:59:11 rayh has joined #emc-devel 13:06:36 Small issues this morning. 13:06:56 1 - univstep says it can't find a param 13:07:26 HAL:7: ERROR: parameter 'ppmc.0.stepgen.00-03.pulse-width' not found 13:07:27 HAL config file /home/rayh/emcdevelop/emc2/configs/univstep//univstep_motion.hal failed. 13:08:30 Also the new link to halcmd seems to try to open it in the wrong place because it can't find bin/halcmd. 13:09:19 rayh: did you run configure? I think alex put in some things yesterday. 13:09:37 Yes I did. 13:09:50 on a check out this morning. 13:10:03 hmm 13:10:08 thanks for reminding me. 13:10:23 which thing is trying to run bin/halcmd? I will look at it with you 13:10:25 I did fail to run the sudo command that sets uid 13:10:53 got some odd error message. 13:10:57 I think that will make halcmd not work right when invoked 13:11:10 (it won't cause anything to not be able to run halcmd) 13:11:12 But then that could just be me again. 13:11:54 which thing is trying to run bin/halcmd? I will look at it with you 13:12:28 Alex put a link under tkemc menu --> scripts to HAL CONFIG 13:12:42 It starts halconfig.tcl 13:12:53 but the complaint is that it can't find halcmd. 13:13:00 cool, I saw that in the new deb I built last night (and it ran correctly) 13:13:10 ok there must be a problem with run-in-place 13:13:16 Right. 13:13:31 tk_messageBox -icon error -type ok -message "The configuration script needs to be run from the main EMC2 directory. Please add the emc2/bin dir to PATH before running this command" 13:13:36 is this the error? 13:13:59 TCLBIN=/home/rayh/emcdevelop/emc2/tcl/bin 13:13:59 Error in startup script: couldn't execute "halcmd": no such file or directory 13:13:59 while executing 13:14:00 "exec halcmd" 13:14:40 does it say which line of halconfig.tcl it is? 13:15:05 No I'm assuming it is the open channel stuff. 13:16:21 before the first exec halcmd, please add a puts stderr $env(PATH) and see if ..../emc2/bin is in there 13:17:01 k 13:19:29 can't read "env(PATH)": 13:19:53 I'll bet I need to \$ 13:21:35 I have to get going - be back in an hour or so 13:22:00 my theory is that PATH isn't being set right - it should have ..../emc2/bin in it 13:22:15 okay. I've got emc stuck trying to clean up. 13:22:23 that comes from $EMC2_BIN_DIR in scripts/emc line 394 13:22:28 ugh 13:22:36 that's always fun 13:22:58 usually sudo rmmod motmod blocks (I think) fixes it for me 13:23:18 see you soon, I'll help if you don't have it by then 13:23:26 okay. 13:28:00 rayh has quit 13:47:02 morning 13:47:11 hi ray.. still having problems? 13:47:23 darn.. talking alone again :D 14:01:41 rayh has joined #emc-devel 14:01:42 steves_logging has quit 14:04:11 hey ray 14:04:16 seen you had some problems 14:05:15 Yep. I think the pin problem was that I hadn't powered the univstep board. 14:05:46 The issue with halconfig is probably a lack of pointer to the correct location of halcmd. 14:06:03 In a run-in-place setup. 14:07:07 The lockup of rtai_math and reboot ate a bit of my kde config again. 14:07:26 One of these days I'll be forced to reinstall on this box. 14:10:13 the issue of halconfig sounds like teh runscript wasn't rebuild 14:10:21 try issuing src/config.status 14:10:25 then make -s 14:10:45 make does the chmod +x emc and chmod +x realtime (you could also run those manually..) 14:44:30 rayh: halconfig for both installed and run-in-place works for me 14:44:42 rayh: and I think it looks really good (I hadn't looked at it yet) 14:49:32 rayh: How do I use watch? 14:55:29 click on tree nodes - they'll be added to the list of watched variables 14:55:36 SWP_Away is now known as SWPadnos 14:55:51 I just get "xxxx XPos" then 14:55:56 and it doesn't update 14:56:02 hmmm 15:00:34 wow. SF seems pretty slow today 15:00:43 yeah, from here too 15:01:01 like 15 seconds before the cvs password prompt 15:01:16 it didn't work at all yesterday, so this is better 15:01:22 baby steps 15:02:55 I'm a little paranoid about make clean since Ray's problem 15:03:20 I think there's nothing wrong with make clean 15:03:33 it hasn't eaten my machine yet, so that's a good thing 15:05:07 Is there some reason that (cd foo; $(MAKE)) is used, instead of (cd foo && $(MAKE)) or $(MAKE) -C foo ? 15:05:22 "because that's the way it is" 15:06:03 does make -C maintain all the variables, or is it a "clean environment"? 15:06:25 make vars, that is 15:07:26 I always issue make clean before I cvs up. 15:07:56 that's probably the better way to do it, rather than cvs up / configure / make clean / make 15:08:27 I used to do that and had the two big faiilures. 15:08:45 jepler: what difference does that make? 15:09:36 I'm still getting the failure to find halcmd. 15:10:08 But it is from the testing stuff rather than from the open channel. 15:10:08 cradek: try removing a subdirectory, and type "make all" 15:11:05 jepler: true it should be (cd foo && $(MAKE)) 15:11:11 jepler: I skipped over that part of your question 15:11:46 jepler: fixes happily accepted 15:11:59 cradek: I'm working on it 15:12:53 re halconfig and watch. I still have a problem in the code adding vars. 15:13:12 sounds like your click did not get a proper return from halcmd. 15:13:17 make -C module_helper all 15:13:18 make: *** module_helper: No such file or directory. Stop. 15:13:18 make: *** [all] Error 2 15:13:19 rayh: ok, didn't know if it was finished or not 15:13:19 well this works now 15:13:26 I should have that working in a bit. 15:13:52 rayh: I think the rest of it is looking good 15:14:06 Thanks. 15:17:00 it seems to work fine for pins and params, but signals don't get updated 15:17:41 ah, I think I only tried signals 15:19:36 cradek: Didn't like my "darn". What should be done for those who are not using a debian based install. 15:20:17 rayh: I guess they have to find a package appropriate for their system, or build it from source 15:20:42 jepler: I don't think your fix to configure.in is quite what you meant 15:21:04 cradek: oops, what did I foul up? 15:21:13 cradek: perhaps the bwidget message should direct the user to 'http://sourceforge.net/project/showfiles.php?group_id=12883&package_id=23786' 15:21:29 case $a in a) chmod a b;; b) chmod a b;; esac 15:21:41 oops! 15:21:49 you probably want case $a in b|c) chmod $a;; esac 15:21:49 I changed configure.in to fix that but didn't regenerate again. 15:21:50 doh 15:22:01 apt is certainly the easier way to get it. 15:22:32 I think the apt message is going to be appropriate for almost everyone 15:22:53 others will already understand that their system is not "mainstream" for emc2 and will have experience with this kind of thing 15:24:15 cradek: better now? (configure) 15:24:18 jepler: oops, I forgot you didn't write that by hand 15:24:36 yes, better 15:25:30 On a run-in-place system if you fail to sudo make setuid you get some strange error messages that don't point you to the source of the problem. 15:25:45 jepler: did you take the corresponding chmods out of the Makefile? 15:26:03 rayh: what error do you get? 15:27:20 I was looking to see what the reply would be if I tried to run emc without issuing sudo make setuid. 15:27:55 The answer was. insmod: error inserting '/lib/modules/2.6.12.6-magma/kernel/adeos/adeos.ko': -1 File exists 15:28:30 that must be an error from something else 15:28:36 you already had the adeos module inserted 15:28:55 I expect it to say something about permission denied if you don't make setuid 15:29:24 I'd guess that's what we get for expecting. 15:29:55 I got a whole set of these. Nothing had been running before, I don't think. 15:30:03 This was a new clean make 15:30:18 well that message means you already had the modules inserted. 15:30:53 forgetting make setuid for run-in-place will get you an error only from halcmd, I think. 15:31:00 Okay. I'll take the time to reproduce the problem. 15:31:01 the module helper is not even used. 15:31:14 ok thanks 15:32:41 now I'm getting some really goofy stuff. 15:32:45 rm -f ../include/* ../lib/* ../rtlib/* ../bin/* 15:32:46 rm: cannot remove `../include/CVS': Is a directory 15:32:46 rm: cannot remove `../rtlib/CVS': Is a directory 15:32:46 rm: cannot remove `../bin/CVS': Is a directory 15:32:47 make: [clean] Error 1 (ignored) 15:34:11 That emc2 is gone, getting a new one. 15:41:02 gone? 15:41:16 those are fine, ignore them 15:42:16 I wonder why we have those empty directories in cvs anyway 15:46:03 because people didn't want to create them with make? 15:46:27 yeah, but that seems silly since we populate them with make 15:46:44 that's the silly part 15:47:01 the whole build is silly 15:47:17 the include files should just be in the incude dir - there's no good reason to have the "sources" in separate dirs 15:47:46 for anything that may need to be included by something else (like the nml-related stuff, HAL, ...) 15:48:01 I read that paper, and it made a lot of sense 15:48:02 I'm not willing to move all those files and lose their history. 15:48:09 that is an issue 15:48:17 svn would help there :) 15:50:24 I hid those warnings instead of fixing it right. 15:50:32 lazy bum 15:51:10 now they'll never get fixed (out of sight, out of mind) 15:51:13 :) 15:51:41 I guess I don't care 15:52:27 my idea of "right" (ruling out a massive restructuring) would be to remove them from cvs and put the mkdirs in the Makefile 15:52:52 then a safe clean could do rm ../include/*; rmdir ../include 15:53:30 yep 15:54:09 feel free if you're offended by my fix, I won't be offended 15:54:11 it doesn't look like the restructuring would be that massive - it's on the same order as the $(MAKE) -C changes jepler just did (right?) 15:54:32 just change those to include ... 15:54:48 no, by restructuring I mean stop copying stuff into these directories. 15:55:15 yes - move headers to the correct dir, and eliminate the recursive make (either qualifies as a restructuring) 15:55:27 I have to be careful because my instinct tells me to throw out the Makefiles and start over, and I don't want to spend the time on that. 15:55:49 The brand new system start with not setuid answers. 15:55:54 Version: 1.2 15:55:54 Machine: EMC-HAL 15:55:54 HAL:4: ERROR: Must be root to load realtime modules 15:55:55 HAL:4: ERROR: child did not exit normally 15:55:56 HAL config file /home/rayh/emcdevelop/emc2/configs/m5i20//../common/core_servo.hal failed. 15:56:10 rayh: great, that's the right error message 15:56:19 Okay. 15:56:43 though it doesn't tell you exactly how to fix it (that's in a message at the end of the make) 15:57:19 Right. My ignoring that message was deliberate. 15:57:20 if someone wants to add "this is probably because halcmd is not setuid" that's fine with me 15:58:23 Now for the real problem of the morning -- halconfig not starting. 15:58:42 rayh: I tested that and it worked ok here. Maybe it will be ok on your new build. 15:58:46 it does work here, using a new checkout 15:58:58 Error in startup script: couldn't execute "halcmd": no such file or directory 15:59:19 I should be so lucky. 15:59:24 heh 15:59:28 This is run-in-place 15:59:46 mine too, though I am logged in as root 15:59:57 Nor am I 16:00:00 I have tried it both ways 16:00:12 this is not a root issue, it must be a problem with PATH 16:00:37 IMO the fix needs to be in the emc rather than in the individual user's path var. 16:00:52 right, the emc script sets up this path 16:01:53 I forgot I cleaned, now I'm compiling again 16:02:37 In halconfig now there is no reference to a global path var like there is with the tickle stuff. 16:02:57 does it use the HALCMD env var? 16:03:03 for example "set thisret [exec halcmd show $searchbase $searchstring]" 16:03:04 yes if I understand alex's change PATH is in the environment and [exec ...] uses it 16:03:40 k 16:05:07 strange -the run script doesn't print the PATH, even in verbose mode 16:07:11 rayh: in your scripts/emc around line 396: 16:07:16 PATH=$EMC2_BIN_DIR:$PATH 16:07:17 echo PATH is $PATH 16:07:22 add that echo 16:07:27 run and see what you get 16:08:17 rayh: you're using tkemc right? 16:08:46 yes 16:09:30 Path is /home/rayh/emcdevelop/emc2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games 16:09:44 But IMO that is not the path to try to fix. 16:09:48 do you have a halcmd in /home/rayh/emcdevelop/emc2/bin 16:10:24 Yep 16:11:24 For now, I'll hard code the location of halcmd in my halconfig. 16:11:50 I think it would be better to find the problem while we're all here 16:12:01 it may be helpful to see whether EMC2_BIN_DIR is being correctly set 16:12:13 it is; it's the first thing on his PATH 16:12:21 /home/rayh/emcdevelop/emc2/bin 16:12:38 err - duh. I should read before I post :) 16:13:04 rayh: in tcl/tkemc put puts stdout "tkemc: PATH is $env(PATH)" 16:13:12 rayh: in tcl/tkemc put: puts stdout "tkemc: PATH is $env(PATH)" 16:13:22 to see if it's the same, or if it gets reset 16:13:41 (mine is the same) 16:13:51 I see no export PATH ... 16:14:07 SWPadnos: I notice that too 16:14:29 SWPadnos: mine is definitely preserved over the exec 16:14:32 tkemc: PATH is /home/rayh/emcdevelop/emc2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games 16:14:47 ok, so that's not it either 16:14:59 so now do the same thing in halconfig.tcl 16:16:29 halconfig: PATH is /home/cradek/emc2/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games 16:16:38 mine is the same in halconfig, I bet ray's is not 16:16:59 hey - I've got no games :( 16:18:49 as expected, it's preserved on my machine as well: 16:18:56 tkemc: PATH is /Project/emc2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11 16:19:09 (should be halconfig, not tkemc) 16:19:11 ok 16:19:13 right 16:21:38 rayh, is this a completely new checkout, or was it an update? 16:24:12 new 16:24:16 ok 16:24:21 phone 16:24:39 I'll bbiab then 16:24:50 Just got a second report of a failed ubuntu. 16:25:21 failed at what stage? 16:25:28 cd burner drive didn't work 16:25:52 Last one was not start after install. 16:26:13 my cd burner doesn't work either, I haven't looked into it 16:26:27 there's probably something at ubuntu.com if it's a common problem. 16:27:07 Okay. I'll look around there a bit. 16:27:21 I went back to bin/halcmd and that works fine. 16:27:30 so I can work. 16:28:11 assuming the problem is only on your machine, that's fine I guess. I'm not sure it is though. 16:29:23 No I suspect that whatever scripts/emc is attempting to do to path doesn't always work. 16:29:37 then we should figure out why 16:40:36 I can burn CDs on my SATA CD/DVD burner, under ubuntu 16:40:52 haven't tried burning a DVD yet, though I have ripped one 16:41:11 SWPadnos: I have two CD drives, so maybe that's my problem 16:41:20 could be 16:41:25 SWPadnos: I tried for only about 10 seconds to fix it 16:41:29 only one is a burner, presumably 16:41:30 heh 16:41:33 yes 16:42:01 I do have problems with either k3b or gnomeburner, though I don't recall which at the moment 16:42:14 or whatever the gnome tool is called 16:50:52 cradek: Thanks for the note on sig in halconfig. Got that watch fixed. 16:51:15 did it need fixing after the fix I did? 16:53:21 It was only changing the led for pin and param 16:53:49 right. I moved a '}' and it worked 16:54:04 you had probably already checked out when I checked that in 16:55:13 Okay. I guess I missed that. 16:55:25 I'm seeing now that modify doesn't work at all. 16:55:35 grape rinds think alike 16:55:38 or something like that 16:55:38 Looks like I lost my last version. 16:55:54 dere ya go eh. 16:56:31 I get something that looks right for modify, but I can't see that it does the actual command 16:57:41 is there an easy way to tell if a clicked node is a leaf (has no child nodes)? 16:57:46 Clciking on entries doesn't work 16:58:15 hmmm - can you walk me through what you're doing? 16:58:21 It looks through the list of nodes and if it finds your click it calls you stupid and suggests clicking again. 16:58:52 oops - I was thinking of tune mode, not modify mode 16:59:09 I didn't see your fix in the commit on #emc 16:59:28 CIA-8 swpadnos * emc2/tcl/bin/halconfig.tcl: Fix "watch mode" for signals. 16:59:33 at 10:38 my time (EST) 17:00:10 it's only 4 or 5 lines ago, actually 17:01:14 It's in the code. 17:01:29 ok 17:02:56 I'm kinda up sxxt creek here. I have to edit halcmd to bin/halcmd 17:03:11 but then if I edit and commit you guys are wrong. 17:04:09 let's continue debugging that then. 17:04:18 can you try adding a line like puts stdout [exec which halcmd] 17:04:47 good idea, that shows the path 17:04:57 or nothing 17:05:22 so maybe puts stdout "Halcmd is [exec which halcmd]" 17:05:35 (+/ some appropriate punctuation) 17:07:15 Error in startup script: child process exited abnormally 17:07:18 while executing 17:07:18 "exec which halcmd" 17:07:51 but the path echo still showed emc2/bin, right? 17:08:00 he never did a path echo in halcmd 17:08:08 err halconfig 17:08:24 ah 17:08:56 I don't see what the "which" is attempting to do. 17:09:09 I don't think which is even in your path 17:09:16 tell us what will get executed if you run halcmd 17:09:31 which probably is, but it may return an error (and print nothing) if the program isn't found 17:09:32 stick that same puts (like we put in tkemc) into halconfig please 17:09:35 an error message. 17:10:08 Error in startup script: child process exited abnormally 17:10:08 while executing 17:10:08 "exec which halcmd" 17:10:13 these two lines in halconfig: 17:10:15 puts stdout "halconfig: PATH is $env(PATH)" 17:10:16 puts stdout "halconfig: halcmd is [exec which halcmd]" 17:10:22 I'm a bit lost here now. 17:10:31 give me this output: 17:10:33 halconfig: PATH is /Project/emc2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11 17:10:35 halconfig: halcmd is /Project/emc2/bin/halcmd 17:10:43 I can not start halconfig 17:11:05 I'm lost too then 17:11:15 is halconfig not found, or does it exit because it can't find halcmd? 17:11:52 How would you like me to attempt to start halconfig? 17:12:01 from the tkemc menu 17:12:07 from tkemc or from a terminal? 17:12:15 ok - that's the problem. you can't run halconfig from the command line 17:12:21 we're trying to figure out what happens to your PATH in the emc->tkemc->halconfig chain 17:12:33 it has to be run with the environment that scripts/emc sets up 17:12:39 you haven't been running it from the menu? 17:13:10 That time it started. 17:13:10 right - I get the same problem when run from the terminal 17:13:11 localhost:/Project/emc2# tcl/bin/halconfig.tcl 17:13:12 halconfig: PATH is /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11 17:13:14 Error in startup script: child process exited abnormally 17:13:15 while executing 17:13:17 "exec which halcmd" 17:13:18 invoked from within 17:13:20 "puts stdout "halconfig: halcmd is [exec which halcmd]"" 17:13:21 (file "tcl/bin/halconfig.tcl" line 25) 17:13:36 Hell no I don't start it from emc. I want to see what it does. 17:13:58 heh - well, I think we know what the problem is now :) 17:14:01 Shit Halconfig is supposed to be much bigger than a tool under a single menu in 17:14:06 oh for fucks sake 17:14:14 It didn't start a bit ago from that same menu 17:14:36 the changes to make it work from the menu fubared it for plain old shell execution 17:14:48 What we are saying is that halconfig now needs something from tkemc 17:15:09 more accurately, from scripts/emc 17:15:23 Could it get that as easily from setupconig.tcl 17:15:31 I could live with starting it from there. 17:15:49 we'll have to add some checks for the env vars, and default to bin/halcmd if not found 17:16:12 But that won't work on an installed system. 17:16:39 Oh and setupconfig also strips all the return info. 17:17:15 would you expect someone to just run halconfig on an installed system, not from within emc? 17:17:18 rayh: just set your PATH if you want to run it from the shell. Alex's change works perfectly. 17:17:27 SWPadnos: I wouldn't. 17:17:57 rayh: env PATH=$PATH:./bin tcl/bin/halconfig.tcl 17:18:09 Not meaning to be a mule here but that doesn't help end users. 17:18:27 end users will run it from the menu. 17:18:32 bs 17:18:36 do you think that end users with installed systems will need to run halconfig from the shell? 17:18:52 not if they are building a HAL the way jmk told elson to do last sunday. 17:19:12 coffee brb 17:19:16 elson is a developer 17:19:26 actually, they might - it seems reasonable to run emc from an icon, then run halconfig from either another icon, or a separate terminal 17:19:27 I thought you were writing halconfig for users to use, so they don't have to do that 17:19:59 more coffee is a good idea (I'll get decaf) 17:20:15 eeewwww - decaf 17:20:39 it's not as good but I don't have to worry about drinking 9 cups of it 17:20:51 hehe 17:21:00 dddrrriinnnkkiinngg ccooffffeeeee 17:21:10 you think I'm pissy now 17:21:14 heh 17:21:42 I guess we do need some additional discussion of how the parts fit together 17:22:25 yep 17:22:25 If halconfig is run from tkemc or mini then I don't need any of the testing stuff at the start. 17:22:37 (or axis hint hint) 17:22:52 and eric would never have gotten the message he reported this morning. 17:23:14 which- the BWidget thing? 17:23:24 I guess bwidget test would be there yet. 17:23:33 * alex_joni is back 17:23:34 but no winders 17:23:42 no is rtai up 17:23:57 or is hal running 17:24:22 rayh: if he had used my debian packages, bwidget would already have been installed as a dependency. 17:24:23 That last one got broke with some of the changes to setupconfig recently anyway. 17:24:42 Right but I think he has a fedora or some such hat. 17:25:51 so first question, where does halconfig fit, if it fits. 17:28:40 I don't think it's useful for end users unless there's a running emc/HAL 17:29:03 I think it is useful to be able to run it "manually" - ie, not only from an emc GUI menu 17:32:34 SWPadnos: so what's stoping you? 17:32:43 and the easy way to accomplish both is to tell the guy who wants to run it manually to edit his path var. 17:33:11 that's automatically done for installed systems, as halcmd is already in /usr/bin 17:33:23 or similar (/usr/local/bin) 17:33:41 ok - so it should only be a developer using run-in-place that has any issues 17:33:49 for the run-in-place system it's hard to put ./bin permanently to PATH, and that might be problematic 17:34:03 SWPadnos: right, if he's not running it from tkemc 17:34:17 or for what I care using loadusr from hal 17:34:34 just like we run halscope for sim 17:35:36 ok, so the danger is if there's an installed version, and you're doing development - that'll prefer the installed version over the RIP version, when run from the shell 17:36:12 yes, but an installed halcmd should work just fine with a run-in-place rest 17:36:32 depends on what's changing 17:36:35 except when you do serious redesign on halcmd 17:36:40 but most likely true 17:37:10 actually, a single change to the HAL data would screw up an installed halcmd 17:37:43 s/would/could/ 17:39:09 SWPadnos: Could you explain that last a bit? 17:42:24 rayh: if you have 2 parts of a software using the same data defines 17:42:34 and you have one part linked and installed 17:42:35 well - if the HAL data changes, for instance we add a new variable to the pin struct (like a unique ID), then an installed halcmd wouldn't know about it, and things would get messy 17:43:09 and afterwards you change the data definitions (only slightly is enough), and compile the second part of the software, those two will never work 100% ok together 17:43:17 I thought halcmd querried a running hal. 17:43:27 yes, using some predefined commands 17:43:32 that go through shm 17:43:49 it does, but it looks at the HAL structures directly - the definitions have to match betwen halcmd and the running HAL 17:44:10 but if jmk decides he should add another command, and that command shifts half of the existing with 1 step, then querying for pin might get you param 17:44:14 if you have a run-in-place version with different structures, and you end up running an installed halcmd, boom! 17:44:14 But it does not behave the same in the installed version as it does in rip. 17:44:16 or something lots worse 17:44:29 it's not a matter of behave 17:44:39 it's a matter of data consistency 17:44:57 command parsing isn't an issue, unless the meaning of a comand changes (like PIN now means PARAM) 17:45:03 In my rip, I can start demo or realtime and add stuff. 17:45:28 start new modules, delete and change old modules 17:45:29 what are demo and realtime? 17:45:36 scripts 17:45:37 I was thinking ahead to the person (possibly a developer) who has an installed version, and is testing a new vbersion of emc2 17:45:59 rayh: ok 17:46:14 if they run from a shell instead of a menu, then the installed halcmd will be in the path, so even if you check inside halconfig for a valid hapcmd, you may end up finding the wrong one 17:46:19 anything you do in rip, works for the installed system just the same 17:46:40 but anything in the installed system may not work the same in rip, due to path issues 17:46:49 SWPadnos: that can be overcome, but testing for a file in path is very messy in tcl 17:47:06 SWPadnos: how do you mean that? 17:47:19 actually, I think you want to test for an env var (like EMC2_something), and use bin/halcmd if the var doesn't exist 17:47:38 but that doesn't work for installed systems - darn 17:47:48 why not? 17:47:58 installed components are in the path, so will be sulently used, even if yuo 17:48:07 that is how the realtime script gets found 17:48:09 installed components are in the path, so will be sulently used, even if you're trying a new version as RIP 17:48:12 silently 17:48:23 they shouldn't 17:48:33 c'mon this is not that hard.. 17:48:34 if you try to run from the shell ... 17:48:43 in that case yes 17:48:57 but that's only because halconfig.tcl doesn't know how it's run 17:49:06 at least doesn't right now 17:49:07 that's the problem - it's pretty reasonable to expect that you can run halconfig from something other than an emc gui 17:49:23 the runscript knows where it's run from (rip or install) 17:49:35 and it's necessary if you use azis, since you can't run halconfig from within axis at the moment 17:49:46 axis - not azis 17:50:09 ok, so then we go back and have halconfig run ONLY from emc2/ (no other location is valid) 17:50:19 if bin/halcmd is there it uses that 17:50:30 otherwise it assumes installed version and checks in path 17:50:32 that's what I'm trying to think through - what's reasonable, and how to accomplish it 17:51:21 If we have issues with the editing that halconfig can do to a running HAL, then we should trash halconfig. 17:51:39 how do you mean editing ? 17:52:02 halconfig can loadrt unloadrt 17:52:09 right 17:52:13 that's necessary 17:52:20 but all those are halcmd calls 17:52:20 which means that it can do most any mod to HAL 17:52:31 I don't think we're talking about what halconfig does, just how to make it possible for it to work in all necessary cases 17:52:33 I thought that's what it's supposed to do 17:52:46 it's just a matter of finding halcmd (the right halcmd) 17:53:01 we're not talking about changing any functionality of halconfig nor halcmd 17:53:12 I don't understand finding the right halcmd? 17:53:32 if I run emc using axis, halconfig isn't available from a menu 17:53:44 Okay 17:53:44 so I run a separate shell for halconfig (like you were doing) 17:53:45 rayh: if a user someday will have an installed emc AND a run-in-place version, halconfig might be confused and run the installed halcmd (because it's in PATH) 17:53:59 but it can't find halcmd, because it's expecting it to be in the PATH 17:54:11 which it isn't (thankfully, since I have no installed emc2 on this machine) 17:54:21 halconfig works on a "running" hal 17:54:29 exactly 17:54:37 so it matters not where it exists or is run from 17:54:39 rayh: sure but to work on a running hal it needs to talk to halcmd 17:54:59 if halconfig.tcl can't execute halcmd.. it won't matter if HAL is running or not 17:55:08 agreed? 17:55:39 true. but I don't see how a halcmd in /bin or /sbin or wherever makes any difference between halcmd and HAL. 17:55:40 and it has to be the correct one - either "bin/halcmd", or halcmd from the path 17:55:51 only that halconfig doesn't know where to find it. 17:55:52 if you checkout a new version of emc2 17:55:55 rayh: let's step back a bit 17:56:04 SWPadnos: let me try to exaplain for a while 17:56:13 ok 17:56:33 * rayh falls silent 17:56:49 rayh: I'm trying to build a scenario, try to say if you don't follow me 17:56:59 1. user gets ubuntu with emc2 deb packages 17:57:12 halcmd is installed in /usr/bin 17:57:25 halconfig.tcl is in /usr/share/emc/tcl/halconfig.tcl 17:57:42 user starts tkemc -> runs halconfig from the menu (works OK) 17:57:57 user start axis -> runs halconfig from the shell (works OK) 17:58:06 so far everything is as it should be 17:58:08 ?? 17:58:22 installed system, not run in place 17:58:40 but how does a users start halconfig. 17:58:41 rayh: something not clear? 17:59:13 terminal and enter sudo /usr/share/emc/tcl/halconfig.tcl 17:59:16 ?? 17:59:22 without sudo 17:59:24 but yes 17:59:53 or he might even have an icon on his desktop that's reading halconfig for what he cares 17:59:55 no sudo because halcmd has setuid root 18:00:01 exactly 18:00:42 is it ok so far? can I move on? 18:01:01 sure 18:01:30 ok, now the user hears about a fancy new improvement in emc2 and wants to try it out, before he installs over his runing emc2 18:01:49 so he gets emc2 and puts it in /home/aunt_tillie/emc2/ 18:02:26 now /home/aunt_tillie/emc2/bin/halcmd and /home/aunt_tillie/emc2/tcl/bin/halconfig.tcl are the ones we care about 18:03:18 why should we care. 18:03:32 unless these two files have changed? 18:03:35 when the user start emc (the rip one), and runs halconfig from the tkemc menu, the runscript already added /home/aunt_tillie/emc2/bin to PATH so halconfig.tcl will use /home/aunt_tillie/emc2/bin/halcmd 18:03:45 exactly that is the case we worry about 18:04:11 if the user has emc2.0.0 installed, but tries emc2.3.5 out (say 2 years newer) 18:04:36 halcmd & HAL is very likely to have changed in the meantime.. agreed? 18:04:53 okay 18:05:11 so if you run in place, it's absolute MUST that you use only run-in-place files 18:05:35 it's a bad idea to end up running HAL from rip, and halcmd from the installed (2 years older) emc2 18:05:37 so why not pid in tcl 18:05:44 pid? 18:05:51 pwd 18:06:19 well.. my main problem is that I know too little tcl to do that properly 18:06:49 but running `pwd`/bin/halcmd from tcl is not the answer 18:07:02 In a run in place system, tcl/bin and bin/ are the essential locations? 18:07:14 yes 18:07:26 is pwd emc2? 18:07:30 somehow, also scripts/realtime is used 18:07:32 the pwd is the config dir 18:07:32 or is it scripts 18:07:39 pwd is where you run it from 18:07:47 not in halconfig 18:07:51 In emc pwd was always emc 18:07:57 the emc runscript can be run from anywhere it shouldn't matter 18:08:12 adding 'puts stdout "halconfig: Working Directory is [exec pwd]" ' to halconfig 18:08:25 gives this: "halconfig: Working Directory is /Project/emc2/configs/SWP_ppmc" 18:08:26 you can run scripts/emc OR cd scripts && ./emc OR cd src && ../scripts/emc , etc 18:08:41 run from tkemc 18:08:42 SWPadnos: if you run it from the GUI 18:08:43 And IMO you shouldn't be able to do that. 18:09:04 rayh: how do you expect to keep track of the installed version then? 18:09:26 * rayh doesn't want to keep track of installed... 18:09:29 there is no emc2/ anymore 18:09:34 excuse me for saying that. 18:09:42 yes I know you don't ;) but users want that 18:09:56 users want a machine to start up and work; 18:10:06 but another day for that. 18:10:07 rayh: you're forgiven, it's not the most pleasant thing to debug 18:10:23 users want the nifty ubuntu "updates available" icon to tell them when there's a new version of emc2 as well 18:10:36 In a rip. is it possible to make a "run from here" directory. 18:10:36 agreed to both of you 18:10:44 and that happens automagically with installed debs 18:10:53 rayh: you shouldn't need that 18:10:54 ve7it has quit 18:11:03 you can still go to emc2/ and run from there 18:11:04 Not the two users that ripped me a new one on the phone about ubuntu. 18:11:12 ripped? 18:11:25 complained aggressively ;) 18:11:25 That doesn't satsify my need. 18:11:31 how so? 18:11:39 LawrenceG has joined #emc-devel 18:12:22 what are your needs? 18:12:26 Is it possible to say in a rip, "you will always run from emc2 18:12:43 you can say that 18:12:49 so that we always have a known file system relationship. 18:13:44 I take that as a no... not possible. 18:13:55 the file system relationship 18:14:04 is already well known 18:14:32 but when adding install support we changed the default location to run everything from 18:14:59 the config dir is now the place where stuff gets run from (because of a lot of reasons) 18:15:15 so the runscript goes there first, then does it's thing 18:15:27 so it actually doesn't matter where you run it from 18:15:47 but the runscript posesses the knowledge you were talking about "the known file system relationship" 18:16:07 It does if I'm trying to find halcmd or trying to figure out where to put the saved version of HAL. 18:16:26 where would you put the saved version of HAL? 18:17:15 IMO the best place would be in the config dir for the current setup 18:17:15 up 18:18:42 I just save without worry about where. 18:18:53 say I'm running the univpwm config, if I start halconfig and want to edit soemthing then I expect halconfig to save in configs/univpwm not anywhere else 18:18:56 so my only problem is where is halcmd? 18:19:24 rayh: we coudl do it like this: the rip user MUST run from emc2/ 18:19:34 then halconfig looks for bin/halcmd 18:19:39 small issue with a start from scratch hal but go ahead. 18:19:56 if it's not found then it looks in path, and assumes installed version 18:20:45 does tcl have a way to know from where halconfig was run? 18:21:02 saying you are in /home/ray/emc2 and run tcl/bin/halconfig.tcl 18:21:17 pwd 18:21:25 does halconfig have a way to find out /home/ray/emc2/tcl/bin/halconfig.tcl ? 18:21:30 will return the current directory 18:21:40 pwd + $0 18:21:59 $0 is usually the complete executed name 18:22:16 at least that's true for bash scripts, and executables (binaries) 18:22:38 $0 doesn't exist in tcl 18:22:42 (I tried it) 18:23:01 in tcl no, but there is a bash that runs before wish gets called 18:23:04 we can use that 18:23:24 I thikn $0 in bash is the actual name used to run the command, without the path 18:23:35 unless the full path was typed at the command line 18:23:36 it's the whole name 18:23:39 exec /usr/bin/wish "$0" "$@" 18:23:47 Is the default way of starting wish 18:24:14 yes I know ray 18:24:23 but before that we can do any number of bach lines 18:24:26 bash even 18:24:39 SWPadnos: this is what I put in emc: 18:24:42 # 1.3.1. Determine if we have run-in place or installed system 18:24:42 # by looking of where the script was run from 18:24:42 SCRIPT=`which $0 | grep $0` 18:24:42 echo "SCRIPT=$SCRIPT" >>$PRINT_FILE 18:24:42 #get the script name 18:24:44 SCRIPTNAME=`echo $SCRIPT | sed s#\^.\*/##` 18:24:47 #and the path 18:24:49 echo "SCRIPTNAME=$SCRIPTNAME" >>$PRINT_FILE 18:24:52 SCRIPTDIR=$(dirname $SCRIPT) 18:24:55 SCRIPTDIR=$(cd $SCRIPTDIR ; pwd -P) 18:24:57 echo $SCRIPTDIR >>$PRINT_FILE 18:26:19 the idea is this: get the bash on top of halconfig.tcl figure out if it's installed or rip, and set an ENV accordingly 18:26:38 inside tcl (wish), you can read that ENV and use paths accordingly 18:27:02 ok 18:27:34 does that sound ok? 18:28:01 it may - I'm no shell guru) 18:28:17 cradek is ;) 18:28:58 * rayh realizes his old ways don't fit in this world. 18:29:52 rayh: the problem is we are trying to make it perfect 18:29:54 ;-) 18:30:23 and that complicates things a bit 18:31:48 so it's rather a let's think of all the scenarios that might appear in the future, rather than make it just work and move on, and worry later 18:32:02 okay. I guess I'll just have to wait for a solution that is way beyond my ability. 18:32:24 What I have been doing is starting an emc2 18:32:28 you'll see it's not a very complicated one.. 18:33:02 then from the same directory pointing to tcl/bin/halconfig or setupconfig and working from a terminal] 18:33:14 That way I can see what errors tcl kicks up. 18:33:32 Now if I try to do this with setupconfig, it doesn't start right 18:33:53 if I start setupconfig from scripts/emc 18:34:12 I don't get any error messages from tickle 18:34:12 if you run from tkemc, the errors end up on the same terminal from where you started 18:34:27 start a terminal, go to emc2/ 18:34:31 run scripts/emc 18:34:54 select a config with tkemc (stepper for example), then run halconfig from the menu 18:35:11 Nope cause the run scripts strips em all. 18:35:11 you'll see halconfig error messages along with normal emc debug 18:35:21 nothing here. 18:35:40 what messages do you usually get? 18:35:49 The only thing scripts/emc wants to see is the name of the ini to execute. 18:36:22 are we still talking about halconfig? 18:37:10 I think so. It was a few days ago when I found that problem. 18:37:53 halconfig != setupconfig 18:38:59 Right but interrelated them a while back. 18:39:28 oh ok, I got confused 18:39:52 np. you have not got near the confusion that I have now. 18:40:08 it is true that scripts/emc doesn't expect setupconfig to return anything but the config name 18:41:54 I don't see any easy way from within halconfig, to say I'm rip or I'm installed. 18:42:08 Unless there were a standard place from which installed started. 18:42:35 well the point of make install is not to make it standard 18:42:38 or a standard place where you can find the version of emc that's running (like /var/emc) 18:42:47 because different distro's have different policies 18:43:00 what is mandatory on debian is NOT allowed on redhat, and so on 18:43:02 containing something like /usr/emc or /home/rayh/emc2 18:43:05 Right. So I'm completely lost as to how to help. 18:43:25 rayh: wait 30 mins, I'll boot my ubuntu up, and you can help with tcl stuff.. ok? 18:43:58 I can try. 18:44:04 thx 18:44:31 Thank you. 18:44:51 2 minutes 18:45:05 that was a quick 28 minutes ;) 18:45:11 * rayh must get out of the emc business. 18:45:21 rayh is now known as rayh-away 18:45:23 or get much better pay :) 18:47:49 * alex_joni is back on ubuntu 18:51:06 rayh-away is now known as rayh 18:52:11 ok, started to look at it 18:52:46 rayh: can you start thinking about how to handle the 2 variants if you have an ENV saying rip or install? 18:53:45 not much different just to run bin/halcmd vs. halcmd 18:53:47 The installed is handled. exec halcmd does that. 18:54:22 can you just make an env var HALCMD, that has either 'bin/halcmd' or 'halcmd'? 18:54:32 SWPadnos: or better absolute path 18:54:38 sure 18:54:39 yes 18:54:42 if {$rip = "rip"} {exec bin/halcmd} 18:54:53 ray: exec $HALCMD 18:55:01 just replace all the exec hal;cmd with exec $HALCMD 18:55:09 what he said 18:55:26 set HALCMD $env(HALCMD) 18:55:59 SWPadnos: I can take care of that much tcl 18:56:03 heh 18:56:09 rayh: give me a few minutes for testing, and I'll commit 18:56:40 k 18:57:02 ray - do you get the messages like "inifind is depreciated" and the like? 18:57:18 sometimes I do. 18:57:20 yeah, that's paul's message 18:57:34 there are 2 versions of iniFind 18:57:58 one c++ (is ok), one c (linked from halcmd) which supposedly is depreciated 18:58:01 it should be there every time - I was just thinking about you mentioning that you get no messages (from halconfig) in the terminal 18:58:09 deprecated, but anyway ;) 18:58:18 but the main problem with it is that it's linked to halcmd :)) 19:01:13 I seem to have both tkemc and halconfig twisted up. I'll reinstall. 19:05:29 oops I see a change to make. If I go away it's cause it crashed. 19:05:43 rayh: btw, I'm getting errors that killHalConfig doesn't exist 19:06:29 make: [clean] Error 1 (ignored) 19:09:35 rayh: that isn't a very usefull message 19:09:41 try a few more lines bfore that 19:10:34 Sorry long gone now. 19:10:49 It was in the midst of rm -f 19:11:07 The new does start up okay. 19:15:11 killHalConfig should be about line 259. 19:15:42 way after initializeConfig (at line 181) 19:16:14 but initializeConfig calls killHalConfig in case user presses Cancel at the question if he wants to start HAL 19:20:22 Shouldnt be a problem because initializeConfig isn't called until very late in the program. 19:20:41 it's the first called if I'm reading this correctly 19:20:43 Don't know why your's should raise an error. there. 19:20:43 line 181 19:21:52 here 181 is in the midst of comment. 19:22:11 #run the init test process 19:22:17 initializeConfig 19:22:19 # 19:22:31 #---------------end of environment tests ------------- 19:22:33 I see 151 being a call to killHalConfig 19:24:08 Are you getting the error if the initializeConfig script fails to find a working system? 19:24:53 yes 19:25:01 I get a window with 3 buttons 19:25:08 if I push cancel I get an error 19:25:38 HAL is not loaded, Yes, No, Cancel 19:25:42 Okay. Let me move that call to initializeConfig. 19:26:09 wait on the commit, I'll be modifyin the whole file 19:26:46 k 19:27:46 phone 19:36:02 back 19:36:25 I'll wait for your commit before I do anything more with it. 19:45:49 rayh: I commited, you can change the initConfig stuff now, if you like 19:45:59 I'm still pondering if it's the final version though 19:48:18 My submissions never are final, why should we expect your's to be? 19:52:42 got that make clean error message. 19:52:46 make[1]: Leaving directory `/home/rayh/emcdevelop/emc2/src/emc' 19:52:46 find . -name "*~" -exec rm -f {} \; 19:52:46 find . -name "*.bak" -exec rm -f {} \; 19:52:47 find . -name core -exec rm -f {} \; 19:52:49 rm -f ../include/* ../lib/* ../rtlib/* ../bin/* 2>/dev/null 19:52:51 make: [clean] Error 1 (ignored) 19:52:53 rm -f .tmp/* .rt_tmp/* 19:52:59 that's OK 19:53:09 it's trying to remove the include/CVS dir 19:53:13 which is not a file 19:53:23 ah okay. 19:53:36 That shouldn't show up in released source. 19:53:51 no, it proabbly won't 19:57:26 Works good. Thanks. 20:13:46 rayh: I just ripped it all out.. it was an unnecessary complication :) 20:18:51 Ah that's why. Im getting really confused now. 20:19:21 1.22 is the latest working version? 20:19:22 some foo is still in there :) 20:19:34 yes, 1.22 20:39:19 rayh: any problems on the latest version? 20:52:53 bye guys, I'm off to bed 20:53:25 None that I can see. Thanks 20:53:31 catch you tomorrow. 22:16:16 logger_devel has joined #emc-devel 22:16:16 topic is: "Welcome to the Enhanced Machine Control development place. | Regular Developers' meetings 24/7 !" 22:16:16 Users on #emc-devel: logger_devel LawrenceG rayh alex_joni jepler anonimasu SWPadnos jtr_ @ChanServ cradek 23:10:26 rayh has quit