Ubuntu 16.04 x64 and Linuxcnc 2.8.0 / 2.7.7

More
02 Dec 2016 00:00 #83548 by hainjedaf
Hi,

I am reasonably new to the linuxcnc thing. I had a working config using the linuxcnc install and wanted to move up.
I installed ubuntu 16.04 with latest upgrades and all necessities for building linuxcnc.

Linuxcnc builds both in 2.7.7 and 2.8.0-pre1 (master) branches

Latency-test produces figures sub 25000 so acceptable for my mesa 5i25+7i76 setup.

When starting linuxcnc both versions fail when loading the XHC HB04 pendant modules.
marout@LinuxCNC64-mill:~/linuxcnc-dev/scripts$ ./linuxcnc ~/linuxcnc/configs/BF25L-test/BF25L-test.ini
LINUXCNC - 2.7.7
Machine configuration directory is '/home/marout/linuxcnc/configs/BF25L-test'
Machine configuration file is 'BF25L-test.ini'
Starting LinuxCNC...
Found file(REL): ./BF25L-test.hal
Note: Using POSIX realtime
hm2: loading Mesa HostMot2 driver version 0.15
hm2_pci: loading Mesa AnyIO HostMot2 driver version 0.7
hm2_pci: discovered 5i25 at 0000:04:00.0
hm2/hm2_5i25.0: Smart Serial Firmware Version 43
Board hm2_5i25.0.7i76.0.0 Hardware Mode 0 = standard
Board hm2_5i25.0.7i76.0.0 Software Mode 0 = io_spin
Board hm2_5i25.0.7i76.0.0 Software Mode 1 = io_ana_spin
Board hm2_5i25.0.7i76.0.0 Software Mode 2 = io_enc_ana_spin_fv
hm2/hm2_5i25.0: 34 I/O Pins used:
hm2/hm2_5i25.0:     IO Pin 000 (P3-01): StepGen #0, pin Direction (Output)
hm2/hm2_5i25.0:     IO Pin 001 (P3-14): StepGen #0, pin Step (Output)
hm2/hm2_5i25.0:     IO Pin 002 (P3-02): StepGen #1, pin Direction (Output)
hm2/hm2_5i25.0:     IO Pin 003 (P3-15): StepGen #1, pin Step (Output)
hm2/hm2_5i25.0:     IO Pin 004 (P3-03): StepGen #2, pin Direction (Output)
hm2/hm2_5i25.0:     IO Pin 005 (P3-16): StepGen #2, pin Step (Output)
hm2/hm2_5i25.0:     IO Pin 006 (P3-04): StepGen #3, pin Direction (Output)
hm2/hm2_5i25.0:     IO Pin 007 (P3-17): StepGen #3, pin Step (Output)
hm2/hm2_5i25.0:     IO Pin 008 (P3-05): StepGen #4, pin Direction (Output)
hm2/hm2_5i25.0:     IO Pin 009 (P3-06): StepGen #4, pin Step (Output)
hm2/hm2_5i25.0:     IO Pin 010 (P3-07): Smart Serial Interface #0, pin TxData0 (Output)
hm2/hm2_5i25.0:     IO Pin 011 (P3-08): Smart Serial Interface #0, pin RxData0 (Input)
hm2/hm2_5i25.0:     IO Pin 012 (P3-09): IOPort
hm2/hm2_5i25.0:     IO Pin 013 (P3-10): IOPort
hm2/hm2_5i25.0:     IO Pin 014 (P3-11): Encoder #0, pin Index (Input)
hm2/hm2_5i25.0:     IO Pin 015 (P3-12): Encoder #0, pin B (Input)
hm2/hm2_5i25.0:     IO Pin 016 (P3-13): Encoder #0, pin A (Input)
hm2/hm2_5i25.0:     IO Pin 017 (P2-01): IOPort
hm2/hm2_5i25.0:     IO Pin 018 (P2-14): IOPort
hm2/hm2_5i25.0:     IO Pin 019 (P2-02): IOPort
hm2/hm2_5i25.0:     IO Pin 020 (P2-15): IOPort
hm2/hm2_5i25.0:     IO Pin 021 (P2-03): IOPort
hm2/hm2_5i25.0:     IO Pin 022 (P2-16): IOPort
hm2/hm2_5i25.0:     IO Pin 023 (P2-04): IOPort
hm2/hm2_5i25.0:     IO Pin 024 (P2-17): IOPort
hm2/hm2_5i25.0:     IO Pin 025 (P2-05): IOPort
hm2/hm2_5i25.0:     IO Pin 026 (P2-06): IOPort
hm2/hm2_5i25.0:     IO Pin 027 (P2-07): IOPort
hm2/hm2_5i25.0:     IO Pin 028 (P2-08): IOPort
hm2/hm2_5i25.0:     IO Pin 029 (P2-09): IOPort
hm2/hm2_5i25.0:     IO Pin 030 (P2-10): IOPort
hm2/hm2_5i25.0:     IO Pin 031 (P2-11): IOPort
hm2/hm2_5i25.0:     IO Pin 032 (P2-12): IOPort
hm2/hm2_5i25.0:     IO Pin 033 (P2-13): IOPort
hm2/hm2_5i25.0: registered
hm2_5i25.0: initialized AnyIO board at 0000:04:00.0
config string '0 out'
Found file(REL): ./custom.hal
Found file(LIB): /home/marout/linuxcnc-dev/lib/hallib/xhc-hb04.tcl
xhc-hb04: waiting for XHC-HB04 device
xhc-hb04: found XHC-HB04 device
xhc-hb04.tcl: Using existing outpin signame: spindle-vel-cmd-rps-abs
APP: xhc-hb04-accels found: </home/marout/linuxcnc-dev/scripts/xhc-hb04-accels>
APP: monitor-xhc-hb04 found: </home/marout/linuxcnc-dev/scripts/monitor-xhc-hb04>
Traceback (most recent call last):
  File "/home/marout/linuxcnc-dev/bin/gmoccapy", line 38, in <module>
    import vte                # To get the embedded terminal
ImportError: No module named vte
Shutting down and cleaning up LinuxCNC...
Running HAL shutdown script
task: 66 cycles, min=0.000004, max=0.020939, avg=0.008063, 0 latency excursions (> 10x expected cycle time of 0.010000s)
xhc-hb04: connection lost, cleaning up
libusb: error [do_close] Device handle closed while transfer was still being processed, but the device is still connected as far as we know
libusb: warning [do_close] A cancellation for an in-flight transfer hasn't completed but closing the device handle
hm2_5i25.0: dropping AnyIO board at 0000:04:00.0
hm2/hm2_5i25.0: unregistered
RTAPI_PCI: Unmapped 65536 bytes at 0x7fd97d676000
hm2_pci: driver unloaded
hm2: unloading
Note: Using POSIX realtime
LinuxCNC terminated with an error.  You can find more information in the log:
    /home/marout/linuxcnc_debug.txt
and
    /home/marout/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal
marout@LinuxCNC64-mill:~/linuxcnc-dev/scripts$

No useful info is printed in Linuxcnc_debug.txt

dmesg provides following:
[  106.139921] pci 0000:04:00.0: enabling device (0000 -> 0002)
[ 1707.161333] show_signal_msg: 39 callbacks suppressed
[ 1707.161337] xhc-hb04[8158]: segfault at 10 ip 00007f2f7df3ca1b sp 00007ffebfac6eb0 error 4 in libc-2.23.so[7f2f7debd000+1bf000]
[ 2035.260907] NOHZ: local_softirq_pending 80
[ 2035.261011] NOHZ: local_softirq_pending 80
[ 2035.261138] NOHZ: local_softirq_pending 80
[ 4071.194768] xhc-hb04[21063]: segfault at 10 ip 00007f45263e9a1b sp 00007ffe764d7f60 error 4 in libc-2.23.so[7f452636a000+1bf000]
[ 4493.518467] xhc-hb04[21272]: segfault at 10 ip 00007f8a7ba71a1b sp 00007ffe6e9b4070 error 4 in libc-2.23.so[7f8a7b9f2000+1bf000]
[ 4512.249963] xhc-hb04[21444]: segfault at 10 ip 00007fa7b4b94a1b sp 00007fff656face0 error 4 in libc-2.23.so[7fa7b4b15000+1bf000]
[ 4663.594148] xhc-hb04[21671]: segfault at 10 ip 00007fee54b29a1b sp 00007fff195b4dd0 error 4 in libc-2.23.so[7fee54aaa000+1bf000]

where am I going wrong or do I have a bug at hand?

Please Log in or Create an account to join the conversation.

More
02 Dec 2016 00:22 #83550 by Hakan
It's the import vte line that goes wrong.
sudo apt-get install python-vte
You likely will get a number of those messages of missing modules and you need to install them.

Please Log in or Create an account to join the conversation.

More
02 Dec 2016 08:12 #83558 by bkt
sorry hacan ... a little info ... wath are your motherboard hardware and with kernel rt number you use?? ...

Any how ... I try from 4 days to install my custom com in ubuntu 14.04 whitout success ... but in wheezy all go ok...

Regards
Giorgio

Please Log in or Create an account to join the conversation.

More
02 Dec 2016 08:39 #83560 by Hakan
Sorry for the short reply yesterday, it was late and I wrote on the ipad.
There may be more to it than I realized yesterday.
I built linuxcnc a few days ago and came across exactly the same messages, modules missing.
It was just to follow instructions to be be able to build linuxcnc.
But to get gmoccapy running I had to install a number of python packages.
The shut down message was exactly the one shown here with import module
failing. After starting/installing about ten times it all started up.
I would say fix all the missing modules first, they should be easy to install.
Hopefully what you see with xhc-hb04 is then gone.

I don't know anything specifically about ubuntu, I am on debian wheezy.
Kernel is 4.4 something with rt-preempt patches.

Please Log in or Create an account to join the conversation.

More
02 Dec 2016 09:05 #83561 by bkt
for my problem .... on debian 7 Lcnc 2.7.8 all ok but not recognise difference betwin axis and joint .... on debian 7 Lcnc master 2.8 .... not able to start my conf at all.... but custom comp install good...

there are some problem ....

regards
Giorgio

Please Log in or Create an account to join the conversation.

More
02 Dec 2016 12:13 #83570 by Hakan
First time I started linuxcnc from master (2.8-pre) with an old ini file I was offered to convert the ini file to the new format where axis and joints are separated. Accepted, and it worked after that. There were some almost trivial name changes needed in the hal files as well.

Just for the sake of testing, I installed ubuntu 16.04 in a virtualbox computer and built linuxcnc. It can absolutely be done.
The first problem was that instructions for "fulfilling dependencies" from the README didn't work. But ./configure gave me a lot of clues and I had to guess some but it was all a matter of installing a number of packages. After ./configure finished I ran "make" successfully, one warning I think.
To run linuxcnc it was again a matter of installing a number modules and libraries. Clues are given by the shutdown messages from the linuxcnc command, and later by pop-up windows. Also the python-vte mentioned in the first post showed up. The trickiest was the last error about "playbin" which was resolved by installing gstreamer0.10-plugins-base. Right now I have gmoccapy running in the sim ina virtualbox.
The following user(s) said Thank You: hainjedaf

Please Log in or Create an account to join the conversation.

More
02 Dec 2016 15:46 - 02 Dec 2016 22:48 #83581 by hainjedaf
Thanks to you all, but Hakan's reply nailed it.

The PLAYBIN error got me up the wall but his answer made it a home run.

I now have:
-Ubuntu 16.04.02 LTS x86_64
-Kernel 4.8.6-RT5+ (built as debian packages)
-LinuxCNC 2.8.0-pre1

THanks!!
Last edit: 02 Dec 2016 22:48 by hainjedaf.

Please Log in or Create an account to join the conversation.

More
24 Dec 2016 07:01 #84667 by Gibbz
Can you do a guide on getting ubuntu 16.04 working?
Id love to have my cnc on ubuntu, but havent a clue where to start...

Please Log in or Create an account to join the conversation.

More
29 Dec 2016 12:33 #84848 by hainjedaf
-Download latest RT-kernel patches
-Download kernel source to to fit patches.
-Unpack kernel in /opt/kernel-x.y.z-rtAB depending on rt patch number
-Patch kernel with RT-patches.
-Install build-essential.
-Configure kernel to enable 'FULL PRE-EMPTIVE RT' (make menuconfig)
-Compile the kernel and build a debian kernel package
-Install kernel using dpkg -i kernel-x.y.z-rtAB.deb
-follow instructions on building linuxcnc: linuxcnc.org/docs/devel/html/code/building-linuxcnc.html
-carefully read errors when linuxcnc fails or crashes to determine packages needed.
-install missing packages
-retry and repeat until linuxcnc starts

Hakan gave a valuable tip because that 'playbin' thing does not immediately point at gstreamer.
The following user(s) said Thank You: cncnoob1979

Please Log in or Create an account to join the conversation.

More
05 Apr 2018 22:24 #108465 by dbanks
New to Linux as a whole, but I'm having a bunch of trouble with this set up. I've installed Ubuntu 16.04.4, and I've tried a range of different ways to install 2.7. LiveUSB, in terminal, LiveCD, LiveInstall, and literally none of them work. Did you figure it out? What can I do differently?

Please Log in or Create an account to join the conversation.

Time to create page: 0.158 seconds
Powered by Kunena Forum