Mhel | 3 Aug 2008 05:17
Picon

simulator enabled compilation

Hello lists,
I'm a hobbyist & sort of a noobie to Linux, but learning something new everyday.
I'm trying to compile the latest release of emc2 with gcc 4.3.1 on an ARCHLinux distro.
I intend to compile emc2 on xenomai patched kernel that I already compiled, but before getting into more troubles, I want to try the simulator first, but I'm getting errors. What am I missing?

Compiling rtapi/sim_rtapi_app.cc
rtapi/sim_rtapi_app.cc: In function 'int do_one_item(char, const std::string&, const std::string&, void*, int)':
rtapi/sim_rtapi_app.cc:75: error: 'strtol' was not declared in this scope
rtapi/sim_rtapi_app.cc:86: error: 'strtol' was not declared in this scope
rtapi/sim_rtapi_app.cc: In function 'void remove_quotes(std::string&)':
rtapi/sim_rtapi_app.cc:110: error: 'remove_copy' was not declared in this scope
rtapi/sim_rtapi_app.cc: In function 'int main(int, char**)':
rtapi/sim_rtapi_app.cc:340: error: 'exit' was not declared in this scope
rtapi/sim_rtapi_app.cc:349: error: 'exit' was not declared in this scope
rtapi/sim_rtapi_app.cc:360: error: 'srand48' was not declared in this scope
rtapi/sim_rtapi_app.cc:361: error: 'lrand48' was not declared in this scope
rtapi/sim_rtapi_app.cc:370: error: 'exit' was not declared in this scope
rtapi/sim_rtapi_app.cc:373: error: 'exit' was not declared in this scope
make: *** [objects/rtapi/sim_rtapi_app.o] Error 1


Below is the result when I run ./configure --enable-simulator, I trimmed the actual result, to make it a little concise. I only included the parts that I think is more relevant since the other results have "yes" on them.
---
sim
checking for module installation directory... checking for realtime module directory... /usr/local/lib/emc2/modules
checking for GTK 2.4.0 or above... yes - 2.12.11
checking for libgnomeprintui-2.2... no -- printing from classicladder will not be possible
checking for mandb... no
checking for python... /usr/bin/python
....
checking for ANSI C header files... no
....
checking for __sincos... no
checking for tcl... /usr/lib/tclConfig.sh found
checking for tk... /usr/lib/tkConfig.sh found
checking for BWidget using /usr/bin/tclsh8.5... found
checking for X... libraries , headers in standard search path
....
Trying readline with -ltermcap
checking for readline in -lreadline... no
Readline does not require -ltermcap
....
checking for --tcl support in msgfmt... yes
checking for Python support... yes
checking python version... OK


tia.
--
Mhel
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Emc-developers mailing list
Emc-developers@...
https://lists.sourceforge.net/lists/listinfo/emc-developers
John Kasunich | 3 Aug 2008 05:23

Re: simulator enabled compilation

Mhel wrote:
> Hello lists,
> I'm a hobbyist & sort of a noobie to Linux, but learning something new
> everyday.
> I'm trying to compile the latest release of emc2 with gcc 4.3.1 on an
> ARCHLinux distro.
> I intend to compile emc2 on xenomai patched kernel that I already compiled,
> but before getting into more troubles, I want to try the simulator first,
> but I'm getting errors. What am I missing?

Some time after you left IRC, Jeff Epler showed up (he know the most
about the file that failed).  He made a change and committed it to CVS.

You can find the log entry here:
http://cvs.linuxcnc.org/cgi-bin/cvsweb.cgi/emc2/src/rtapi/sim_rtapi_app.cc.diff?r1=1.12;r2=1.13

The relevant change is:

--- emc2/src/rtapi/sim_rtapi_app.cc	2008/08/03 01:29:44	1.12
+++ emc2/src/rtapi/sim_rtapi_app.cc	2008/08/03 01:36:38	1.13
 <at>  <at>  -28,6 +28,7  <at>  <at> 
 #include <vector>
 #include <string>
 #include <map>
+#include <algorithm>
 #include <sys/time.h>
 #include <time.h>

I suggest that you get a CVS checkout so you can have the latest code.
EMC is untested on Arch and I'm not sure if it has been compiled with
gcc 4.3.1 before, so this probably won't be the only fix that is needed.
 If you use a CVS checkout you'll be able to get the latest as various
fixes are made.

(Please report any other problems and fixes you run into, so we can add
them.)

Instructions for getting a CVS checkout are at
http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?CVS

Regards,

John Kasunich

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Jeff Epler | 3 Aug 2008 15:35
Favicon

Re: simulator enabled compilation

The change jmkasuninch mentions may fix the error concerning
remove_copy.  I also just added an inclusion of <stdlib.h> for the other
symbols listed in your error message.  For any others, refer to the
respective manpage and add the header listed.  Send me a diff or tell me
what headers you added and I will see that the cvs version gets the same
fix.

Jeff

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Sebastian Kuzminsky | 4 Aug 2008 08:54
Gravatar

changes to the hostmot2 driver in CVS TRUNK

This message affects users of the hostmot2 driver only, all others can hit Delete now.

I just committed a large change to the hostmot2 driver in CVS TRUNK that changes how firmware loading is
done.  Instead of loading the firmware using bfload before loading the device driver, the driver now
handles firmware loading itself: it fetches the specified firmware from userspace using udev and
programs the FPGA.  The "config" modparam was extended to let the user specify which firmware they want.

Users who install emc2 using the Debian package will find the firmware files in /lib/firmware/hm2/≤BoardType>/.

Users who use Run-In-Place must symlink the hostmot2 firmware directory of their sandbox(es) into
/lib/firmware before this will work:

	sudo ln -s $HOME/emc2-sandbox/src/hal/drivers/mesa-hostmot2/firmware /lib/firmware/hm2

Replace "emc2-sandbox" in the link target with the actual name of the directory containing your CVS
checkout.  If you want to have access to the firmwares from multiple sandboxes, replace "hm2" in the link
name with the sandbox names.

To tell the driver which firmware file to load on a specific board, add something like
"firmware=hm2/5i20/SVST8_4.BIT" to the board's config string.

This is all described in the "config modparam" section of the hostmot2(9) manpage, here: <http://www.linuxcnc.org/docs/devel/html/man/man9/hostmot2.9.html#config%20modparam>

Sorry for the disruption, i think it's for the best in the long run.

--

-- 
Sebastian Kuzminsky
You think you can defeat me with your rebellious beard?
<http://www.youtube.com/watch?v=k_QAPjtO2cA>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Chris Morley | 4 Aug 2008 12:32
Picon
Favicon

driver for opto22 pci ac5 card

Greetings

I have been working on a HAL driver for the opto22 pci ac5 adapter board. This board has 2 ports with 24 points of i/o per port.
It is usually used to connect to opto 's relay racks such as their standard or G4 racks. It should be  compatible with anything you can plug into the Mesa boards though of course you would have to use HAL software encoder counters, pwm etc to drive them- it has no logic on board.

One can configure any of the 48 i/o points for input or output.
there are 4 on board LEDs that can be controlled with hal pins.
The driver supports 4 boards.
Its written in C. I based it on  drivers already written such as the  m5120 driver.

So the question is- what to do with it?
 I could post it in the wiki as a user contributed driver with instuctions on how to add it to be compiled or
I could just add it to the HAL driver folder and add it to the make file.

I could post it somewhere if any one wants to see it first. Any comment suggestiona are welcome this is the first pci driver I have written.

Cheers Chris Morley


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Emc-developers mailing list
Emc-developers@...
https://lists.sourceforge.net/lists/listinfo/emc-developers
John Kasunich | 4 Aug 2008 15:04

Re: driver for opto22 pci ac5 card

Chris Morley wrote:
> Greetings
> 
> I have been working on a HAL driver for the opto22 pci ac5 adapter board. This board has 2 ports with 24 points
of i/o per port.
> It is usually used to connect to opto 's relay racks such as their standard or G4 racks. It should be 
compatible with anything you can plug into the Mesa boards though of course you would have to use HAL
software encoder counters, pwm etc to drive them- it has no logic on board.
> 
> One can configure any of the 48 i/o points for input or output.
> there are 4 on board LEDs that can be controlled with hal pins.
> The driver supports 4 boards.
> Its written in C. I based it on  drivers already written such as the  m5120 driver.
> 

Cool.

Just looked up the AC5 - it amazes me that Opto22 can stay in business 
with their pricing.  They want $475 for 48 points of dumb I/O, while 
Mesa gets $200 for 72 points plus counters, etc.  I guess at those 
prices you don't have to sell a lot of boards.

> So the question is- what to do with it?
>  I could post it in the wiki as a user contributed driver with instuctions on how to add it to be compiled or
> I could just add it to the HAL driver folder and add it to the make file.
> 
> I could post it somewhere if any one wants to see it first. Any comment suggestiona are welcome this is the
first pci driver I have written.
> 
> Cheers Chris Morley 
>

In my opinion you should go ahead and add it to CVS under 
src/hal/drivers.  You already have commit access (thanks for all your 
work on Classicladder BTW).  Interested folks can review it and offer 
comments or fixes as they would with any other code.

Regards,

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Chris Morley | 4 Aug 2008 21:59
Picon
Favicon

Re: driver for opto22 pci ac5 card



>
> Cool.
>
> Just looked up the AC5 - it amazes me that Opto22 can stay in business
> with their pricing. They want $475 for 48 points of dumb I/O, while
> Mesa gets $200 for 72 points plus counters, etc. I guess at those

Yes thanks goodness for Ebay or our hobby would be a lot more expensive


> In my opinion you should go ahead and add it to CVS under
> src/hal/drivers. You already have commit access (thanks for all your
> work on Classicladder BTW). Interested folks can review it and offer
> comments or fixes as they would with any other code.
>
> Regards,
>
Ok that is what I will do then Thanks.

Chris

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Emc-developers mailing list
Emc-developers@...
https://lists.sourceforge.net/lists/listinfo/emc-developers
Mhel | 6 Aug 2008 18:10
Picon

realtime enabled compilation

Hi John , Jeff, AlexJoni, list,

I just started recieving digests, and I missed the replies http://sourceforge.net/mailarchive/forum.php?thread_name=4895249D.2040804%40fastmail.fm&forum_name=emc-developers
http://sourceforge.net/mailarchive/forum.php?thread_name=20080803133506.GE20679%40unpythonic.net&forum_name=emc-developers
I managed to compile the sim without any other errors.
I had a beginners luck with kernel compilation, the second attempt proved to be a challenge as it turns out it's always a safe bet to use the existing configuration from the running kernel, but I got it and learnt a lot in the process.
I am now attempting to compile for realtime using the following configure.
./configure --enable-run-in-place --with-realtime=/usr/xenomai --with-kernel-headers=/home/mhel/linux-2.6.25 --with-module-dir=/lib/modules/2.6.25-XENO
(btw, --with-kernel-headers didn't accept relative address e.g. ../../linux-2.6.25)

this is added to the .configure:
*/xeno-config)
# For XENOMAI $RTS = xeno-config
#     Option        Returns
#       --version    my version 2.4.4
#       --cc        gcc
#       --arch        x86
#       --prefix    /usr/xenomai
#       --xeno-cflags    -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -D__XENO__
#       --xeno-ldflags    -L/usr/xenomai/lib -lpthread
#       --posix-cflags    -I/usr/xenomai/include -I/usr/xenomai/include/posix -D_GNU_SOURCE -D_REENTRANT -D__XENO__
#       --posix-ldflags    -Wl, <at> /usr/xenomai/lib/posix.wrappers -L/usr/xenomai/lib -lpthread_rt -lpthread -lrt
#       --lib*-dir,--libdir,--user-libdir   /usr/xenomai/lib

    RTNAME=xenomai
    RTPREFIX=xeno
#    RTAI=3
    RTDIR=`$RTS --prefix`
    RTDIR=$(cd $RTDIR ; pwd -P )
    RTFLAGS=`$RTS --xeno-cflags`
#    RTFLAGS="$RTFLAGS -DRTAI=3"
    KERNELDIR=`$RTS --linux-dir`
    RTARCH=`$RTS --arch`

after I ran configure I was prompted to issue a make, I did and it compiles without error.
ran emc and the configuration selector shows up, and ofcourse it didn't run as I hope it would when I made a selection. I rerun configure and notice this part:
...
libm OK to use.
checking for adeos... not found
checking for rtai_hal... not found
checking for rtai_ksched... not found
checking for rtai_fifos... not found
checking for rtai_shm... not found
checking for rtai_sem... not found
checking for rtai_math... not found
checking for rtai... not found
checking for rt_mem_mgr... not found
checking for rtai_sched... not found
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
...

If it's looking for headers, some of it is located in xenomai/include dir.
and if it is, I guess I'd have to point it there. Now, I wonder how.

--
Mhel
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Emc-developers mailing list
Emc-developers@...
https://lists.sourceforge.net/lists/listinfo/emc-developers
paul_c | 6 Aug 2008 18:23
Picon

Re: simulator enabled compilation

On Sunday 03 August 2008, Mhel wrote:
> I intend to compile emc2 on xenomai patched kernel that I already compiled,
> but before getting into more troubles,

Xenomai is NOT supported. Please use the RTAI-3.6.1 patches.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Mhel | 7 Aug 2008 04:39
Picon

Re: simulator enabled compilation

I just successfuly compiled kernel2.6.24 with rtai-3.61 and emc2 pre2.3, I kept the 2.6.25 xenomai patch for tinkering later. I am now going to try to make me a live cd.

thanks.

On Wed, Aug 6, 2008 at 9:23 AM, paul_c <paul_c-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org> wrote:
On Sunday 03 August 2008, Mhel wrote:
> I intend to compile emc2 on xenomai patched kernel that I already compiled,
> but before getting into more troubles,

Xenomai is NOT supported. Please use the RTAI-3.6.1 patches.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Emc-developers mailing list
Emc-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/emc-developers



--
Mhel
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Emc-developers mailing list
Emc-developers@...
https://lists.sourceforge.net/lists/listinfo/emc-developers

Gmane