LinuxCNC on 12.04...got error, what does it mean?

More
04 Dec 2013 22:19 #41338 by skunkworks
I have installed it on 12.04 a few times using these directions (which references anders page) - I use anders for all the build dependencies.

wiki.linuxcnc.org/cgi-bin/wiki.pl?NewRTInstall

Another refferance is here - I put all the build dependencies on this page that I needed.

wiki.linuxcnc.org/cgi-bin/wiki.pl?Mesa7i..._Linuxcnc_On_Xenomai

remember to add the user to the right groups. (explains on the first link)

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

More
31 Dec 2013 22:35 #42226 by ddmotim
Was this issue ever resolved? I'm having a similar problem. I installed linuxcnc-rtos in Ubuntu 12.04 using the links in the previous post. I can run linuxcnc and use any of the pre-installed configurations fine (specifically, I ran a sherline set up with a gecko drive using the 3 axis gecko config), but when I try to use my custom configuration, linuxcnc fails with the same errors seen here.
linuxcnc_print:

RUN_IN_PLACE=yes
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/home/minibox/linuxcnc-rtos/bin
LINUXCNC_TCL_DIR=/home/minibox/linuxcnc-rtos/tcl
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/home/minibox/linuxcnc-rtos/rtlib
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/home/minibox/linuxcnc-rtos/src/objects
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.5
INIFILE=/home/minibox/linuxcnc-rtos/configs/Bridget/Bridget.ini
PARAMETER_FILE=linuxcnc.var
TASK=milltask
HALUI=
DISPLAY=axis
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Killing task linuxcncsvr, PID=21498
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments


linuxcnc_debug:

Can not find -sec MOT -var MOT -num 1
Can not find -sec IO -var IO -num 1
Can not find -sec LINUXCNC -var NML_FILE -num 1
Can not find -sec EMC -var NML_FILE -num 1
21498
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components


I'll try again and post all of the output from the terminal

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

More
31 Dec 2013 22:48 #42227 by ArcEye

Can not find -sec MOT -var MOT -num 1
Can not find -sec IO -var IO -num 1
Can not find -sec LINUXCNC -var NML_FILE -num 1
Can not find -sec EMC -var NML_FILE -num 1
21498
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components


This is not the cause, but a symptom - occurs quite often.
Will need the full error print and anything relevant from the end of dmesg.

If you can run a specimen config, the problem is in your own config, which I assume ran under an earlier version, not this one.

Try a comparison between the .hal and .ini files from the specimen and your old config. If that does not jump out at you, zip your config folder and attach it along with the errors

regards

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

More
31 Dec 2013 23:18 #42229 by ddmotim
Here is the printout from the terminal and the dmesg printout. It seems to have something to do with reading the parallel port.

File Attachment:

File Name: terminal-printout.txt
File Size:61 KB

Nothing jumps out at me from my config files.

File Attachment:

File Name: Bridget.zip
File Size:8 KB


Also worth noting, once I try my config file and it fails, I cannot run the gecko config either.
Attachments:

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

More
31 Dec 2013 23:55 #42230 by ArcEye
Hi

You are right, it does have something to do with the parport

Starting LinuxCNC...
config string '0x378 out '
Failed to claim parallel port /dev/parport0
hal_parport: rtapi_app_main: -19

From dmesg
[3.813109] parport_pc 00:09: reported by Plug and Play ACPI
[3.813176] parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTA
[3.907328] lp0: using parport0 (interrupt-driven).
[610.369632] parport0: cannot grant exclusive access for device ppdev0


I assume you are using a normal distro of 12.04, so it is assumed that you will want to print stuff and lp is loaded at boot (plus parport_pc and ppdev)

These block hal_parport_pc and Lcnc cannot access the parport

Before running run
sudo rmmod ppdev
sudo rmmod parport_pc
sudo rmmod lp

in a terminal

You should then be able to run OK

Thereafter you can remove the lp line in /etc/modules to prevent it loading at boot
(it may not be there in 12.04, will need to rummage around a bit)

Also worth noting, once I try my config file and it fails, I cannot run the gecko config either.


It will just have screwed up the module unloads, should run fine after a reboot

regards

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

More
31 Dec 2013 23:57 #42231 by ddmotim
I think I already removed the lp line, but I'll give this a shot. Thanks

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

More
01 Jan 2014 00:31 #42233 by ddmotim
So I did a reboot, ran sudo rmmod ppdev, but I got an error when i ran sudo rmmod parport_pc. It said parport_pc was in use and could not be removed.

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

More
01 Jan 2014 01:25 #42237 by ArcEye
OK

parport_pc is in the dependency chain for lp.

You need to find where lp is being loaded and stop it at boot

The standard method was to create a file called /etc/modprobe.d/linuxcnc.conf, which contains
install parport_pc /bin/true

and to comment out the line in /etc/modules
lp

I noticed you have the cups daemon loaded too, don't know if that tries to initiate lp, but you don't need it so that can go too
The entries in /etc/rc1.d to rc5.d are what I mean, but if you are not comfortable with that level of hacking, just leave them

regards

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

More
03 Jan 2014 00:14 #42291 by ddmotim
Happy New Year!
I've got lp commented out in /etc/modules.
I created /etc/modprobe.d/linuxcnc.conf.
After reboot, if I run lsmod | grep lp, lp still shows up. Any recommendations on how to figure out what is loading it?
I ran
sudo rmmod ppdev
sudo rmmod parport_pc
sudo rmmod lp

and got no errors this time. But now when I run linuxcnc, the error says it couldn't find the device at address 0x378

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

More
03 Jan 2014 23:10 - 06 Jan 2014 17:23 #42325 by ArcEye
Happy New Year to you too,

Unfortunately I don't have a 12.04 partition on a machine with a parport, so hard to experiment myself.

The whole system changed post 2.6.2X kernels, with far more emphasis upon hardware detection and udev creating devices on the fly

I would suspect that udev is loading lp when the port is discovered at boot and then it creates /dev/lp0 and /dev/parport0
The problem is that in /lib/modules/${uname -r}/modules.dep there will be a dependency chain which loads parport_pc and thence ppdev

It is parport_pc that is the problem.

If lp is now being loaded by udev, it is likely that when it is removed, udev also removes the /dev/lp0 and /dev/parport0 it created and linuxcnc will report that it cannot find the port at 0x378

So try booting and then dmesg | grep parport && dmesg | grep ppdev && dmesg | grep lp
If either parport_pc or ppdev are there then remove them, but leave lp and try linuxcnc again

regards
Last edit: 06 Jan 2014 17:23 by ArcEye.

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

Time to create page: 0.151 seconds
Powered by Kunena Forum