New Robot Configuration Compile Error [Solved]

More
12 Aug 2015 07:42 - 15 Aug 2015 21:36 #61302 by jstoquica
Good day,

Recently I did a kinematic file *.c and then compiled it successfully. First compiling with "run in place" and then compiling with sudo comp --install *.c

Then I did a simulation model *.py and everything sunshine.

But today, I want test the kinematics parameters with the simulation in vismach, and linuxcnc generated a error when I try to run.

Any idea for solve the error? Thanks.
Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/realtime-2.6.32-122-rtai/modules/linuxcnc
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/share/linuxcnc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.5
LINUXCNC - 2.5.4
Machine configuration directory is '/home/asea/linuxcnc/configs/irb'
Machine configuration file is 'puma560.ini'
INIFILE=/home/asea/linuxcnc/configs/irb/puma560.ini
PARAMETER_FILE=puma.var
TASK=milltask
HALUI=halui
DISPLAY=axis
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
Shutting down and cleaning up LinuxCNC...
Killing task linuxcncsvr, PID=1964
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Cleanup done

Debug file information:
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 
insmod: error inserting '/usr/realtime-2.6.32-122-rtai/modules/linuxcnc/irb.ko': -1 Unknown symbol in module
puma560_sim_6.hal:4: exit value: 1
puma560_sim_6.hal:4: insmod failed, returned -1
See the output of 'dmesg' for more information.
1964
  PID TTY      STAT   TIME COMMAND
Stopping realtime threads
Unloading hal components

Kernel message information:
[   47.831856] I-pipe: Domain RTAI registered.
[   47.831861] RTAI[hal]: <3.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[   47.831863] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[   47.831884] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[   47.831885] PIPELINE layers:
[   47.831887] fd0f5e20 9ac15d93 RTAI 200
[   47.831889] c085cb20 0 Linux 100
[   47.845098] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[   47.845188] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[   47.845191] RTAI[sched]: hard timer type/freq = APIC/16623760(Hz); default timing: periodic; linear timed lists.
[   47.845194] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 2925553000 hz.
[   47.845196] RTAI[sched]: timer setup = 999 ns, resched latency = 2944 ns.
[   47.845249] RTAI[usi]: enabled.
[   47.871174] RTAI[math]: loaded.
[   47.932861] irb: module license 'unspecified' taints kernel.
[   47.932864] Disabling lock debugging due to kernel taint
[   47.932966] irb: Unknown symbol pmHomPoseConvert
[   47.933032] irb: Unknown symbol pmPoseHomConvert
[   47.933149] irb: Unknown symbol pmRpyQuatConvert
[   47.933316] irb: Unknown symbol pmQuatRpyConvert
[   48.121124] RTAI[math]: unloaded.
[   48.139697] SCHED releases registered named ALIEN RTGLBH
[   48.168238] RTAI[malloc]: unloaded.
[   48.268010] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[   48.269631] I-pipe: Domain RTAI unregistered.
[   48.269655] RTAI[hal]: unmounted.
Last edit: 15 Aug 2015 21:36 by jstoquica.

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

More
12 Aug 2015 13:24 - 12 Aug 2015 15:02 #61310 by ArcEye

irb: module license 'unspecified' taints kernel.


It has probably fallen foul of a peculiarity of the open source linux kernel.

They do not like proprietary module licensing and can refuse to load anything that does
not licence to an open source standard like GPL2

There used to be a lot of problems sometimes with nvidia drivers for linux. At the very least there was a complaint similar to the above and some would be refused and unloaded.

The remaining errors are because the symbol referenced is no found, possibly not exported properly? Can't guess without knowing where they come from.

(well they come from the posemath library, but don't know how they are used or the module was built.
If you are using modules that are not in modules.dep for that kernel, you have to make sure the referenced module is loaded first or you specifically export the function names)

regards
Last edit: 12 Aug 2015 15:02 by ArcEye.
The following user(s) said Thank You: jstoquica

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

More
12 Aug 2015 21:08 #61334 by andypugh
is "irb" the name of your kinematics module?

Perhaps your config doesn't have "loadrt irb" at the top of the HAL, where "loadrt trivkins" normally goes?
The following user(s) said Thank You: jstoquica

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

More
12 Aug 2015 22:18 - 22 Aug 2015 04:29 #61340 by jstoquica
Good Day,

irb: module license 'unspecified' taints kernel.


It was fixed with a simple line of code:
MODULE_LICENSE("GPL");

is "irb" the name of your kinematics module?

Perhaps your config doesn't have "loadrt irb" at the top of the HAL, where "loadrt trivkins" normally goes?


My HAL file has the changed name of the kinematics output file, after compiling the *.c file.

I attach the kinematics files, because I don't understand the warnings about posemath.h library.

Now the error when I run linuxcnc is:
Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/realtime-2.6.32-122-rtai/modules/linuxcnc
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/share/linuxcnc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.5
LINUXCNC - 2.5.4
Machine configuration directory is '/home/asea/linuxcnc/configs/irb'
Machine configuration file is 'puma560.ini'
INIFILE=/home/asea/linuxcnc/configs/irb/puma560.ini
PARAMETER_FILE=puma.var
TASK=milltask
HALUI=halui
DISPLAY=axis
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Realtime system did not load
Shutting down and cleaning up LinuxCNC...
Killing task linuxcncsvr, PID=2857
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Cleanup done

Debug file information:
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 
insmod: error inserting '/usr/realtime-2.6.32-122-rtai/modules/rtai_hal.ko': -1 File exists
2857
  PID TTY      STAT   TIME COMMAND
Stopping realtime threads
Unloading hal components
ERROR: Module hal_lib does not exist in /proc/modules
ERROR: Module rtapi does not exist in /proc/modules
ERROR: Module rtai_math does not exist in /proc/modules
ERROR: Module rtai_sem does not exist in /proc/modules
ERROR: Module rtai_fifos does not exist in /proc/modules
ERROR: Removing 'rtai_sched': Device or resource busy
ERROR: Module rtai_hal is in use by rtai_sched

Kernel message information:
[ 3118.727865] I-pipe: Domain RTAI registered.
[ 3118.727869] RTAI[hal]: <3.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[ 3118.727870] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[ 3118.727892] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 3118.727893] PIPELINE layers:
[ 3118.727895] fcaf5e20 9ac15d93 RTAI 200
[ 3118.727897] c085cb20 0 Linux 100
[ 3118.740862] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 3118.740975] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 3118.740979] RTAI[sched]: hard timer type/freq = APIC/16624720(Hz); default timing: periodic; linear timed lists.
[ 3118.740981] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 2926150000 hz.
[ 3118.740983] RTAI[sched]: timer setup = 999 ns, resched latency = 2943 ns.
[ 3118.741036] RTAI[usi]: enabled.
[ 3118.765908] RTAI[math]: loaded.
[ 3979.310229] RTAI[math]: unloaded.
[ 3979.333220] SCHED releases registered named ALIEN RTGLBH
[ 3979.364692] RTAI[malloc]: unloaded.
[ 3979.464511] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 3979.466356] I-pipe: Domain RTAI unregistered.
[ 3979.466380] RTAI[hal]: unmounted.

I appreciate your cooperation, because after I will finish this work I want to leave for the community my own documents for future manipulators developments.
Last edit: 22 Aug 2015 04:29 by jstoquica.

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

More
12 Aug 2015 22:24 #61341 by andypugh
When I see a string of errors like that I generally conclude that RTAI is all confused, and an incompatible set of interdependent modules are loaded.

Rebooting and trying again seems to be the only fix.

However: I am a bit surprised that you managed to compile a kins that contains posemath with comp / halcompile. Normally it can't work out the #includes.
The following user(s) said Thank You: jstoquica

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

More
12 Aug 2015 23:19 - 13 Aug 2015 13:26 #61347 by ArcEye
Hi

If you are compiling a .c file, you should not really be using comp.

You probably need posemath in the build to link it in.

If you look at Makefile it specifically links it in for the *kins that require it

eg
obj-m += genhexkins.o
genhexkins-objs := emc/kinematics/genhexkins.o
genhexkins-objs += libnml/posemath/_posemath.o
genhexkins-objs += libnml/posemath/sincos.o $(MATHSTUB)

The easiest way is probably to build from a RIP and add your module to src/Makefile, copying all the entries for say genhexkins

As Andy said, comp is limited, and if not compiling an actual .comp file, you cannot even add user libs by the options method

regards
Last edit: 13 Aug 2015 13:26 by ArcEye.
The following user(s) said Thank You: jstoquica

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

More
13 Aug 2015 01:51 #61355 by jstoquica
Thanks for yours replies,

I am working with linuxcnc 2.5.4, and I downloaded the Source package for compile as "run in place", and the Makefile for modify it easy to find.

How can I compile my *.c file without comp/halcompile, with installed source, when I try to find that Makefile is so different that other one.

In the location /usr/src/linux-headers-2.6.32-122-rtai, there is other Makefile. How can I compile with my actual version? Thanks.

root@asea-desktop:/usr/src/linux-headers-2.6.32-122-rtai# ls
arch drivers init lib net sound usr
block firmware ipc Makefile samples source virt
crypto fs Kbuild mm scripts tools
Documentation include kernel Module.symvers security ubuntu
root@asea-desktop:/usr/src/linux-headers-2.6.32-122-rtai#

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

More
13 Aug 2015 13:25 - 13 Aug 2015 22:07 #61373 by ArcEye
The Makefile in the kernel sources is a copy of the kernel Makefile, as one might expect, so no use to you.

I don't understand your reluctance, all you have to do is download the same version of the Linuxcnc sources, as you are currently using.
www.linuxcnc.org/dists/lucid/linuxcnc2.5...inuxcnc_2.5.4.tar.gz

Build a RIP and get your module built and working.
wiki.linuxcnc.org/cgi-bin/wiki.pl?Instal..._or_8_04_from_source
(just replace references to emc2 with linuxcnc and use the sources above)

You may well then be able to just transfer the module to your usr system.
The most you would have to do is rebuild as a user install and overwrite your existing
files from that install.

You are going to have to get to grips with RIP builds if you are going to do any sort of developing, because you need the sources and in this case need to link with intermediate object files.

What you can do with external components will be limited otherwise, some functions you will need are not exported publicly, as you have just found.

regards
Last edit: 13 Aug 2015 22:07 by ArcEye.

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

More
13 Aug 2015 16:44 #61378 by andypugh
To add a new kinematics to the build, put it in src/emc/kinematics and duplicate the makefile lines here that are used for (for example) rotatekins.
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...9aa58dd0cf969f1#l897

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

More
13 Aug 2015 22:16 #61382 by jstoquica
Good day and thanks again,

I did:
cd src

In the source directory, build LinuxCNC:

./autogen.sh  (this builds the configure script)
./configure --enable-run-in-place
make clean
make
sudo make setuid

to run the software go back to the top level directory, and issue:

scripts/. rip-environment

And when I try to run my configuration, llinuxcnc generates the next advise:
Starting LinuxCNC...
puma560_sim_6.hal:4: module 'irb' not loaded
Shutting down and cleaning up LinuxCNC...
/home/asea/Documents/Files/Source/build/bin/linuxcnc_module_helper: Invalid usage with args: remove irb6

Usage: /home/asea/Documents/Files/Source/build/bin/linuxcnc_module_helper insert /path/to/module.ext [param1=value1 ...]

where module is one of:
	rtai_math
	rtai_sem
	rtai_shm
	rtai_fifos
	rtai_up
	rtai_lxrt
	rtai_hal
	rtai_sched
	rtai_smi
	rtai
	rt_mem_mgr
	adeos
	rtl_time
	rtl_sched
	rtl_posixio
	rtl_fifo
	rtl
	mbuff

the path starts with one of:
	/lib/modules
	/usr/realtime-2.6.32-122-rtai

and the extension is one of:
	.ko

or the module is in the directory /home/asea/Documents/Files/Source/build/rtlib

OR

/home/asea/Documents/Files/Source/build/bin/linuxcnc_module_helper remove module

where module is one of the modules listed above.

<commandline>:0: exit value: 1
<commandline>:0: rmmod failed, returned -1
<commandline>:0: unloadrt failed
ERROR: Module hal_lib is in use by irb
ERROR: Module rtapi is in use by hal_lib
ERROR: Module rtai_math is in use by irb,rtapi
ERROR: Module rtai_sem is in use by rtapi
ERROR: Module rtai_fifos is in use by rtapi
ERROR: Module rtai_sched is in use by rtapi,rtai_sem,rtai_fifos
ERROR: Module rtai_hal is in use by rtapi,rtai_sem,rtai_fifos,rtai_sched
Cleanup done
LinuxCNC terminated with an error.  You can find more information in the log:
    /root/linuxcnc_debug.txt
and
    /root/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal


Regards.

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

Time to create page: 0.181 seconds
Powered by Kunena Forum