*SOLVED* Recompiling genhexkins
- andypugh
-
- Offline
- Moderator
-
- Posts: 23377
- Thank you received: 4967
I think you will find that you are now. You are hacking Linux kernel drivers.I state that I am not a programmer,
I think the problem is that your file was compiled in one place, then moved to another. You have to figure out a way to get the .ko to compile into the right place.The procedure that I have used to compile the module is:
sudo comp --install armkins.c
Then I have copied the file armkins.ko that it was created in emc2-dev/rtlib.
Why not use the version of emc2 that the driver is compiling in to? ie the run-in-place version?
Please Log in or Create an account to join the conversation.
- honey
- Offline
- Junior Member
-
- Posts: 34
- Thank you received: 0
andypugh wrote:
Why not use the version of emc2 that the driver is compiling in to? ie the run-in-place version?
Mmmh...I think that I use already that version or not? How I can know this? and What I should do?
You think that the my kinematics file are correct?
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
- Posts: 23377
- Thank you received: 4967
Do you actually have a self-compiled version of EMC2, compiled from source using "make" from inside the "src" directory of emc2-dev?
Mmmh...I think that I use already that version or not? How I can know this? and What I should do?Why not use the version of emc2 that the driver is compiling in to? ie the run-in-place version?
I am trying to work out if you have a run-in-place version as well as an installed version, or not.
How are you starting emc? From the menu, or from the command line?
If you try it both ways, are the version numbers on the splash-screen the same?
How about if you cd to emc2-dev and type
. ./scripts/emc-environment
emc
I haven't had a chance to look yet. Anyway, didn't you have it working a while ago? I seem to recall you changing the wrist setup?You think that the my kinematics file are correct?
Please Log in or Create an account to join the conversation.
- honey
- Offline
- Junior Member
-
- Posts: 34
- Thank you received: 0
andypugh wrote:
Do you actually have a self-compiled version of EMC2, compiled from source using "make" from inside the "src" directory of emc2-dev?
I am trying to work out if you have a run-in-place version as well as an installed version, or not.
How are you starting emc? From the menu, or from the command line?
If you try it both ways, are the version numbers on the splash-screen the same?
I think that I have the run in place version because I have used to compile
- cd emc2-dev/src
- ./configure --enable-run-in-place
make && sudo make setuid
but I don't know If this is the correct way to compile for my project. And probabily I have used only "make" also.
For my project I use by terminal the command with . ./script/emc-environment for start emc2 because I add a new file .py.
Anyway I can use both the ways and the version is 2.4.6
In this case there is 2.6.0 - preHow about if you cd to emc2-dev and type
Which version number do you get then?. ./scripts/emc-environment emc
Yes. I have tried to use genserkins but this doen't work for my project. The movements aren't precise and when I change the alpha d-h parameter the inverse kinematics doesn't work at all. So I decide to write a simpler kinematics for my robot. For the wirst you have suggested a way to combine the movements of two motors with some line in hal file....Anyway, didn't you have it working a while ago? I seem to recall you changing the wrist setup?
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
- Posts: 23377
- Thank you received: 4967
Ah, good.
In this case there is 2.6.0 - preHow about if you cd to emc2-dev and type
Which version number do you get then?. ./scripts/emc-environment emc
If your armkins.ko compiled into emc2-dev/src/ then it "belongs" to the 2.5 run-in-place version.
If you put it back there, and run the 2.6 version you _should_ find that it works.
Similarly, I think that if you run the 2.4.6 version of the emc-environment script, then run comp on your kins file, you might find that it gets compiled into the right place for 2.4.6 (but that is speculation on my part)
Please Log in or Create an account to join the conversation.
- honey
- Offline
- Junior Member
-
- Posts: 34
- Thank you received: 0
andypugh wrote:
Ah, good.
If your armkins.ko compiled into emc2-dev/src/ then it "belongs" to the 2.5 run-in-place version.
If you put it back there, and run the 2.6 version you _should_ find that it works.
Similarly, I think that if you run the 2.4.6 version of the emc-environment script, then run comp on your kins file, you might find that it gets compiled into the right place for 2.4.6 (but that is speculation on my part)
When I write the comand
comp --install armkins.c
the armkins.ko is created in /usr/realtime.2.6.32-122-rtai/modules/emc2
then I copy this file in emc2-dev/rtlib because emc-environment script requests armkins in that directory.
So how you think that i could be resolve?
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
- Posts: 23377
- Thank you received: 4967
comp --install armkins.c
the armkins.ko is created in /usr/realtime.2.6.32-122-rtai/modules/emc2
then I copy this file in emc2-dev/rtlib because emc-environment script requests armkins in that directory.
So how you think that i could be resolve?[/quote]
What happens if you run . ./emc2-dev/scripts/emc-environment then sudo comp --install armkins? Where does that put the armkins.ko?
Please Log in or Create an account to join the conversation.
- honey
- Offline
- Junior Member
-
- Posts: 34
- Thank you received: 0
What happens if you run . ./emc2-dev/scripts/emc-environment then sudo comp --install armkins? Where does that put the armkins.ko?
this is the result:
cnc@emco:~$ cd emc2-dev
cnc@emco:~/emc2-dev$ . ./scripts/emc-environment
cnc@emco:~/emc2-dev$ sudo comp --install armkins.c
make -C /usr/src/linux-headers-2.6.32-122-rtai SUBDIRS=`pwd` CC=gcc V=0 -o /Module.symvers modules
make[1]: ingresso nella directory «/usr/src/linux-headers-2.6.32-122-rtai»
CC [M] /tmp/tmpH4rzPY/armkins.o
/tmp/tmpH4rzPY/armkins.c: In function ‘kinematicsInverse’:
/tmp/tmpH4rzPY/armkins.c:119: warning: unused variable ‘c6’
/tmp/tmpH4rzPY/armkins.c:119: warning: unused variable ‘s6’
/tmp/tmpH4rzPY/armkins.c:118: warning: unused variable ‘c5’
/tmp/tmpH4rzPY/armkins.c:118: warning: unused variable ‘s5’
/tmp/tmpH4rzPY/armkins.c:117: warning: unused variable ‘c4’
/tmp/tmpH4rzPY/armkins.c:117: warning: unused variable ‘s4’
/tmp/tmpH4rzPY/armkins.c:116: warning: unused variable ‘c23’
/tmp/tmpH4rzPY/armkins.c:116: warning: unused variable ‘s23’
/tmp/tmpH4rzPY/armkins.c:111: warning: unused variable ‘th6’
/tmp/tmpH4rzPY/armkins.c:110: warning: unused variable ‘th5’
/tmp/tmpH4rzPY/armkins.c:109: warning: unused variable ‘th4’
/tmp/tmpH4rzPY/armkins.c:107: warning: unused variable ‘th23’
/tmp/tmpH4rzPY/armkins.c:103: warning: unused variable ‘sumSq’
/tmp/tmpH4rzPY/armkins.c:102: warning: unused variable ‘k’
/tmp/tmpH4rzPY/armkins.c:101: warning: unused variable ‘t3’
/tmp/tmpH4rzPY/armkins.c:101: warning: unused variable ‘t2’
/tmp/tmpH4rzPY/armkins.c:101: warning: unused variable ‘t1’
/tmp/tmpH4rzPY/armkins.c:99: warning: unused variable ‘singular’
Building modules, stage 2.
MODPOST 1 modules
WARNING: "hal_init" [/tmp/tmpH4rzPY/armkins.ko] undefined!
WARNING: "hal_exit" [/tmp/tmpH4rzPY/armkins.ko] undefined!
WARNING: "hal_ready" [/tmp/tmpH4rzPY/armkins.ko] undefined!
WARNING: "pmPoseHomConvert" [/tmp/tmpH4rzPY/armkins.ko] undefined!
WARNING: "pmHomPoseConvert" [/tmp/tmpH4rzPY/armkins.ko] undefined!
CC /tmp/tmpH4rzPY/armkins.mod.o
LD [M] /tmp/tmpH4rzPY/armkins.ko
make[1]: uscita dalla directory «/usr/src/linux-headers-2.6.32-122-rtai»
cp armkins.ko /usr/realtime-2.6.32-122-rtai/modules/emc2/
cnc@emco:~/emc2-dev$
The file armkins.ko continues to be copied in /usr/realtime-2.6.32-122-rtai/modules/emc2/
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
- Posts: 23377
- Thank you received: 4967
That's quite odd.The file armkins.ko continues to be copied in /usr/realtime-2.6.32-122-rtai/modules/emc2/
If you put the file in emc2-dev/src/emc/kinematics and then run "make" in emc2-dev/src does it get compiled?
Please Log in or Create an account to join the conversation.
- honey
- Offline
- Junior Member
-
- Posts: 34
- Thank you received: 0
andypugh wrote:
If you put the file in emc2-dev/src/emc/kinematics and then run "make" in emc2-dev/src does it get compiled?
The result when run "make" in emc2-dev/src is:
cnc@emco:~$ cd emc2-dev/src
cnc@emco:~/emc2-dev/src$ make
make: ingresso nella directory «/home/cnc/emc2-dev/src»
if [ -f config.status ]; then ./config.status --recheck; else \
echo 1>&2 "*** emc2 is not configured. Run './configure' with appropriate flags."; \
exit 1; \
fi
running CONFIG_SHELL=/bin/bash /bin/bash ./configure --enable-run-in-place --no-create --no-recursion
checking build toplevel... /home/cnc/emc2-dev
checking installation prefix... run in place
checking for grep... /bin/grep
checking for egrep... /bin/egrep
checking for RT dir... Using /usr/realtime-2.6.32-122-rtai/bin/rtai-config as the RT signature
checking for location of kernel headers... using value from RTS: /usr/src/linux-headers-2.6.32-122-rtai
checking for cc version... found gcc in rtai-config
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for usability of rdtscll from asm/msr.h... no
checking for usability of linux/hidraw.h... yes
checking for grep that handles long lines and -e... (cached) /bin/grep
checking for egrep... (cached) /bin/egrep
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking /usr/src/linux-headers-2.6.32-122-rtai/include/linux/version.h usability... yes
checking /usr/src/linux-headers-2.6.32-122-rtai/include/linux/version.h presence... yes
checking for /usr/src/linux-headers-2.6.32-122-rtai/include/linux/version.h... yes
checking for kernel version string... 2.6.32-122-rtai
checking for kernel module extension... .ko
checking kernel build system... kbuild
checking for module installation directory... configuring for run-in-place
/home/cnc/emc2-dev/rtlib
configure: WARNING: --enable-run-in-place will be removed soon.
Configure without specifying --prefix to get a run-in-place build.
checking for glib... yes - 2.24.1
checking for GTK 2.4.0 or above... yes - 2.20.1
checking for libgnomeprintui-2.2... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for g++... /usr/bin/g++
checking whether make sets $(MAKE)... yes
checking for ranlib... ranlib
checking for ar... /usr/bin/ar
checking for install... /usr/bin/install
checking for sed... /bin/sed
checking for ps... /bin/ps
checking for kill... /bin/kill
checking for whoami... /usr/bin/whoami
checking for awk... /usr/bin/awk
checking for insmod... /sbin/insmod
checking for rmmod... /sbin/rmmod
checking for lsmod... /sbin/lsmod
checking for pidof... /bin/pidof
checking for ipcs... /usr/bin/ipcs
checking for fuser... /bin/fuser
checking for mandb... /usr/bin/mandb
checking for python... /usr/bin/python
checking whether to build documentation... no
checking for kernel math support... ok, using RTAI's libm kernel module
checking for adeos... not found
checking for rtai_hal... /usr/realtime-2.6.32-122-rtai/modules/rtai_hal.ko
checking for rtai_ksched... /usr/realtime-2.6.32-122-rtai/modules/rtai_ksched.ko
checking for rtai_fifos... /usr/realtime-2.6.32-122-rtai/modules/rtai_fifos.ko
checking for rtai_shm... not found
checking for rtai_sem... /usr/realtime-2.6.32-122-rtai/modules/rtai_sem.ko
checking for rtai_math... /usr/realtime-2.6.32-122-rtai/modules/rtai_math.ko
checking for rtai... not found
checking for rt_mem_mgr... not found
checking for rtai_sched... /usr/realtime-2.6.32-122-rtai/modules/rtai_sched.ko
checking for rtai_libm... not found
checking for rtl... not found
checking for mbuff... not found
checking for rtl_time... not found
checking for rtl_sched... not found
checking for rtl_posixio... not found
checking for rtl_fifo... not found
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for semtimedop... yes
checking for sincos... yes
checking for __sincos... no
checking for tcl... /usr/lib/tcl8.5/tclConfig.sh found
checking for tk... /usr/lib/tk8.5/tkConfig.sh found
checking for BWidget using /usr/bin/tclsh8.5... found
checking for BLT using tclsh8.5... found
checking for X... libraries , headers
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking X11/extensions/Xinerama.h usability... yes
checking X11/extensions/Xinerama.h presence... yes
checking for X11/extensions/Xinerama.h... yes
checking for XineramaQueryExtension in -lXinerama... yes
checking for X11/Xaw/XawInit.h... yes
checking for XawDialogGetValueString in -lXaw... yes
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking readline/history.h usability... yes
checking readline/history.h presence... yes
checking for readline/history.h... yes
Trying readline without -ltermcap
checking for readline in -lreadline... yes
Trying readline with -ltermcap
checking for readline in -lreadline... yes
Readline does not require -ltermcap
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
checking for initscr in -lncurses... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for setlocale... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for gettext in -lintl... no
checking for xgettext... /usr/bin/xgettext
checking for xgettext tcl bug... xgettext version 0.17 OK
checking for msgfmt... /usr/bin/msgfmt
checking for --tcl support in msgfmt... yes
checking for Python support... yes
checking python version... OK
checking version of python libraries... python2.6
checking match between tk and Tkinter versions... 8.5
checking location of Python header files... /usr/include/python2.6
checking for Python headers... -I/usr/include/python2.6
checking for Python libraries... -lpthread -ldl -lutil
checking whether the Boost::Python headers are available... yes
checking for boost::python shared library... -lboost_python
checking /usr/include/python2.6/Python.h usability... yes
checking /usr/include/python2.6/Python.h presence... yes
checking for /usr/include/python2.6/Python.h... yes
checking for site-package location... /usr/lib/python2.6/dist-packages
checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking GL/glu.h usability... yes
checking GL/glu.h presence... yes
checking for GL/glu.h... yes
checking for glBegin in -lGL... yes
checking for working GLU quadrics... yes
checking for Xmu headers... checking X11/Xmu/Xmu.h usability... yes
checking X11/Xmu/Xmu.h presence... yes
checking for X11/Xmu/Xmu.h... yes
configure: creating ./config.status
######################################################################
# EMC2 - Enhanced Machine Controller #
######################################################################
# #
# EMC2 is a software system for computer control of machine tools, #
# such as milling machines. EMC2 is released under the GPL. #
# Check out www.linuxcnc.org/ for more details. #
# #
# #
# It seems that ./configure completed successfully. #
# This means that RT is properly installed #
# If things don't work check config.log for errors & warnings #
# #
# Next compile by typing #
# make #
# sudo make setuid #
# #
# Before running the software, set the emc environment: #
# . (top dir)/scripts/emc-environment #
# #
# To run the software type #
# emc #
# #
######################################################################
config.status: creating Makefile.inc
Depending emc/usr_intf/axis/extensions/emcmodule.cc
config.status: creating ../docs/man/man1/emc.1
Depending emc.1
make: uscita dalla directory «/home/cnc/emc2-dev/src»
make: ingresso nella directory «/home/cnc/emc2-dev/src»
copying shared configs
make[1]: ingresso nella directory «/home/cnc/emc2-dev/src»
make[1]: Non c'è da fare nulla per «copy_configs»
make[1]: uscita dalla directory «/home/cnc/emc2-dev/src»
Compiling hal/classicladder/arithm_eval.c
Compiling hal/classicladder/arrays.c
Compiling hal/classicladder/calc.c
Compiling hal/classicladder/calc_sequential.c
Compiling hal/classicladder/classicladder.c
Compiling hal/classicladder/classicladder_gtk.c
Compiling hal/classicladder/config.c
Compiling hal/classicladder/config_gtk.c
Compiling hal/classicladder/drawing.c
Compiling hal/classicladder/drawing_sequential.c
Compiling hal/classicladder/edit.c
Compiling hal/classicladder/edit_gtk.c
Compiling hal/classicladder/edit_sequential.c
Compiling hal/classicladder/editproperties_gtk.c
Compiling hal/classicladder/emc_mods.c
Compiling hal/classicladder/files.c
Compiling hal/classicladder/files_project.c
Compiling hal/classicladder/files_sequential.c
Compiling hal/classicladder/manager.c
Compiling hal/classicladder/manager_gtk.c
Compiling hal/classicladder/protocol_modbus_master.c
Compiling hal/classicladder/protocol_modbus_slave.c
Compiling hal/classicladder/serial_linux.c
Compiling hal/classicladder/socket_modbus_master.c
Compiling hal/classicladder/socket_server.c
Compiling hal/classicladder/spy_vars_gtk.c
Compiling hal/classicladder/symbols.c
Compiling hal/classicladder/symbols_gtk.c
Compiling hal/classicladder/vars_names.c
Compiling hal/classicladder/vars_access.c
Compiling hal/utils/miscgtk.c
Compiling hal/classicladder/print_gnome.c
Linking classicladder
Compiling hal/utils/meter.c
Linking halmeter
Compiling hal/utils/scope.c
Compiling hal/utils/scope_horiz.c
Compiling hal/utils/scope_vert.c
Compiling hal/utils/scope_trig.c
Compiling hal/utils/scope_disp.c
Compiling hal/utils/scope_files.c
Linking halscope
make: *** Nessuna regola per creare l'obiettivo «hal/user_comps/vismach/hbmgui.py», necessario a «../bin/hbmgui». Arresto.
make: uscita dalla directory «/home/cnc/emc2-dev/src»
cnc@emco:~/emc2-dev/src$ sudo make setuid
[sudo] password for cnc:
make: ingresso nella directory «/home/cnc/emc2-dev/src»
chown root ../bin/emc_module_helper
chmod 4750 ../bin/emc_module_helper
chown root ../bin/pci_write
chmod 4750 ../bin/pci_write
chown root ../bin/pci_read
chmod 4750 ../bin/pci_read
make: uscita dalla directory «/home/cnc/emc2-dev/src»
It seems that there is some problems with hbmgui and the compiling is stopped! but this doesn't matter the file armkins.c. Maybe I should unistall and reinstall emc2? I don't understand why there are these problems....
Please Log in or Create an account to join the conversation.