[Bug 605] New: Initial RTT port for Windows/cygwin

For more infomation about this bug, visit
Summary: Initial RTT port for Windows/cygwin
Product: RTT
Version: 1.6.0
Platform: All
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P3
Component: Operating System Abstraction - Portability
AssignedTo: orocos-dev [..] ...
ReportedBy: peter [dot] soetens [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

Created an attachment (id=358)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=358)
Adds cygwin support to gnulinux target.

Due to popular demand, I looked on what we get when we
compile RTT on Windows/cygwin. For clarity: this is not a Win32 API port, but
it allows you to compile and run Orocos components on Windows. I modified the
gnulinux OROCOS_TARGET such that it also compiles on cygwin.
This patch gets about all unit tests working.

Not (yet) supported:
- CORBA
- Real-Time priorities/scheduling
- Mingw32 compiler (this would be part of a new bug report

I'll add a Wiki page on www.orocos.org describing the process and requirements
for building on cygwin.

I didn't try OCL yet. But it is clearly the next logical step.

For CORBA, we'd need TAO or OMNIORB working on cygwin. I didn't look at this
either.

[Bug 605] Initial RTT port for Windows/cygwin

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=605>

--- Comment #12 from Peter Soetens <peter [dot] soetens [..] ...> 2009-02-06 17:06:56 ---
(In reply to comment #11)
If you use a recent boost version on Windows, also look
> at bug 605 for the attached patch and comment #10

That should have been bug 606 for Boost...

[Bug 605] Initial RTT port for Windows/cygwin

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=605>

Peter Soetens <peter [dot] soetens [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #380 is|0 |1
obsolete| |

--- Comment #11 from Peter Soetens <peter [dot] soetens [..] ...> 2009-02-06 17:05:42 ---
(From update of attachment 380)
I'm obsoleting the big patch of JJ in favour of the smaller paches.

Definately required for Windows is
Replace-uint-by-unsigned-int-in-ValueParser,
Implement-a-more-relyable-type-lookup-system-in-Type System and Windows win32
API port of Orocos-RTT. If you use a recent boost version on Windows, also look
at bug 605 for the attached patch and comment #10

[Bug 605] Initial RTT port for Windows/cygwin

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=605>

Peter Soetens <peter [dot] soetens [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #386|Snippet from JJ's mingw32 |Implement-a-more-relyable-
description|port |type-lookup-system-in-Type
| |System

[Bug 605] Initial RTT port for Windows/cygwin

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=605>

Peter Soetens <peter [dot] soetens [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #385|Snippet from JJ's mingw32 |Replace-uint-by-unsigned-
description|port |int-in-ValueParser

Patches uploaded (Was: [Bug 605] Initial RTT port for Windows/cy

On Thursday 05 February 2009 13:33:45 Peter Soetens wrote:
> For more infomation about this bug, visit
> <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=605>
>
> Peter Soetens <peter [dot] soetens [..] ...> changed:
>
> What |Removed |Added
> ---------------------------------------------------------------------------
>- Attachment #385|Snippet from JJ's mingw32 |Replace-uint-by-unsigned-
> description|port |int-in-ValueParser

Sorry for the noise. Bugzilla didn't show the patch name, so I had to rename
all descriptions.

I hacked the patch from JJ in 5 pieces which are largely independent. I'll
apply them in this way after RTT 1.8 has branched.

Peter

[Bug 605] Initial RTT port for Windows/cygwin

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=605>

Peter Soetens <peter [dot] soetens [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #384|Snippet from JJ's mingw32 |Port unit tests to Boost
description|port |test framework

[Bug 605] Initial RTT port for Windows/cygwin

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=605>

Peter Soetens <peter [dot] soetens [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #383|Snippet from JJ's mingw32 |Support default cmake
description|port |settinsg in orocos-rtt.cmake
| |file

[Bug 605] Initial RTT port for Windows/cygwin

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=605>

--- Comment #10 from Peter Soetens <peter [dot] soetens [..] ...> 2009-02-05 13:30:35 ---
Created an attachment (id=387)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=387)
Windows win32 API port of Orocos-RTT

[Bug 605] Initial RTT port for Windows/cygwin

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=605>

--- Comment #9 from Peter Soetens <peter [dot] soetens [..] ...> 2009-02-05 13:29:50 ---
Created an attachment (id=386)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=386)
Snippet from JJ's mingw32 port

[Bug 605] Initial RTT port for Windows/cygwin

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=605>

--- Comment #8 from Peter Soetens <peter [dot] soetens [..] ...> 2009-02-05 13:29:25 ---
Created an attachment (id=385)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=385)
Snippet from JJ's mingw32 port

[Bug 605] Initial RTT port for Windows/cygwin

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=605>

--- Comment #7 from Peter Soetens <peter [dot] soetens [..] ...> 2009-02-05 13:28:29 ---
Created an attachment (id=384)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=384)
Snippet from JJ's mingw32 port

[Bug 605] Initial RTT port for Windows/cygwin

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=605>

--- Comment #6 from Peter Soetens <peter [dot] soetens [..] ...> 2009-02-05 13:27:16 ---
Created an attachment (id=383)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=383)
Snippet from JJ's mingw32 port

[Bug 605] Initial RTT port for Windows/cygwin

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=605>

--- Comment #5 from Peter Soetens <peter [dot] soetens [..] ...> 2009-02-03 11:28:05 ---
(In reply to comment #4)
> Created an attachment (id=380)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=380)
> MinGW32 support for orocos-rtt
>
> * it is based solely on mingw32, no msys or cygwin.
> * it use native windows threads. No need for pthreads.
> * only ports RTT, and currently without support for Corba
> * it uses the fixes that Peter made regarding 'weak' symbol handling.
> * 4 out of 8 tests work. (ported CPPUnit to BOOST tests since CPPUnit requires
> the obnoxious automake )
> * Priorities are supported on thread level, though creating new processes could
> help get better "realtime" support.
> * CMake is used to generate the project: cmake -G"MinGW Makefiles" .

Why do you default to STATIC builds in your patch ? Is this optional or
required for
the win32 port ?

[Bug 605] Initial RTT port for Windows/cygwin

I used STATIC builds for reducing potential bugs while testing. It is optional for win32 and should not have been default ON... sorry

-----Original Message-----
From: orocos-dev-bounces [..] ... [mailto:orocos-dev-bounces [..] ...] On Behalf Of Peter Soetens
Sent: 3. februar 2009 11:28
To: orocos-dev [..] ...
Subject: [Orocos-Dev] [Bug 605] Initial RTT port for Windows/cygwin

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=605>

--- Comment #5 from Peter Soetens <peter [dot] soetens [..] ...> 2009-02-03 11:28:05 ---
(In reply to comment #4)
> Created an attachment (id=380)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=380)
> MinGW32 support for orocos-rtt
>
> * it is based solely on mingw32, no msys or cygwin.
> * it use native windows threads. No need for pthreads.
> * only ports RTT, and currently without support for Corba
> * it uses the fixes that Peter made regarding 'weak' symbol handling.
> * 4 out of 8 tests work. (ported CPPUnit to BOOST tests since CPPUnit requires
> the obnoxious automake )
> * Priorities are supported on thread level, though creating new processes could
> help get better "realtime" support.
> * CMake is used to generate the project: cmake -G"MinGW Makefiles" .

Why do you default to STATIC builds in your patch ? Is this optional or
required for
the win32 port ?

[Bug 605] Initial RTT port for Windows/cygwin

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=605>

--- Comment #4 from Jimmy Jorgensen <jimali [..] ...> 2009-02-02 12:08:57 ---
Created an attachment (id=380)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=380)
MinGW32 support for orocos-rtt

* it is based solely on mingw32, no msys or cygwin.
* it use native windows threads. No need for pthreads.
* only ports RTT, and currently without support for Corba
* it uses the fixes that Peter made regarding 'weak' symbol handling.
* 4 out of 8 tests work. (ported CPPUnit to BOOST tests since CPPUnit requires
the obnoxious automake )
* Priorities are supported on thread level, though creating new processes could
help get better "realtime" support.
* CMake is used to generate the project: cmake -G"MinGW Makefiles" .

[Bug 605] Initial RTT port for Windows/cygwin

On Feb 2, 2009, at 06:08 , Jimmy Jorgensen wrote:

> For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=605
> >
>
>
>
> --- Comment #4 from Jimmy Jorgensen <jimali [..] ...> 2009-02-02
> 12:08:57 ---
> Created an attachment (id=380)
> --> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=380)
> MinGW32 support for orocos-rtt
>
> * it is based solely on mingw32, no msys or cygwin.
> * it use native windows threads. No need for pthreads.
> * only ports RTT, and currently without support for Corba
> * it uses the fixes that Peter made regarding 'weak' symbol handling.
> * 4 out of 8 tests work. (ported CPPUnit to BOOST tests since
> CPPUnit requires
> the obnoxious automake )
> * Priorities are supported on thread level, though creating new
> processes could
> help get better "realtime" support.
> * CMake is used to generate the project: cmake -G"MinGW Makefiles" .

I'd be interested in trying this, and comparing to the port needing
msys, but was hoping you could provide a little more information.

You didn't use msys, but did you update any of the tools that the
default mingw32 installer provided? (eg bash, the coreutils) Did you
install any other additional tools into mingw? (eg autoconf)

Did you compile boost within mingw using mingw's gcc? Which version of
boost? Without MSYS, I presume this was done in a DOS command prompt?

Did you compile CMake from source or download a binary Windows
installer?

TIA
Stephen

[Bug 605] Initial RTT port for Windows/cygwin

> -----Original Message-----
> From: S Roderick [mailto:kiwi [dot] net [..] ...]
> Sent: 5. februar 2009 21:22
> To: Jimmy Alison Jørgensen
> Cc: orocos-dev [..] ...
> Subject: Re: [Orocos-Dev] [Bug 605] Initial RTT port for Windows/cygwin
>
> On Feb 2, 2009, at 06:08 , Jimmy Jorgensen wrote:
>
> > For more infomation about this bug, visit
> <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=605
> > >
> >
> >
> >
> > --- Comment #4 from Jimmy Jorgensen <jimali [..] ...> 2009-02-02
> > 12:08:57 ---
> > Created an attachment (id=380)
> > --> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=380)
> > MinGW32 support for orocos-rtt
> >
> > * it is based solely on mingw32, no msys or cygwin.
> > * it use native windows threads. No need for pthreads.
> > * only ports RTT, and currently without support for Corba
> > * it uses the fixes that Peter made regarding 'weak' symbol handling.
> > * 4 out of 8 tests work. (ported CPPUnit to BOOST tests since
> > CPPUnit requires
> > the obnoxious automake )
> > * Priorities are supported on thread level, though creating new
> > processes could
> > help get better "realtime" support.
> > * CMake is used to generate the project: cmake -G"MinGW Makefiles" .
>
> I'd be interested in trying this, and comparing to the port needing
> msys, but was hoping you could provide a little more information.
>
> You didn't use msys, but did you update any of the tools that the
> default mingw32 installer provided? (eg bash, the coreutils) Did you
> install any other additional tools into mingw? (eg autoconf)

I used the mingw32 5.1.4 installer and installed these packages:
runtime=mingw-runtime-3.14.tar.gz
w32api=w32api-3.11.tar.gz
binutils=binutils-2.16.91-20060119-1.tar.gz
core=gcc-core-3.4.2-20040916-1.tar.gz
gpp=gcc-g++-3.4.2-20040916-1.tar.gz
g77=gcc-g77-3.4.2-20040916-1.tar.gz
make=mingw32-make-3.81-2.tar.gz

I use g77 for lapack in another project. Should not be necessary for this though. I don't use autoconf and I don't use the mingw bash (is that even included in the installer?).

>
> Did you compile boost within mingw using mingw's gcc? Which version of
> boost? Without MSYS, I presume this was done in a DOS command prompt?
>

I use boost 1.34.1 and for the Orocos compilation I use headers only. Though for faster execution and other projects that actually rely on the libraries I've installed precompiled libraries. I found the boost build system (BJam) a little triggy to use so I went for the easy solution... Though Boost should compile just fine with MinGW.

I use a DOS prompt, yes. Though I develop using Eclipse/CDT so most of the time I avoid the DOS prompt.

> Did you compile CMake from source or download a binary Windows
> installer?
>

I used the installer, no need to make it more complicated than necessary ;)

> TIA
> Stephen

/Jimmy

[Bug 605] Initial RTT port for Windows/cygwin

On Feb 2, 2009, at 06:08 , Jimmy Jorgensen wrote:

> For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=605
> >
> --- Comment #4 from Jimmy Jorgensen <jimali [..] ...> 2009-02-02
> 12:08:57 ---
> Created an attachment (id=380)
> --> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=380)
> MinGW32 support for orocos-rtt
>
> * it is based solely on mingw32, no msys or cygwin.
> * it use native windows threads. No need for pthreads.
> * only ports RTT, and currently without support for Corba
> * it uses the fixes that Peter made regarding 'weak' symbol handling.
> * 4 out of 8 tests work. (ported CPPUnit to BOOST tests since
> CPPUnit requires
> the obnoxious automake )
> * Priorities are supported on thread level, though creating new
> processes could
> help get better "realtime" support.

How is a normal Windoze install going to support "realtime" in any
sense of the word? Isn't it the same problem as the Mac port - the OS
fundamentally can't support realtime (unless you get into WinCE I
guess).

> * CMake is used to generate the project: cmake -G"MinGW Makefiles" .

Looks like a great start! Couple of things after looking this over. It
appears to mix together at least a couple of patches
1) MinGW native thread support
2) boost tests intead of cppunit tests
3) addition of user-specific CMAKE environment variables

I don't think we should mix together all 3 of these in one patch.
Makes it harder to test, harder to integrate, and harder to pull apart
should something be found incorrect later.

Re 2), it's a project level decision whether to change to a new test
framework. And then this would need to be ported to all aspects of
Orocos.

Re 3), is this to get around not being able to set CMAKE_INCLUDE_PATH
and brethren, when building out of an IDE?

It also appears to change "uint" to "unsigned int" throughout. I'm not
sure why RTT originally used the uint form, but we should check into
that before such a whole sale change.

This appears to be a replacement patch vs the pthreads one I proposed,
right?

Which tests failed? As Peter asked me previously, can you post a test
log.

Perhaps we should create a branch in RTT to put these patches on, same
as we did for the Mac OS X port?

Cheers
Stephen

[Bug 605] Initial RTT port for Windows/cygwin

On Monday 02 February 2009 15:01:05 S Roderick wrote:
> On Feb 2, 2009, at 06:08 , Jimmy Jorgensen wrote:
> ...
> > * CMake is used to generate the project: cmake -G"MinGW Makefiles" .
>
> Looks like a great start! Couple of things after looking this over. It
> appears to mix together at least a couple of patches
> 1) MinGW native thread support
> 2) boost tests intead of cppunit tests
> 3) addition of user-specific CMAKE environment variables
>
> I don't think we should mix together all 3 of these in one patch.
> Makes it harder to test, harder to integrate, and harder to pull apart
> should something be found incorrect later.

I agree, the patches should at least be split when comitting on trunk. There's
also a point 4): addition of new type lookup system. Which was pulled from my
cygwin patch. All in all, the patch only slightly modifies existing code. The
biggest modification is 4), which _i_ should have posted as a separate patch
:-)

>
> Re 2), it's a project level decision whether to change to a new test
> framework. And then this would need to be ported to all aspects of
> Orocos.

libcppunit is very basic and looks like it's having little evolution. With
boost/tests, you're damn sure about future availability and portability. So I
don't oppose a transition, but I'll read the boost/tests docs first though.

>
> Re 3), is this to get around not being able to set CMAKE_INCLUDE_PATH
> and brethren, when building out of an IDE?

We use a similar system as the patch when building Debian packages, but we
specify the include file at the cmake command line. The new orocos-
rtt.default.cmake file is pretty well documented, but should be noted in the
installation manual as well...

>
> It also appears to change "uint" to "unsigned int" throughout. I'm not
> sure why RTT originally used the uint form, but we should check into
> that before such a whole sale change.

These are really fixes on only 4 lines.

>
> This appears to be a replacement patch vs the pthreads one I proposed,
> right?
>
> Which tests failed? As Peter asked me previously, can you post a test
> log.
>
> Perhaps we should create a branch in RTT to put these patches on, same
> as we did for the Mac OS X port?

I'll do so personally in my git repository. You can check out git on windows
using eclipse and the git eclipse plugin (egit) which has no dependencies on
git itself and is very actively developed.

Peter

[Bug 605] Initial RTT port for Windows/cygwin

2009/2/2 Jimmy Jorgensen <span dir="ltr"><jimali [..] ...><span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=605>







--- Comment #4 from Jimmy Jorgensen <jimali [..] ...>  2009-02-02 12:08:57 ---

Created an attachment (id=380)

 --> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=380)

MinGW32 support for orocos-rtt



* it is based solely on mingw32, no msys or cygwin.

* it use native windows threads. No need for pthreads.

* only ports RTT, and currently without support for Corba

* it uses the fixes that Peter made regarding 'weak' symbol handling.

* 4 out of 8 tests work. (ported CPPUnit to BOOST tests since CPPUnit requires

the obnoxious automake )

* Priorities are supported on thread level, though creating new processes could

help get better "realtime" support.

* CMake is used to generate the project: cmake -G"MinGW Makefiles" .



--

Configure bugmail: https://www.fmtc.be/bugzilla/orocos/userprefs.cgi?tab=email

------- You are receiving this mail because: -------

You are on the CC list for the bug.

You are the assignee for the bug.

<font color="#888888">--

Orocos-Dev mailing list

Orocos-Dev [..] ...

http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev



Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



<font><blockquote>


First of all, thank you very much for this patch!



Do you have concerns about adding support for CORBA? It was easy
for me to compile ACE + TAO with MinGW, so I am wondering if the
process is very arduous. What's your opinion on that?



With this patch, it would be difficult to compile RTT using the Visual
Studio compiler? I don't know if this can be summed to generate the
project file with CMake (knowing that other dependencies have been
compiled with VS of course).



Philippe

[Bug 605] Initial RTT port for Windows/cygwin

Hey,

> How is a normal Windoze install going to support "realtime" in any
> sense of the word? Isn't it the same problem as the Mac port - the OS
> fundamentally can't support realtime (unless you get into WinCE I
> guess).

Well yes you are absolutely correct. That was actually my intension with the quotation marks but okay i won't use realtime again. Though Windows actually call the highest priority on a process for Realtime (at least in the task manager).

> I don't think we should mix together all 3 of these in one patch.
> Makes it harder to test, harder to integrate, and harder to pull apart
> should something be found incorrect later.

I guess you are right. It was solely for my own convenience that boost tests and CMAKE env variables was added.
Though I haven't been able to compile and use CPPUnit with mingw, which is why I ported the tests to Boost tests.

> Re 2), it's a project level decision whether to change to a new test
> framework. And then this would need to be ported to all aspects of
> Orocos.

Sure, again I did it for my own convenience. Though using boost test would remove a library dependency from Orocos and CPPUnit looks alot like Boost tests( at least in the way its used in RTT)

> Re 3), is this to get around not being able to set CMAKE_INCLUDE_PATH
> and brethren, when building out of an IDE?

Ehh, well actually in our project we have all configurable variables in an include file like this. Its probably the wrong way to utilize CMake but it seems like an easy and flexible way to add groups of variables with documentation. As i understand it, in orocos you would have to go to config dir where different cmake files document different options? or use CMakeSetup...

And well in windows things are not allways laid out perfectly, say include directories, libraries and such. These need to be specified manually.

> It also appears to change "uint" to "unsigned int" throughout. I'm not
> sure why RTT originally used the uint form, but we should check into
> that before such a whole sale change.

It appear only a couple of places...

> This appears to be a replacement patch vs the pthreads one I proposed,
> right?
>
> Which tests failed? As Peter asked me previously, can you post a test
> log.
>
> Perhaps we should create a branch in RTT to put these patches on, same
> as we did for the Mac OS X port?

Well pthreads are probably safer ;) though i think using native windows gives better opportunities regarding priorities on threads and processes.

I will look into posting the logs.

Cheers,
Jimmy

-----Original Message-----
From: S Roderick [mailto:kiwi [dot] net [..] ...]
Sent: 2. februar 2009 15:01
To: Jimmy Alison Jørgensen
Cc: orocos-dev [..] ...
Subject: Re: [Orocos-Dev] [Bug 605] Initial RTT port for Windows/cygwin

On Feb 2, 2009, at 06:08 , Jimmy Jorgensen wrote:

> For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=605
> >
> --- Comment #4 from Jimmy Jorgensen <jimali [..] ...> 2009-02-02
> 12:08:57 ---
> Created an attachment (id=380)
> --> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=380)
> MinGW32 support for orocos-rtt
>
> * it is based solely on mingw32, no msys or cygwin.
> * it use native windows threads. No need for pthreads.
> * only ports RTT, and currently without support for Corba
> * it uses the fixes that Peter made regarding 'weak' symbol handling.
> * 4 out of 8 tests work. (ported CPPUnit to BOOST tests since
> CPPUnit requires
> the obnoxious automake )
> * Priorities are supported on thread level, though creating new
> processes could
> help get better "realtime" support.

How is a normal Windoze install going to support "realtime" in any
sense of the word? Isn't it the same problem as the Mac port - the OS
fundamentally can't support realtime (unless you get into WinCE I
guess).

> * CMake is used to generate the project: cmake -G"MinGW Makefiles" .

Looks like a great start! Couple of things after looking this over. It
appears to mix together at least a couple of patches
1) MinGW native thread support
2) boost tests intead of cppunit tests
3) addition of user-specific CMAKE environment variables

I don't think we should mix together all 3 of these in one patch.
Makes it harder to test, harder to integrate, and harder to pull apart
should something be found incorrect later.

Re 2), it's a project level decision whether to change to a new test
framework. And then this would need to be ported to all aspects of
Orocos.

Re 3), is this to get around not being able to set CMAKE_INCLUDE_PATH
and brethren, when building out of an IDE?

It also appears to change "uint" to "unsigned int" throughout. I'm not
sure why RTT originally used the uint form, but we should check into
that before such a whole sale change.

This appears to be a replacement patch vs the pthreads one I proposed,
right?

Which tests failed? As Peter asked me previously, can you post a test
log.

Perhaps we should create a branch in RTT to put these patches on, same
as we did for the Mac OS X port?

Cheers
Stephen

[Bug 605] Initial RTT port for Windows/cygwin

On Mon, 2 Feb 2009, Jimmy Alison Jørgensen wrote:

> Hey,
>
>> How is a normal Windoze install going to support "realtime" in any
>> sense of the word? Isn't it the same problem as the Mac port - the OS
>> fundamentally can't support realtime (unless you get into WinCE I
>> guess).
>
> Well yes you are absolutely correct. That was actually my intension with
> the quotation marks but okay i won't use realtime again. Though Windows
> actually call the highest priority on a process for Realtime (at least in
> the task manager).

I have since quite some time been advocating (at least internally within
K.U.Leuven/FMTC) to let "RTT" stand for "Run Time Toolkit" instead of
(only) "Real-Time Toolkit". Anyway, realtime is not a property of the
software itself, but of all components in the system.

Herman

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

Hey Philippe,Regarding

Hey Philippe,

Regarding CORBA i guess it should not be a problem to incorporate it into the built, especially since you had no problem compiling it under mingw. I haven't done it because we currently don't use this feature. I think perhaps i will try this next (when the last bugs are fixed:).

Hmm, i tried compiling RTT under Visual Studio. I had a bunch of errors related to Spirit. But we where able to port RTT 1.2 (or was it 1.0) to Visual Studio so i think that it should be duable for 1.6 with this patch and some additional fixes. I use CMake to generate the Visual Studio projects. Though compile flags and definitions are currently set to use a gcc compiler. This should be fixed.

Cheers,
Jimmy

[Bug 605] Initial RTT port for Windows/cygwin

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=605>

--- Comment #3 from Peter Soetens <peter [dot] soetens [..] ...> 2009-01-24 23:27:58 ---
(In reply to comment #2)
> Why add the RTT_API and RTT_EXPORT to some classes? And what do you use to
> decide between one or the other?

The answer to that question is insulting to my intelligence.

>
> Is the RTT_WEAK_USER used anywhere? It is defined but not used, and is not in
> trunk.
>

I told on the orocos-dev ML that i had problems with weak symbols and dll's.
The RTT_WEAK_USER should have solved this, but the cygwin linker crashed on it.
So I removed it from the class definitions but let it (for future use/as a
reminder) in the rtt-config.h file.

The bottom line is that I 'played' with symbols until 'it worked'. Then I
immediately stopped touching any line of code. That's what you got now.

Peter

[Bug 605] Initial RTT port for Windows/cygwin

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=605>

S Roderick <kiwi [dot] net [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
CC| |kiwi [dot] net [..] ...

--- Comment #2 from S Roderick <kiwi [dot] net [..] ...> 2009-01-23 21:32:03 ---
Why add the RTT_API and RTT_EXPORT to some classes? And what do you use to
decide between one or the other?

Is the RTT_WEAK_USER used anywhere? It is defined but not used, and is not in
trunk.

RE: [Bug 605] New: Initial RTT port for Windows/cygwin

> -----Original Message-----
> From: orocos-dev-bounces [..] ... [mailto:orocos-dev-
> bounces [..] ...] On Behalf Of Peter Soetens
> Sent: dinsdag 16 december 2008 9:38
> To: orocos-dev [..] ...
> Subject: [Orocos-Dev] [Bug 605] New: Initial RTT port for
Windows/cygwin
>
> For more infomation about this bug, visit
>
> Summary: Initial RTT port for Windows/cygwin
> Product: RTT
> Version: 1.6.0
> Platform: All
> OS/Version: Windows
> Status: NEW
> Severity: normal
> Priority: P3
> Component: Operating System Abstraction - Portability
> AssignedTo: orocos-dev [..] ...
> ReportedBy: peter [dot] soetens [..] ...
> CC: orocos-dev [..] ...
> Estimated Hours: 0.0
>
> Created an attachment (id=358)
> --> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=358)
> Adds cygwin support to gnulinux target.
>
> Due to popular demand, I looked on what we get when we
> compile RTT on Windows/cygwin. For clarity: this is not a Win32 API
port,
> but
> it allows you to compile and run Orocos components on Windows. I
modified
> the
> gnulinux OROCOS_TARGET such that it also compiles on cygwin.
> This patch gets about all unit tests working.

It is a nice effort but in my opinion a windows native port is better.

Sander.

[Bug 605] New: Initial RTT port for Windows/cygwin

I've been using Orocos(RTT) on windows for quite some time now using MinGW on windows. If usefull to you guys i could post the relative few changes i made to make it work.
We actually had the thing compile in visual studio at some point, but we don't maintain that part anymore.

Cheers,
Jimmy

[Bug 605] New: Initial RTT port for Windows/cygwin

Hi Jimmy,

> I've been using Orocos(RTT) on windows for quite some time now using MinGW
> on windows. If usefull to you guys i could post the relative few changes i
> made to make it work.
> We actually had the thing compile in visual studio at some point, but we
> don't maintain that part anymore.

My opinion is that all 'custom user patches' should be included in the
Orocos mainline. This is the only way for us (and for the user) to
guarantee that user code will survive an upgrade. The inclusion process
should be seen as a gain, and not as a pain, because the discussion should
eventually lead to safer, faster and cleaner code. The end result is a
win-win: the community gets better software, you got rid of maintenance.

So yes, please, we'll happily review & include your port.

A technical note: if you look at my patch, you'll see that I had to change
the 'TypeRepository' in order to record the 'typeid.name()' of each added
type for getting the cygwin port work. The reason was because of poor weak
symbol handling on Windows, on which the type system relies heavily. How
did you work around this ? Didn't you get 'unknown_t' types in your end
application ? Did you solve it by re-importing the RTT plugin ?

Peter

MinGW patch..

Hi Peter,

I'm not sure that my patch would be ready for review yet. At least some main functionalities are still needed:
*The use of native windows threads should be modified to include better support for processes priorities.
*I never did manage to get cppunit to compile under mingw and as such I have not been able to test Orocos in full.

I have not experienced any trouble with the part of orocos that i use. Though i only use a relative small part of RTT. I guess i need the complete test suite before being able to answer your question on your technical note.

I will try and port some of the tests to boost tests in this week. With some luck i can post the results with my patch in the midle of next week.

/Jimmy

MinGW patch..

On Monday 05 January 2009 14:09:56 jimali [..] ... wrote:
> Hi Peter,
>
> I'm not sure that my patch would be ready for review yet. At least some
> main functionalities are still needed: *The use of native windows threads
> should be modified to include better support for processes priorities. *I
> never did manage to get cppunit to compile under mingw and as such I have
> not been able to test Orocos in full.
>
> I have not experienced any trouble with the part of orocos that i use.
> Though i only use a relative small part of RTT. I guess i need the complete
> test suite before being able to answer your question on your technical
> note.
>
> I will try and port some of the tests to boost tests in this week. With
> some luck i can post the results with my patch in the midle of next week.

Thanks.

Just looking at the amount of interest your patch spurs, feel free to post the
patch anyway and get feedback early on. Many hands will make your work
lighter.

Any patch is ready for review so don't delay. It's the review itself that
takes time and eventually leads to inclusion. We're not having the 'formal
reviews' boost has :-)

Peter

[Bug 605] Initial RTT port for Windows/cygwin

For more infomation about this bug, visit

--- Comment #1 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-12-16 10:13:56 ---
The wiki page can be found here: http://www.orocos.org/node/977

[Bug 605] New: Initial RTT port for Windows/cygwin

> A Dimarts 16 Desembre 2008, Peter Soetens va escriure:
>> For more infomation about this bug, visit
>> Summary:
>> Initial
>> RTT port for Windows/cygwin
...
> what about to create a gnucygwin target instead of modified the gnulinux
> target?

Because it is 98% identical to the gnulinux target. If the target name
changes, we need to copy the src/os/gnulinux directory to src/os/cygwin
and modify the build system in more places. It does not yet pay off.

Peter