Re: [Emc-users] Problems Compiling/Running - Update
Jeff Epler wrote: > On Mon, Oct 29, 2007 at 07:18:08AM -0500, Jeff Epler wrote: >> EMC 2.1.x is unlikely to work on Ubuntu 7.10. However, the development >> version has been improved in various ways for compatability with newer >> versions of Ubuntu. >> >> On Ubuntu 7.10 the default amount of "locked memory" for regular users >> is too low. You can fix that problem by adding the line >> hard memlock 20480 >> to /etc/security/limits.conf as root. (it's necessary to log out >> completely after making this change) > > I have a correction to make to the above. Better late than never, they > say. > > After IRC user Twingy was also trying to get emc2 running on Ubuntu > Gutsy, we found that the correct line for /etc/security/limits.conf is > * hard memlock 20480 > (note the leading "*") > > After this, Twingy reports that emc2 runs for him as user on 7.10 with > self-built kernel and emc2. > > Jeff YES!! That did the trick! Thanks Jeff. I will update my step by step instructions to include this. :) Andy -- Andy PGP Key ID: 0xDC1B5864 - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Problems Compiling/Running - Update
On Mon, Oct 29, 2007 at 07:18:08AM -0500, Jeff Epler wrote: > EMC 2.1.x is unlikely to work on Ubuntu 7.10. However, the development > version has been improved in various ways for compatability with newer > versions of Ubuntu. > > On Ubuntu 7.10 the default amount of "locked memory" for regular users > is too low. You can fix that problem by adding the line > hard memlock 20480 > to /etc/security/limits.conf as root. (it's necessary to log out > completely after making this change) I have a correction to make to the above. Better late than never, they say. After IRC user Twingy was also trying to get emc2 running on Ubuntu Gutsy, we found that the correct line for /etc/security/limits.conf is * hard memlock 20480 (note the leading "*") After this, Twingy reports that emc2 runs for him as user on 7.10 with self-built kernel and emc2. Jeff - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Problems Compiling/Running - Update
I have now been able to control the X axis motor from EMC2/Axis by running it as root. So the system (Kernel with RTAI and EMC2) appears functional. Does that indicate that my problem is purely a permissions problem somewhere? I did notice that I have to be logged in as root to run the RTAI kernel latency test. If I am not then the RTAI test suite deletes /dev/rtf3 and then complains that it is missing. Andy Original Message Subject: Re: [Emc-users] Problems Compiling/Running - Update Date: Fri, 02 Nov 2007 12:45:13 -0700 From: Andrew Ayre <[EMAIL PROTECTED]> To: Enhanced Machine Controller (EMC) OK, thanks. It still segfaults. Here is the output: --- [EMAIL PROTECTED]:~/Desktop/emc2/emc2cvshead$ ./scripts/realtime start [EMAIL PROTECTED]:~/Desktop/emc2/emc2cvshead$ . ./scripts/emc-environment [EMAIL PROTECTED]:~/Desktop/emc2/emc2cvshead$ halcmd help Segmentation fault [EMAIL PROTECTED]:~/Desktop/emc2/emc2cvshead$ --- Andy Alex Joni wrote: > for run-in-place you need "scripts/realtime start" > > Regards, > Alex > > - Original Message - > From: "Andrew Ayre" <[EMAIL PROTECTED]> > To: "Enhanced Machine Controller (EMC)" > Sent: Friday, November 02, 2007 9:11 PM > Subject: Re: [Emc-users] Problems Compiling/Running - Update > > >> Here is what I get: >> >> >> [EMAIL PROTECTED]:~/Desktop/emc2/emc2cvshead$ halcmd help >> RTAPI: ERROR: could not open shared memory (errno=19) >> HAL: ERROR: rtapi init failed >> halcmd: hal_init() failed: -9 >> NOTE: 'rtapi' kernel module must be loaded >> >> >> I'm guessing I need to create the /dev devices and run >> /etc/init.d/realtime start, right? >> >> Andy >> >> John Kasunich wrote: >>> Andrew Ayre wrote: >>>> Thanks for the suggestion. I gave it a try: >>>> >>>> ./configure >>>> make >>>> sudo make install >>>> >>>> I then ran the script to create the devices. Unfortunately "halcmd help" >>>> still segfaults for a non-root user. Any ideas? >>>> >>> Try the run-in-place method: >>> >>> (from the top of your checkout) >>> cd src >>> ./configure --enable-run-in-place >>> make >>> sudo make setuid >>> cd .. >>> scripts/emc-environment >>> halcmd help >>> >>> If that works, but the installed version doesn't, it points to a problem >>> with make install, and more importantly it rules out a whole class of >>> possible problems. >>> >>> Regards, >>> >>> John Kasunich >>> >>> - >>> This SF.net email is sponsored by: Splunk Inc. >>> Still grepping through log files to find problems? Stop. >>> Now Search log events and configuration files using AJAX and a browser. >>> Download your FREE copy of Splunk now >> http://get.splunk.com/ >>> ___ >>> Emc-users mailing list >>> Emc-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/emc-users >>> >>> >>> >> -- >> Andy >> PGP Key ID: 0x67090A54 >> >> - >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> ___ >> Emc-users mailing list >> Emc-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/emc-users >> >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.5.503 / Virus Database: 269.15.18/1104 - Release Date: >> 11/1/2007 6:47 PM >> >> > > > - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > ___ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users > > > -- Andy PGP Key ID: 0x67090A54 -- Andy PGP Key ID: 0x67090A54 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Problems Compiling/Running - Update
OK, thanks. It still segfaults. Here is the output: --- [EMAIL PROTECTED]:~/Desktop/emc2/emc2cvshead$ ./scripts/realtime start [EMAIL PROTECTED]:~/Desktop/emc2/emc2cvshead$ . ./scripts/emc-environment [EMAIL PROTECTED]:~/Desktop/emc2/emc2cvshead$ halcmd help Segmentation fault [EMAIL PROTECTED]:~/Desktop/emc2/emc2cvshead$ --- Andy Alex Joni wrote: > for run-in-place you need "scripts/realtime start" > > Regards, > Alex > > - Original Message - > From: "Andrew Ayre" <[EMAIL PROTECTED]> > To: "Enhanced Machine Controller (EMC)" > Sent: Friday, November 02, 2007 9:11 PM > Subject: Re: [Emc-users] Problems Compiling/Running - Update > > >> Here is what I get: >> >> >> [EMAIL PROTECTED]:~/Desktop/emc2/emc2cvshead$ halcmd help >> RTAPI: ERROR: could not open shared memory (errno=19) >> HAL: ERROR: rtapi init failed >> halcmd: hal_init() failed: -9 >> NOTE: 'rtapi' kernel module must be loaded >> >> >> I'm guessing I need to create the /dev devices and run >> /etc/init.d/realtime start, right? >> >> Andy >> >> John Kasunich wrote: >>> Andrew Ayre wrote: >>>> Thanks for the suggestion. I gave it a try: >>>> >>>> ./configure >>>> make >>>> sudo make install >>>> >>>> I then ran the script to create the devices. Unfortunately "halcmd help" >>>> still segfaults for a non-root user. Any ideas? >>>> >>> Try the run-in-place method: >>> >>> (from the top of your checkout) >>> cd src >>> ./configure --enable-run-in-place >>> make >>> sudo make setuid >>> cd .. >>> scripts/emc-environment >>> halcmd help >>> >>> If that works, but the installed version doesn't, it points to a problem >>> with make install, and more importantly it rules out a whole class of >>> possible problems. >>> >>> Regards, >>> >>> John Kasunich >>> >>> - >>> This SF.net email is sponsored by: Splunk Inc. >>> Still grepping through log files to find problems? Stop. >>> Now Search log events and configuration files using AJAX and a browser. >>> Download your FREE copy of Splunk now >> http://get.splunk.com/ >>> ___ >>> Emc-users mailing list >>> Emc-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/emc-users >>> >>> >>> >> -- >> Andy >> PGP Key ID: 0x67090A54 >> >> - >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> ___ >> Emc-users mailing list >> Emc-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/emc-users >> >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.5.503 / Virus Database: 269.15.18/1104 - Release Date: >> 11/1/2007 6:47 PM >> >> > > > - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > ___ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users > > > -- Andy PGP Key ID: 0x67090A54 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Problems Compiling/Running - Update
for run-in-place you need "scripts/realtime start" Regards, Alex - Original Message - From: "Andrew Ayre" <[EMAIL PROTECTED]> To: "Enhanced Machine Controller (EMC)" Sent: Friday, November 02, 2007 9:11 PM Subject: Re: [Emc-users] Problems Compiling/Running - Update > Here is what I get: > > > [EMAIL PROTECTED]:~/Desktop/emc2/emc2cvshead$ halcmd help > RTAPI: ERROR: could not open shared memory (errno=19) > HAL: ERROR: rtapi init failed > halcmd: hal_init() failed: -9 > NOTE: 'rtapi' kernel module must be loaded > > > I'm guessing I need to create the /dev devices and run > /etc/init.d/realtime start, right? > > Andy > > John Kasunich wrote: >> Andrew Ayre wrote: >>> Thanks for the suggestion. I gave it a try: >>> >>> ./configure >>> make >>> sudo make install >>> >>> I then ran the script to create the devices. Unfortunately "halcmd help" >>> still segfaults for a non-root user. Any ideas? >>> >> >> Try the run-in-place method: >> >> (from the top of your checkout) >> cd src >> ./configure --enable-run-in-place >> make >> sudo make setuid >> cd .. >> scripts/emc-environment >> halcmd help >> >> If that works, but the installed version doesn't, it points to a problem >> with make install, and more importantly it rules out a whole class of >> possible problems. >> >> Regards, >> >> John Kasunich >> >> - >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> ___ >> Emc-users mailing list >> Emc-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/emc-users >> >> >> > > -- > Andy > PGP Key ID: 0x67090A54 > > - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > ___ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.503 / Virus Database: 269.15.18/1104 - Release Date: > 11/1/2007 6:47 PM > > - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Problems Compiling/Running - Update
Here is what I get: [EMAIL PROTECTED]:~/Desktop/emc2/emc2cvshead$ halcmd help RTAPI: ERROR: could not open shared memory (errno=19) HAL: ERROR: rtapi init failed halcmd: hal_init() failed: -9 NOTE: 'rtapi' kernel module must be loaded I'm guessing I need to create the /dev devices and run /etc/init.d/realtime start, right? Andy John Kasunich wrote: > Andrew Ayre wrote: >> Thanks for the suggestion. I gave it a try: >> >> ./configure >> make >> sudo make install >> >> I then ran the script to create the devices. Unfortunately "halcmd help" >> still segfaults for a non-root user. Any ideas? >> > > Try the run-in-place method: > > (from the top of your checkout) > cd src > ./configure --enable-run-in-place > make > sudo make setuid > cd .. > scripts/emc-environment > halcmd help > > If that works, but the installed version doesn't, it points to a problem > with make install, and more importantly it rules out a whole class of > possible problems. > > Regards, > > John Kasunich > > - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > ___ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users > > > -- Andy PGP Key ID: 0x67090A54 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Problems Compiling/Running - Update
Andrew Ayre wrote: > Thanks for the suggestion. I gave it a try: > > ./configure > make > sudo make install > > I then ran the script to create the devices. Unfortunately "halcmd help" > still segfaults for a non-root user. Any ideas? > Try the run-in-place method: (from the top of your checkout) cd src ./configure --enable-run-in-place make sudo make setuid cd .. scripts/emc-environment halcmd help If that works, but the installed version doesn't, it points to a problem with make install, and more importantly it rules out a whole class of possible problems. Regards, John Kasunich - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Problems Compiling/Running - Update
Thanks for the suggestion. I gave it a try: ./configure make sudo make install I then ran the script to create the devices. Unfortunately "halcmd help" still segfaults for a non-root user. Any ideas? Andy John Kasunich wrote: > Andrew Ayre wrote: >> Alex, >> >> Sorry, yes, I ran all the commands as root. Constantly typing in sudo >> annoys me so I enable the root account. Old skool perhaps... >> > > I think that running "make" as root results in all the binaries and > other generated files being owned by root. The intended method is to > run "make" as a normal user, then run "make install" as root. I'm not > sure of the specifics, but IMO all bets are off if you do the build any > other way. > > Regards, > > John Kasunich -- Andy PGP Key ID: 0x67090A54 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Problems Compiling/Running - Update
Andrew Ayre wrote: > Alex, > > Sorry, yes, I ran all the commands as root. Constantly typing in sudo > annoys me so I enable the root account. Old skool perhaps... > I think that running "make" as root results in all the binaries and other generated files being owned by root. The intended method is to run "make" as a normal user, then run "make install" as root. I'm not sure of the specifics, but IMO all bets are off if you do the build any other way. Regards, John Kasunich - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Problems Compiling/Running - Update
Alex, Sorry, yes, I ran all the commands as root. Constantly typing in sudo annoys me so I enable the root account. Old skool perhaps... Andy Alex Joni wrote: > On Thu, 2007-11-01 at 12:18 -0700, Andrew Ayre wrote: >> Another thought - does permissions need to be set on a file somewhere to >> allow the shared memory to work for all users? I did: >> >> ./configure >> make >> make install >> >> I didn't run make setuid. Is that still needed for a make install? >> >> Andy > > make setuid is not needed, > but there should be a sudo make install, unless you run the configure, > make, make install as root. > (regular users don't have write access to /etc/init.d and /usr..) > > > Regards, > Alex -- Andy PGP Key ID: 0x67090A54 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Problems Compiling/Running - Update
Jeff, Does the following script do the same thing? -- [EMAIL PROTECTED]:/home/andy# cat /usr/realtime/bin/script.sh #!/bin/bash mknod -m 666 /dev/rtai_shm c 10 254 for n in `seq 0 9` do f=/dev/rtf$n mknod -m 666 $f c 150 $n done [EMAIL PROTECTED]:/home/andy# ls -l /dev | grep shm crw-rw-rw- 1 root root 10, 254 2007-11-01 21:04 rtai_shm drwxrwxrwt 2 root root40 2007-11-01 21:03 shm -- Andy Jeff Epler wrote: > The following emc2.rules file, which is installed when you install a > .deb of emc2 (but not by 'make install), makes the rtai_shm device > accessible to all users: > ~/emc2-src/debian/extras-Ubuntu-6.06/etc/udev/rules.d$ cat emc2.rules > KERNEL=="RTAI_SHM" SYMLINK=="rtai_shm" MODE="0666" > > Jeff -- Andy PGP Key ID: 0x67090A54 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Problems Compiling/Running - Update
The following emc2.rules file, which is installed when you install a .deb of emc2 (but not by 'make install), makes the rtai_shm device accessible to all users: ~/emc2-src/debian/extras-Ubuntu-6.06/etc/udev/rules.d$ cat emc2.rules KERNEL=="RTAI_SHM" SYMLINK=="rtai_shm" MODE="0666" Jeff - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Problems Compiling/Running - Update
On Thu, 2007-11-01 at 12:18 -0700, Andrew Ayre wrote: > Another thought - does permissions need to be set on a file somewhere to > allow the shared memory to work for all users? I did: > > ./configure > make > make install > > I didn't run make setuid. Is that still needed for a make install? > > Andy make setuid is not needed, but there should be a sudo make install, unless you run the configure, make, make install as root. (regular users don't have write access to /etc/init.d and /usr..) Regards, Alex - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Problems Compiling/Running - Update
Another thought - does permissions need to be set on a file somewhere to allow the shared memory to work for all users? I did: ./configure make make install I didn't run make setuid. Is that still needed for a make install? Andy Original Message A little bit more info: When this function is called: retval = rtapi_shmem_getptr(mem_id, &mem); mem_id = 1. Upon return, mem = 0x0 and retval = 0. So it seems the shared memory system doesn't work properly as mem should never be set to zero. This is pretty much the limit of my debugging abilities. Andy Andrew Ayre wrote: > Thanks. It seg faults at line 2350 in hal_lib.c: > > static int init_hal_data(void) > { > /* has the block already been initialized? */ > if (hal_data->version != 0) { > > It appears that hal_data is NULL at this point. Here is the call stack: > > hal/utils/halcmd_main.c:195 (main) > hal/utils/halcmd.c:109 (halcmd_startup) > hal/hal_lib.c:2350 (hal_init) > > Andy > > Jeff Epler wrote: >> A system call trace (produced by using "strace") or a backtrace at the >> time of the segmentation fault (produced using "gdb") would be helpful >> in pinpointing the location of the problem. >> >> You can find information how to use these utilities on many pages on the >> internet. >> >> Jeff >> >> - >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> ___ >> Emc-users mailing list >> Emc-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/emc-users >> >> >> > -- Andy PGP Key ID: 0x67090A54 -- Andy PGP Key ID: 0x67090A54 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Problems Compiling/Running - Update
A little bit more info: When this function is called: retval = rtapi_shmem_getptr(mem_id, &mem); mem_id = 1. Upon return, mem = 0x0 and retval = 0. So it seems the shared memory system doesn't work properly as mem should never be set to zero. This is pretty much the limit of my debugging abilities. Andy Andrew Ayre wrote: > Thanks. It seg faults at line 2350 in hal_lib.c: > > static int init_hal_data(void) > { > /* has the block already been initialized? */ > if (hal_data->version != 0) { > > It appears that hal_data is NULL at this point. Here is the call stack: > > hal/utils/halcmd_main.c:195 (main) > hal/utils/halcmd.c:109 (halcmd_startup) > hal/hal_lib.c:2350 (hal_init) > > Andy > > Jeff Epler wrote: >> A system call trace (produced by using "strace") or a backtrace at the >> time of the segmentation fault (produced using "gdb") would be helpful >> in pinpointing the location of the problem. >> >> You can find information how to use these utilities on many pages on the >> internet. >> >> Jeff >> >> - >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> ___ >> Emc-users mailing list >> Emc-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/emc-users >> >> >> > -- Andy PGP Key ID: 0x67090A54 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Problems Compiling/Running - Update
Thanks. It seg faults at line 2350 in hal_lib.c: static int init_hal_data(void) { /* has the block already been initialized? */ if (hal_data->version != 0) { It appears that hal_data is NULL at this point. Here is the call stack: hal/utils/halcmd_main.c:195 (main) hal/utils/halcmd.c:109 (halcmd_startup) hal/hal_lib.c:2350 (hal_init) Andy Jeff Epler wrote: > A system call trace (produced by using "strace") or a backtrace at the > time of the segmentation fault (produced using "gdb") would be helpful > in pinpointing the location of the problem. > > You can find information how to use these utilities on many pages on the > internet. > > Jeff > > - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > ___ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users > > > -- Andy PGP Key ID: 0x67090A54 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Problems Compiling/Running - Update
A system call trace (produced by using "strace") or a backtrace at the time of the segmentation fault (produced using "gdb") would be helpful in pinpointing the location of the problem. You can find information how to use these utilities on many pages on the internet. Jeff - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Problems Compiling/Running - Update
I have narrowed the problem down to this: [EMAIL PROTECTED]:~$ /usr/local/bin/halcmd help Segmentation fault [EMAIL PROTECTED]:~$ su Password: [EMAIL PROTECTED]:/home/andy# /usr/local/bin/halcmd help Use 'help ' for more details about each command Available commands: loadrt Load realtime module(s) then the rest of the help output follows. As you can see, it works for root but not for a regular user. I'm guessing there is a setup step missing. Any ideas on how to solve this? Thanks! Andy Jeff Epler wrote: > EMC 2.1.x is unlikely to work on Ubuntu 7.10. However, the development > version has been improved in various ways for compatability with newer > versions of Ubuntu. > > On Ubuntu 7.10 the default amount of "locked memory" for regular users > is too low. You can fix that problem by adding the line > hard memlock 20480 > to /etc/security/limits.conf as root. (it's necessary to log out > completely after making this change) > > However, the result of this problem is not an "insmod error", but > another error about creating shared memory areas which I don't recall. > In the case of insmod errors, the last few lines shown by "dmesg" are > usually most useful in determining what is going on. > > Jeff -- Andy PGP Key ID: 0x67090A54 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Problems Compiling/Running - Update
Jeff, Thanks - I will give that a try. I think a shared memory error was in the mix. I also need to manually create the application menu entries. /usr/local/bin/emc is obvious. Are there any other executables that users should be able to run from the menu? Once I have this set up I will publish a blog entry with every single step to get EMC2 working so others can benefit from my efforts. thanks, Andy Jeff Epler wrote: > EMC 2.1.x is unlikely to work on Ubuntu 7.10. However, the development > version has been improved in various ways for compatability with newer > versions of Ubuntu. > > On Ubuntu 7.10 the default amount of "locked memory" for regular users > is too low. You can fix that problem by adding the line > hard memlock 20480 > to /etc/security/limits.conf as root. (it's necessary to log out > completely after making this change) > > However, the result of this problem is not an "insmod error", but > another error about creating shared memory areas which I don't recall. > In the case of insmod errors, the last few lines shown by "dmesg" are > usually most useful in determining what is going on. > > Jeff > > - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > ___ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users > > > -- Andy PGP Key ID: 0x67090A54 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Problems Compiling/Running - Update
EMC 2.1.x is unlikely to work on Ubuntu 7.10. However, the development version has been improved in various ways for compatability with newer versions of Ubuntu. On Ubuntu 7.10 the default amount of "locked memory" for regular users is too low. You can fix that problem by adding the line hard memlock 20480 to /etc/security/limits.conf as root. (it's necessary to log out completely after making this change) However, the result of this problem is not an "insmod error", but another error about creating shared memory areas which I don't recall. In the case of insmod errors, the last few lines shown by "dmesg" are usually most useful in determining what is going on. Jeff - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
[Emc-users] Problems Compiling/Running - Update
Update - I can get EMC2 CVS HEAD to start up with no errors if I start it as root. Otherwise it fails at the insmod stage. I guess regular users don't have permission to do this. So how do I solve this problem? thanks for the help! Andy Original Message Subject: Problems Compiling/Running Date: Sun, 28 Oct 2007 19:22:20 -0700 From: Andrew Ayre <[EMAIL PROTECTED]> To: EMC List Hi! For various reasons I have chosen to build my own kernel and compile EMC2. I'm nearly there but stumbling at the last stage. I have patched a vanilla 2.6.22 kernel with RTAI. My PC boot and runs normally and I can execute all the RTAI scripts in the testsuite. I am using Ubuntu 7.10. I compiled the CVS HEAD revision of EMC2 and installed it. When I run it, after picking a configuration (Axis Sim) it segfaults. Next I tried version 2.1.7 of EMC2. This fails to compile with: /home/andy/Desktop/emc2/emc2/src/rtapi/rtai_rtapi.c:128: error: size of array ‘type name’ is negative make[2]: *** [/home/andy/Desktop/emc2/emc2/src/rtapi/rtai_rtapi.o] Error 1 make[1]: *** [_module_/home/andy/Desktop/emc2/emc2/src] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-2.6.22-realtime' make: *** [modules] Error 2 Here is the relevant section of code: static int msg_level = RTAPI_MSG_INFO; /* message printing level */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) MODULE_PARM(msg_level, "i"); #else #include module_param(msg_level, int, S_IRUGO | S_IWUGO); <= **line 128** #endif MODULE_PARM_DESC(msg_level, "debug message level (default=3)"); Any suggestions on what I should do next? Was a bug fixed in 2.1.7 that fixed the compile problem? What information can I provide on the segfault to troubleshoot it? It seems there is a problem with the linux headers. Here is how I configured emc2: ./configure --with-realtime=/usr/realtime --with-kernel-headers=/usr/src/linux-headers-2.6.22-realtime I am using make and make install rather than the run in place option. thanks! Andy -- Andy PGP Key ID: 0x67090A54 -- Andy PGP Key ID: 0x67090A54 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users