#linuxcnc-devel Logs
Jan 17 2020
#linuxcnc-devel Calendar
10:23 AM jepler: They're multi-pi-ing
10:27 AM * jepler uploaded an image: IMG_20200117_101541.jpg (388KB) < https://matrix.org/_matrix/media/r0/download/matrix.org/XukLFfPcQcYdTEJHGnCzgjpX >
11:00 AM skunkworks: jepler: Cool! does that heatsink work with the ribon cable?
11:01 AM jepler: I don't think it clears. I'll use that one for software building and maybe some adafruit stuff anyway
11:02 AM skunkworks: jepler: I am sure you know someone with access to a large vmc - that could mill the slot bigger...
11:02 AM skunkworks: ;)
11:02 AM jepler: hehe
11:04 AM jepler: (it also has 4GB vs just 1GB in the other one)
11:15 AM skunkworks: cool - it would be a good experiment to see how linuxcnc runs on 1gb
11:16 AM jepler: I'm assuming "okay, except when you load a crazy gcode file" .. but I've been wrong before, and desktop environments get hungrier all the time
11:42 AM Bushman: hello
11:44 AM Bushman: i have a small issue with HAL component
11:45 AM Bushman: the component was compiled from source
11:45 AM jepler: hi
11:45 AM Bushman: when i run: halrun then "loadusr xhc-whb04b-6" i get no errors
11:46 AM Bushman: but when i put "loadusr -W xhc-whb04b-6 -H" in my custom.hal i get following error:
11:46 AM Bushman: rtapi_shmem_new failed due to shmget(key=0x48414c32): Invalid argument
11:46 AM Bushman: HAL: ERROR: could not open shared memory
11:46 AM Bushman: failed to initialize HAL component xhc-whb04b-6
11:46 AM Bushman: ./custom.hal:32: waitpid failed xhc-whb04b-6 xhc-whb04b-6
11:46 AM Bushman: ./custom.hal:32: xhc-whb04b-6 exited without becoming ready
11:47 AM Bushman: 1123any ideas why that might happen?
11:47 AM burklefoo: skunkworks: it works ok on the RPI3 with 1G until you pan or rotate a complex file in gremlin
11:47 AM burklefoo: then its all over...
11:48 AM burklefoo: though supposedly VTK is much more efficient so hazzy/VTK might be OK in 1G
11:49 AM Bushman: any help would be apreciated cause i'm still on 2.7.14 and this component is not provided out of the box
11:50 AM Bushman: and i've already paid for the pendant :(
11:50 AM Bushman: so it's understandable i want to make it work
11:51 AM jepler: Bushman: Based on some documentation I found, it doesn't connect to HAL when "-H" is not specified, so there's something about this connection which is not working. I also noticed based on google searches that this software may be designed for machinekit, and it might just not be suited for linuxcnc...
11:52 AM Bushman: you see, the thing is people are successfuly using this with linuxcnc
11:52 AM jepler: Also, I know this is a #1 irritating suggestion, but (especially if you tried "sudo"ing some things such as "sudo linuxcnc", "sudo halrun") shared memory permissions can get messed up, and a reboot could fix them. Does the error with "loadusr -W xhc-whb04b-6 -H" happen immediately after reboot and before you "sudo" things?
11:53 AM Bushman: um, i generally don't sudo anything that doesn't explicitly require it
11:53 AM Bushman: i might try anyther reboot tho
11:53 AM Bushman: *another
11:53 AM burklefoo: I'm no expert but you might try deleting the shared memory segment, you can have these left over if previous load attempts failed
11:53 AM Bushman: i run the halrun as normal user without sudo
11:54 AM jepler: yes, there are also commandline things you can try. burklefoo might remember off the top of his head, he did it the other day. ipcrm something.
11:54 AM Bushman: what do you mean by deleting shared memory segment?
11:54 AM burklefoo: ipcs lists the memory segments
11:54 AM jepler: but also if linuxcnc is starting when the ONLY thing you change is removing that line, then that's not the problem
11:54 AM burklefoo: ipcrm can delete them
11:55 AM jepler: you mentioned that you compiled this yourself (obviously, since it's not part of linuxcnc). Are you confident you compiled it for the same version of LinuxCNC that you are running?
11:55 AM Bushman: https://pastebin.com/pwbnqQD7
11:56 AM Bushman: jepler: i am not. :D
11:56 AM jepler: okay...?
11:56 AM Bushman: at this point i'm second-guessing everything i do
11:56 AM jepler: it's important that they be the same
11:56 AM jepler: Are you using a prepackaged version of linuxcnc?
11:57 AM Bushman: well, the thing is there IS no version for this version of linuxcnc
11:57 AM Bushman: i'm using the one from ISO image
11:57 AM Bushman: basicaly (almost) clean install from image
11:58 AM Bushman: and axis introduces itself as 2.17.14, which is the latest sugested on the website?
11:58 AM jepler: OK
11:58 AM jepler: and what instructions did you follow to build this software? Did it involve a "git clone"?
11:58 AM jepler: or did it involve installing "linuxcnc-dev" as a package?
11:59 AM Bushman: i would try other versions, like 2.8 or 2.9 but i've read on forums those cause problems with LPT I/O
11:59 AM Bushman: and as for now i'm rather stuck with LPT only
11:59 AM Bushman: oooohhh!
11:59 AM Bushman: jepler: yup, i did git clone
11:59 AM Bushman: well shit.
11:59 AM Bushman: now i see the problem
12:00 PM jepler: ok, when you are using a package such as the one distributed from linuxcnc.org, and you want to build a new HAL module or whatever, you should use the development files from the linuxcnc-dev package with the same version number
12:00 PM jepler: if you are using a git clone then you should make sure and use everything within that git clone, via rip-environment
12:00 PM Bushman: do you think re-compiling it with a packaged version of linuxcnc-dev could possibly help?
12:00 PM jepler: if the development files and the actual linuxcnc don't match it could cause this too
12:02 PM Bushman: it looks like i've cloned 2.9.0~pre0
12:02 PM jepler: our documentation about how to build external packages could sure be improved. Like everything else, it's volunteers we depend on to create good documentation.
12:03 PM Bushman: well, that's how opensource often be :(
12:03 PM Bushman: um... so how do i clone an older version or what would you sugest for me to try next?
12:04 PM Bushman: also why does it run from command line but not from when i try runing axis?
12:04 PM jepler: well, like I was suggesting, by installing the linuxcnc-dev package through the package manager you will get the headers and link-time libraries for building components
12:05 PM jepler: as well as the "halcompile" program
12:06 PM Bushman: hmm...
12:06 PM Bushman: no such package
12:06 PM Bushman: do i need other software sources?
12:06 PM jepler: o_O
12:07 PM jepler: if you're using an ISO image from linuxcnc.org it should have been properly set up
12:07 PM Bushman: yea, that's what i would expect
12:07 PM jepler: you can also try the package name linuxcnc-uspace-dev
12:07 PM Bushman: but when i search for "linuxcnc-dev" i get 0 results in sinaptics
12:08 PM Bushman: hmm...
12:08 PM Bushman: i'll do a wildcard search, one sec
12:08 PM Bushman: i do hve uspace-dev instaled
12:08 PM Bushman: *have
12:09 PM * Bushman can't even english today
12:09 PM jepler: okay, that should have provided you with what you needed to build the component in the first place, and no need to dabble with git clones of linuxcnc. of course, "should"
12:09 PM jepler: and of course I don't know what directions you were following, etc
12:10 PM jepler: is it "halcompile" or something else?
12:10 PM Bushman: well, the instructions said i should copy the source for the component into the linuxcnc-dev/src/hal/user_comps/
12:10 PM Bushman: where would that be if installed from repos?
12:11 PM jepler: those instructions are only suitable if you are entirely using the linuxcnc version you built yourself
12:11 PM Bushman: the directions use ./autogen.sh |./configure |make
12:12 PM Bushman: using the makefiles in the cloned git
12:12 PM Bushman: git clone https://github.com/LinuxCNC/linuxcnc linuxcnc-dev
12:13 PM Bushman: i'm a complete noob if it goes for git
12:13 PM Bushman: can i clone an older version, if yes, how?
12:13 PM Bushman: then i would try to re-do everything for my version
12:13 PM jepler: okay, so, those instructions you are following should be "okay kinda sorta" as long as *you use only the version of linuxcnc from inside the git clone*
12:14 PM Bushman: then i can not.
12:14 PM jepler: but if you launch linuxcnc by clicking an icon .. it will use the system version
12:14 PM Bushman: i have 2.7.14, the git one is 2.9-ish
12:15 PM Bushman: i would like to try and understand the problem better tho:
12:15 PM Bushman: i've compiled it, it rins from command line fine
12:15 PM jepler: anyway, you can make your git version be similar to the installed version, and then it might work or it might still not. You can do that by "git checkout v2.7.14". That will change all the source files to match 2.7.14, but the "built" files will still be there and you need to clean, autogen, configure, and make again
12:15 PM Bushman: *runs
12:16 PM Bushman: the halrun command... it was part of my original version, right?
12:17 PM Bushman: so if i run my component from there, it works fine...
12:17 PM jepler: when you are in your clone and you "./scripts/linuxcnc" or ". scripts/rip-environment", you are running your custom built version. If you are at the commandline and you don't ". scripts/rip-environment" then commands like "halrun" and "linuxcnc" refer to installed versions. And no matter what, icons refer to the installed version.
12:17 PM Bushman: why does it fail when run from hal file
12:17 PM Bushman: it's the same hal enviroment
12:17 PM jepler: but also until you attach that "-H", the so-called component probably isn't trying to communicate with HAL at all
12:17 PM Bushman: hmm..
12:18 PM Bushman: let me try something
12:18 PM Bushman: brb
12:18 PM jepler: and if you are mixing version 2.7 and version 2.9, then they will create shared memory errors with each other that persist until you "ipcrm (mumble)" or reboot
12:18 PM jepler: and I have to go, I'm sorry I didn't have an easy answer for you :-/
12:21 PM Bushman: oh well, thanks for the effort anyway
12:21 PM Bushman: also indid -H is the moment where it fails
12:21 PM Bushman: even from command line manually
01:57 PM Bushman: ok, i give up...
01:58 PM Bushman: is there any documentation with a comprehensive list of hal pins?
01:59 PM Bushman: pretty much nothing from the example configuration for this MPG wants to work
02:01 PM Tom_L: only thing i know of are the utilities like halshow etc. no printed list i'm aware of
02:06 PM CaptHindsight: all hal pins used in components that ship in the official LCNC ISO?
02:09 PM Bushman: CaptHindsight: yes
02:10 PM Bushman: preferably for a specific version or with version compatibility info
02:10 PM Bushman: cause i've commented out half of the example config and it still tells me such pin doesn't exist
02:12 PM Tom_L: i recall asking about such a list a long time ago and never came up with one
02:13 PM Tom_L: any certain pin?
02:15 PM Bushman: well, lets take the most recent, which i haven't comented out yet, shall we?
02:15 PM Bushman: halui.mode.auto
02:16 PM Bushman: does it exist in 2.7.14?
02:17 PM burklefoo: Its not possible to list all the available pins but you can list those available in you current configuration
02:17 PM Tom_L: shows up in both sets of docs
02:18 PM Tom_L: pull up halshowpin and see what it shows
02:18 PM Bushman: what am i missing here?
02:18 PM burklefoo: it only exists if halui is loaded
02:18 PM Tom_L: i had an issue with axis/joint once
02:18 PM Bushman: burklefoo: how do i load it?
02:18 PM burklefoo: man halui
02:20 PM Tom_L: HALUI = halui in the .ini file
02:20 PM Bushman: hmm...
02:20 PM Tom_L: under [hal] section
02:20 PM Bushman: yup, it's missing
02:21 PM Tom_L: or any other .hal files you are using
02:21 PM Bushman: i'll try the ini and see what blows up
02:23 PM Tom_L: other components are loaded with loadrt
02:24 PM Bushman: ok, partial success
02:25 PM Bushman: axis has opened and SOME functionality is already working!
02:25 PM Bushman: now i need to uncomment everything else and see what will make it crap itself again
02:28 PM burklefoo: If its running, in a terminal type
02:28 PM burklefoo: halcmd show all > all.txt
02:29 PM burklefoo: all.txt will be a file of all pins, signals, parameters, and functions available with the components you have loaded
02:29 PM burklefoo: (no need to guess if pins,parameters, signals are there or not)
02:43 PM Bushman: ok, i'm out of time...
02:44 PM Bushman: see ya on monday!
02:44 PM * Bushman is gone
10:20 PM fjungclaus1 is now known as fjungclaus