#linuxcnc-devel Logs
Jul 04 2019
#linuxcnc-devel Calendar
02:42 AM phillc54: linuxcnc-build: force build --branch=master 2000.docs
02:45 AM linuxcnc-build: build forced [ETA 7m59s]
02:45 AM linuxcnc-build: I'll give a shout when the build finishes
02:53 AM linuxcnc-build: Hey! build 2000.docs #4848 is complete: Warnings [8warnings compile]
02:53 AM linuxcnc-build: Build details are at http://buildbot.linuxcnc.org/buildbot/builders/2000.docs/builds/4848
08:42 AM memleak: RTAI 5.2.2 stable release for LinuxCNC is here: https://github.com/NTULINUX/RTAI/releases
10:29 AM seb_kuzminsky: memfrob: i think you should give your fork of rtai a different name. "RTAI" is rtai.org
10:29 AM seb_kuzminsky: like machinekit vs linuxcnc
11:02 AM memfrob: CaptHindsight suggested RTAI-TWF (the working fork)
11:03 AM memfrob: oh I completely changed the structure btw, it all makes sense now.
11:16 AM memfrob: wow, compressed mainline: 3.1MB Mine: 468KB
11:19 AM memfrob: tracking updates between RTAI releases will be really easy now considering there's not much left :D
02:41 PM CaptHindsight: or RTAI-FTW (fork that works, for the win etc)
02:50 PM CaptHindsight: no offense, but a little fun poke RTAI-LVF (la versione funzionante)
05:31 PM andypugh: memfrob: Awake?
05:33 PM memfrob: Now, yes :) took a nao
05:34 PM andypugh: I am having a problem building the RTAI package
05:34 PM andypugh: code model kernel does not support PIC mode
05:34 PM andypugh: Any ideas?
05:34 PM memfrob: 32-bit or 64?
05:34 PM andypugh: 64
05:34 PM memfrob: musl?
05:35 PM andypugh: Pass
05:35 PM andypugh: RTAI seems to build OK, it’s the dpgk-buildpackage that is failing
05:36 PM memfrob: post the output surrounding the PIC error
05:37 PM memfrob: the error is true, -mcmodel=model and -fPIC are mutually exclusive
05:37 PM memfrob: *-mcmodel=kernel
05:39 PM andypugh: Line 393, for example: https://paste.ubuntu.com/p/pz8CxzQrzr/
05:39 PM memfrob: oh god
05:40 PM memfrob: remove everything related to newlib from seb's files
05:40 PM andypugh: OK :-)
05:40 PM memfrob: RTAI during make runs git clone musl ; you don't need any newlib at all
05:41 PM memfrob: the math side of things is handled completely internally
05:43 PM memfrob: andypugh, for the final debs: https://github.com/NTULINUX/RTAI/releases
05:57 PM memfrob: Just to get an idea for your hardware I opened a no-calibration branch (completely removes the latency self calibration) so it's more like how RTAI was in 3 and 4 and I am interested to see if that works for you or not.
05:57 PM memfrob: https://github.com/NTULINUX/RTAI/commits/no-calibration
05:59 PM memfrob: oh wow, RTAI_CAL_FREQS_FACT is a dead option in master branch too, just realized that.
06:10 PM memfrob: TurBoss, thank you for the star!
06:11 PM TurBoss: :)
06:12 PM memfrob: How long have you been here?
06:21 PM andypugh: memfrob: I struggle with the most trivial things. Like not being able to generate a valid changelog
06:26 PM memfrob: I have no idea what the syntax is for the debian changelog
06:27 PM memfrob: copy what seb did?
06:27 PM memfrob: it's that perfect balance between copying his work and modifying it :)
06:28 PM andypugh: There is a script, but it fails as there is no “debian” in your branch
06:30 PM memfrob: well I know, i'll put yours into the tree once it's working
06:31 PM memfrob: in the mean time you have to add the debian folder into the tree and modify as needed
06:42 PM memfrob: heh the firewall I built for my house comes up so fast, it can reset and i can stay connected to IRC
06:43 PM memfrob: Ok I built the kernel debs
06:43 PM memfrob: linux-image-4.14.132-rtai_4.14.132-rtai-2_amd64.deb linux-headers-4.14.132-rtai_4.14.132-rtai-2_amd64.deb etc
06:43 PM memfrob: andypugh, post your debian files, i'll see what i can do
06:45 PM memfrob: rebooting into new kernel
06:46 PM memfrob: alright, step 1 done
06:57 PM memfrob: andypugh, i haven't tested this but it should be a good start: http://dpaste.com/0D34C25
06:59 PM andypugh: I was trying to figure out how to create a pull request on your repo contining pretty much exactly the same stuff..
06:59 PM memfrob: hahaha!
07:00 PM memfrob: @RealAndypugh Fork the tree, do a git push, then go here: https://github.com/NTULINUX/RTAI/pull/new/master
07:00 PM memfrob: sign into github via web portal
07:02 PM memfrob: ah i see you now: https://github.com/andypugh/RTAI
07:02 PM Tom_L: someone suggested you rename RTAI
07:02 PM Tom_L: since it's for LCNC
07:02 PM memfrob: Yes, it will be called RTAI-LVF (la versione funzionante)
07:03 PM memfrob: It's funny because an Italian mobster is the official project maintainer
07:03 PM Tom_L: we were talking about it in the main channel and came up with RTAI-LCNC-5.xx
07:03 PM andypugh: (You should probably ignore that pull request, I was just illustratiing the problem)
07:03 PM Tom_L: it's your call though
07:05 PM memfrob: your tree is behind, that's why
07:05 PM memfrob: it's trying to merge my code into my code
07:06 PM memfrob: wait, you're basing it off my for-next branch which is gone..
07:07 PM memfrob: i moved everything to master and moved what was master, to legacy
07:08 PM memfrob: Tom_L, I will rename it once andypugh has the packages built, he'd kill me if I pulled that on him midway
07:09 PM Tom_L: hehe
07:09 PM Tom_L: is he working on a separate fork?
07:10 PM memfrob: his fork is kinda broken.
07:11 PM Tom_L: the NTULINUX is the main one?
07:11 PM memfrob: well yes but he based his changes off a branch i deleted because for-next isn't next anymore, it's now
07:12 PM memfrob: luckily all the changes he did has no conflicts in itself, the debian folder is 100% his so no problem there
07:12 PM memfrob: the git side needs to get fixed, but the code itself is guaranteed conflict free
07:14 PM memfrob: Billy Mays guaranteed
07:15 PM andypugh: Well, I have debs but I don’t think that they work
07:15 PM andypugh: the testsuite seems to link to files in andypugh/RTAI/debian/temp…….
07:15 PM memfrob: oh that's right
07:16 PM memfrob: i ran into that when i built RPMs for a military contractor
07:17 PM memfrob: the way i fixed it was to hard-code the makefiles to the install prefix
07:17 PM memfrob: DESTDIR is used in both GNUmakefile and the package build script
07:18 PM memfrob: it broke the usage of ./configure --prefix but it worked, any ideas for a better solution?
07:18 PM memfrob: this is the problem: https://github.com/NTULINUX/RTAI/blob/master/testsuite/GNUmakefile.am
07:19 PM andypugh: Makefiles are (largely) a mystery to me
07:19 PM memfrob: ok basically what is happening is: @echo "${DESTDIR}$(bindir)/rtai-load $(DESTDIR)$(testdir)/.runinfo" >> $(DESTDIR)$(testdir)/run
07:19 PM memfrob: that line for example, DESTDIR outside the debian package builder, means --prefix
07:19 PM memfrob: so if you use --prefix=/usr/realtime then:
07:19 PM andypugh: Though, it turns out tha LinuxCNC seems happy enough, it’s running the latency test compiled against the deb kernel and deb rtai
07:20 PM memfrob: @echo "/usr/realtime/$(bindir)/rtai-load /usr/realtime/$(testdir)/.runinfo"
07:20 PM memfrob: but DESTDIR in debian package builder is: `pwd`/debian/tmp
07:21 PM memfrob: ergo: @echo "andypugh/RTAI/debian/tmp/$(bindir)/rtai-load /andypugh/RTAI/debian/tmp/$(testdir)/.runinfo"
07:22 PM andypugh: Anyway, I need to sleep now, and I am away from LinuxCNC from now until Sunday night at the earliest
07:22 PM memfrob: the same thing happens with the calibration tool: https://github.com/NTULINUX/RTAI/blob/master/src/sched/GNUmakefile.am
07:22 PM memfrob: so testsuite and calibration are both essentially broken
07:23 PM memfrob: you dont need them for linuxcnc which is why it works
07:23 PM memfrob: good night andypugh the behavior you're experiencing is normal
07:24 PM memfrob: broken but normal
07:24 PM andypugh: Great!
07:30 PM memfrob: I think if i change the references from echo DESTDIR to PREFIX it should work
07:31 PM memfrob: leave everything else the same
07:36 PM Tom_L: so you build the OS for RTAI then add LCNC to it?
07:37 PM memfrob: LinuxCNC is up to the user, I'm just hosting the RTAI side of things, aside from a LinuxCNC patch inside the RTAI tree
07:38 PM memfrob: To test this makefile fix, luckily i don't need to actually build a package, but just specify make DESTDIR="path/here"
07:38 PM Centurion_Dan: I'm looking at building LinuxCNC for Devuan, and am wondering if we can fix the packaging so that it will always build both rtai and rt_preempt supporting packages in a single build process.
07:39 PM memfrob: linuxcnc detects RTOS on ./configure
07:39 PM memfrob: you'd have to build debs with a different ./configure line per
07:40 PM Centurion_Dan: memfrob: does rtai depend on extra libs or a particular rtai patched kernel version?
07:42 PM Centurion_Dan: I really hope that rtai support is via a lib in a similar fashion to alsa uses libalsa to provide a stable interface rather then needing to use kernel headers directly.
07:42 PM Centurion_Dan: that would be the ideal.
07:46 PM memfrob: RTAI uses kbuild
07:46 PM memfrob: I GOT IT WORKING!
07:47 PM Tom_L: yay!
07:54 PM memfrob: Centurion_Dan, RTAI is a set of kernel modules, ALSA is part of the linux kernel that has a userspace API which talks to it
07:55 PM memfrob: RTAI is all out-of-tree -- if you want to change that, go for it.
08:27 PM memfrob: Every tine I think I mastered autotools, there's a bunch more I realize I don't know
08:28 PM Tom_L: thanks for your efforts on RTAI
08:29 PM memfrob: I thought I had it working but I didn't
08:29 PM Tom_L: still not working?
08:29 PM memfrob: so much makefile crap..
08:29 PM memfrob: it's worse than i thought
08:30 PM memfrob: now it works, but if you want to install it normally, it doesn't
08:30 PM memfrob: you basically now have to use DESTDIR
08:32 PM memfrob: without it, it installs to /testsuite and /calibration because fucking $prefix disappears, so i added a helper function to AC_SUBST for @RTAI_INSTALL_DIR@ which points to ${prefix} in configure.ac and if it's not one thing, it's something else
08:32 PM memfrob: i could be here all day hacking away at configure and makefile.am files -_-
08:32 PM memfrob: eventually i'd find the magic combination but it's 100c in here
08:34 PM memfrob: i'll work on it more later: http://dpaste.com/2C6ZQQK
08:36 PM memfrob: it's all messed up right now, i need a break
08:54 PM memfrob: and epiphany
08:57 PM memfrob: https://github.com/NTULINUX/RTAI/commit/7238cbc5883596506ccd4b1e418346cbc92b84b8
08:58 PM memfrob: It was so simple..
09:10 PM memfrob: if a person uses --bindir though, they can easily break that functionality
09:11 PM memfrob: would @RTAI_INSTALL_DIR@$(bindir) work? I'm afraid to find out
09:11 PM memfrob: because it's semi hardcoded right now
09:16 PM memfrob: it works
09:19 PM Centurion_Dan: memfrob: I'm pretty sure that debian packaging will use --bindir...
09:19 PM memfrob: it doesn't but i fixed it anyway (the right way)
09:20 PM memfrob: the rules file doesn't have bindir
09:20 PM Centurion_Dan: When I get a chance I'm going to try to build rtai kernels for Devuan.
09:20 PM memfrob: https://github.com/NTULINUX/RTAI/commit/d8e395b438c77170724269285223241d24c9d065
09:22 PM Centurion_Dan: and fix LinuxCNC configuration so it can build both rtai and regular versions of the binary package.
09:22 PM memfrob: you'll be trying out my kernel patches too?
09:22 PM memfrob: i have it up to 4.14.132
09:38 PM memfrob: wow the fix was easier than i thought
09:38 PM memfrob: i dont even need RTAI_INSTALL_DIR
09:43 PM memfrob: all it needed was the DESTDIRs in the echos to go away
09:43 PM memfrob: https://github.com/NTULINUX/RTAI/commit/971c21743bfaf8086fb4d756aabf0d87a25c5a5a
09:44 PM memfrob: when andypugh comes back on sunday he can give that commit a try
09:45 PM memfrob: well i'm done, if that works for him, i'll add the debian folder to it, bump version to 5.2.3 and rename the project
09:46 PM Tom_L: :)
09:54 PM memfrob: the Copyright RTAI project lines though still need to be in place since the majority of the actual source is from them, I just cleaned it up and made countless mods to it
10:01 PM Centurion_Dan: memfrob: I'll be sticking to debian shipped kernel versions. Right now I'm working on getting devuan onto an espressobin which I hope to run a headless linuxCNC on.
10:01 PM memfrob: debian doesn't have an rtai kernel
10:02 PM memfrob: andypugh is working on those using my patches
11:08 PM Centurion_Dan: memfrob: I'll get devuan to build an rtai patched kernel if need be. Do you know of any other software that can take advantage of rtai kernels besides linuxcnc?