RTT-2.0 and Windows

Hello, I was playing with RTT-2.0-mainline under windows (32bits and
64bits). I've made some modifications to the cmake scripts and to the
code to make it compile. So far, I can compile the main lib/dll and all
the tests except taskcontext-test. Most of the unit tests passed.

The issues were:
* Missing function "delete_if" in ListLocked.hpp
* Some missing #ifdef OROBLD_OS_NO_ASM
* Some posix functions to adapt (like in FileDescriptorActivity.cpp)
* Some compilation flags
* Name clash between the namespace "interface" and the interface
"keyword" from MS COM Layer. For the moment, I had to put "#undef
interface" in 10 files to avoid that.

I would like to know if you are interested in this changeset and if so,
in which form (patches, fork on GitHub, etc.). Some of my code may need
some work to fit your coding standards although...

RTT-2.0 and Windows

Hi Jean,

On Thu, Dec 3, 2009 at 19:54, Jean Sreng <jean [dot] sreng [..] ...> wrote:
> Hello, I was playing with RTT-2.0-mainline under windows (32bits and
> 64bits). I've made some modifications to the cmake scripts and to the
> code to make it compile. So far, I can compile the main lib/dll and all
> the tests except taskcontext-test. Most of the unit tests passed.

Thanks for doing the work. We're currently only testing rtt-1.0 on
windows automatically, but it won't take long before the 2.0 mainline
gets the same treatment.

>
> The issues were:
>  * Missing function "delete_if" in ListLocked.hpp
>  * Some missing #ifdef OROBLD_OS_NO_ASM
>  * Some posix functions to adapt (like in FileDescriptorActivity.cpp)
>  * Some compilation flags
>  * Name clash between the namespace "interface" and the interface
> "keyword" from MS COM Layer. For the moment, I had to put "#undef
> interface" in 10 files to avoid that.

The only thing I'm worried about is the 'interface' name clash. Since
it was in namespace RTT, I supposed such a generic word wouldn't hurt,
but if 'people' start to write lower case macros... I believe we'll
have to #undef interface in the rtt-config.h file if the target is
win32 *or* rename the namespace...

>
> I would like to know if you are interested in this changeset and if so,
> in which form (patches, fork on GitHub, etc.). Some of my code may need
> some work to fit your coding standards although...

If you're familiar with github, it's easiest for me if you fork my
repository and create a for-peter branch which I can pull and merge.
If you're not into git, a patch on the mailinglist will be just fine
too.

Peter

RTT-2.0 and Windows

Le 04/12/2009 09:29, Peter Soetens a écrit :
>> I would like to know if you are interested in this changeset and if so,
>> in which form (patches, fork on GitHub, etc.). Some of my code may need
>> some work to fit your coding standards although...
>
> If you're familiar with github, it's easiest for me if you fork my
> repository and create a for-peter branch which I can pull and merge.
> If you're not into git, a patch on the mailinglist will be just fine
> too.

Hello, I just pushed on github (http://github.com/jsreng/orocos-rtt) the
atomic functions for MSVC. I didn't tested them heavily but core-test
passed without any errors.

RTT-2.0 and Windows

On Thu, Dec 10, 2009 at 16:19, Jean Sreng <jean [dot] sreng [..] ...> wrote:
> Le 04/12/2009 09:29, Peter Soetens a écrit :
>>> I would like to know if you are interested in this changeset and if so,
>>> in which form (patches, fork on GitHub, etc.). Some of my code may need
>>> some work to fit your coding standards although...
>>
>> If you're familiar with github, it's easiest for me if you fork my
>> repository and create a for-peter branch which I can pull and merge.
>> If you're not into git, a patch on the mailinglist will be just fine
>> too.
>
> Hello, I just pushed on github (http://github.com/jsreng/orocos-rtt) the
> atomic functions for MSVC. I didn't tested them heavily but core-test
> passed without any errors.

One other minor issue: You accidentally added your orocos-rtt.cmake
file. It is supposed to be created by users and is not a part of the
library.

Peter

RTT-2.0 and Windows

Hi Jean,

On Thu, Dec 10, 2009 at 16:19, Jean Sreng <jean [dot] sreng [..] ...> wrote:
> Le 04/12/2009 09:29, Peter Soetens a écrit :
>>> I would like to know if you are interested in this changeset and if so,
>>> in which form (patches, fork on GitHub, etc.). Some of my code may need
>>> some work to fit your coding standards although...
>>
>> If you're familiar with github, it's easiest for me if you fork my
>> repository and create a for-peter branch which I can pull and merge.
>> If you're not into git, a patch on the mailinglist will be just fine
>> too.
>
> Hello, I just pushed on github (http://github.com/jsreng/orocos-rtt) the
> atomic functions for MSVC. I didn't tested them heavily but core-test
> passed without any errors.

That means a lot ! Also don't forget to run the list-test since it
tests the lock-free lists.

I could merge your branch locally on the rtt-2.0 mainline. All seems
fine, but these minor questions:
- could you prefix your commits in the future with a 'tag', like
win32: Export missing symbols or cmake: Hide lockfree structures with
OROBLD_OS_NO_ASM etc.
- When adding a multi-line commit message, be sure to leave a blank
line between the first and third line, because git am and other tools
interprete commit messages as email bodies. The subject and body in
emails are separated by a blank line.
- Is the simple Posix wrapper DLL present on all windows platforms ?
What else does it include ?
- /MP is not yet officially supported on MSVC 2005. It works 'kindof',
sometimes you have to turn it off. Maybe turn it off by default if
MSVC80 cmake variable is true ?

Finally, I'm planning to extend the 'plugin' functionality of the RTT
with functions for loading DLL/.so files. This will be used to load
tool/type kits and components by RTT of the deployer. This would make
the deployment component easier to port to win32. Do you have any
advise on how to do this best on win32 ? There was before a discussion
on the mailinglist that there are dlopen wrappers for win32, but maybe
you prefer a full-native solution ?

I see no reasons to delay accepting your branch, but since I won't
merge it on a daily basis, I'll wait for your final ok-to-pull, in
case you would change something in response to my above remarks.

Thanks for doing this !

Peter

RTT-2.0 and Windows

Hello,

Le 10/12/2009 17:36, Peter Soetens a écrit :
> That means a lot ! Also don't forget to run the list-test since it
> tests the lock-free lists.

The list-test passed also. However, I think this test only uses
ListLocked which is mutex based ?

Since you did not push anything on the main repository yet, I changed
some of my commit messages (since the remote changed deeply you might
have to clone again the branch to avoid any problems. I put the changes
in the "for_peter" branch to avoid any confusion):

> - could you prefix your commits in the future with a 'tag', like
> win32: Export missing symbols or cmake: Hide lockfree structures with
> OROBLD_OS_NO_ASM etc.

Done. I must admit sometimes I did not know which one to pick :)

> - When adding a multi-line commit message, be sure to leave a blank
> line between the first and third line, because git am and other tools
> interprete commit messages as email bodies. The subject and body in
> emails are separated by a blank line.

Done.

> - Is the simple Posix wrapper DLL present on all windows platforms ?
> What else does it include ?

Yes, it is the standard WinSock2/"Compatibility" interface.

> - /MP is not yet officially supported on MSVC 2005. It works 'kindof',
> sometimes you have to turn it off. Maybe turn it off by default if
> MSVC80 cmake variable is true ?

Ok, I put a MSVC condition on that.

> Finally, I'm planning to extend the 'plugin' functionality of the RTT
> with functions for loading DLL/.so files. This will be used to load
> tool/type kits and components by RTT of the deployer. This would make
> the deployment component easier to port to win32. Do you have any
> advise on how to do this best on win32 ? There was before a discussion
> on the mailinglist that there are dlopen wrappers for win32, but maybe
> you prefer a full-native solution ?

I'm not a specialist of DL on windows, but I think that the wrapping of
dlopen,dlclose,dlsym,... is pretty straightforward using LoadLibrary,
FreeLibrary,GetProcAddress,... Maybe a very simple wrapper like the one
is the os/* directories can be a simple way to do that. However, if you
want to have a kind of "universal binary module", for instance loading
.dll under linux or .so under windows, it's tricky but acheivable (cf.
Wine), but might not be worth the effort.

> I see no reasons to delay accepting your branch, but since I won't
> merge it on a daily basis, I'll wait for your final ok-to-pull, in
> case you would change something in response to my above remarks.

It OK for me !

RTT-2.0 and Windows

Hi Jean,

Thanks for the fast-forward, I pushed it to github.

Peter

On Fri, Dec 11, 2009 at 13:33, Jean Sreng <jean [dot] sreng [..] ...> wrote:
> Hello,
>
> Le 10/12/2009 17:36, Peter Soetens a écrit :
>>
>> That means a lot ! Also don't forget to run the list-test since it
>> tests the lock-free lists.
>
> The list-test passed also. However, I think this test only uses ListLocked
> which is mutex based ?
>
> Since you did not push anything on the main repository yet, I changed some
> of my commit messages (since the remote changed deeply you might have to
> clone again the branch to avoid any problems. I put the changes in the
> "for_peter" branch to avoid any confusion):
>
>> - could you prefix your commits in the future with a 'tag', like
>> win32: Export missing symbols or cmake: Hide lockfree structures with
>> OROBLD_OS_NO_ASM etc.
>
> Done. I must admit sometimes I did not know which one to pick :)
>
>> - When adding a multi-line commit message, be sure to leave a blank
>> line between the first and third line, because git am and other tools
>> interprete commit messages as email bodies. The subject and body in
>> emails are separated by a blank line.
>
> Done.
>
>> - Is the simple Posix wrapper DLL present on all windows platforms ?
>> What else does it include ?
>
> Yes, it is the standard WinSock2/"Compatibility" interface.
>
>> - /MP is not yet officially supported on MSVC 2005. It works 'kindof',
>> sometimes you have to turn it off. Maybe turn it off by default if
>> MSVC80 cmake variable is true ?
>
> Ok, I put a MSVC condition on that.
>
>> Finally, I'm planning to extend the 'plugin' functionality of the RTT
>> with functions for loading DLL/.so files. This will be used to load
>> tool/type kits and components by RTT of the deployer. This would make
>> the deployment component easier to port to win32. Do you have any
>> advise on how to do this best on win32 ? There was before a discussion
>> on the mailinglist that there are dlopen wrappers for win32, but maybe
>> you prefer a full-native solution ?
>
> I'm not a specialist of DL on windows, but I think that the wrapping of
> dlopen,dlclose,dlsym,... is pretty straightforward using LoadLibrary,
> FreeLibrary,GetProcAddress,... Maybe a very simple wrapper like the one is
> the os/* directories can be a simple way to do that. However, if you want to
> have a kind of "universal binary module", for instance loading .dll under
> linux or .so under windows, it's tricky but acheivable (cf. Wine), but might
> not be worth the effort.
>
>> I see no reasons to delay accepting your branch, but since I won't
>> merge it on a daily basis, I'll wait for your final ok-to-pull, in
>> case you would change something in response to my above remarks.
>
> It OK for me !
>
> --
> Jean
>

RTT-2.0 and Windows

Le 11/12/2009 15:07, Peter Soetens a écrit :
> Thanks for the fast-forward, I pushed it to github.

Thanks. I just pushed one last minute fix for the x86 architecture on my
github repo (on the rtt-2.0-mainline branch).
I'll try to investigate the failed unit tests and CORBA transport for
windows in the next days.

RTT-2.0 and Windows

We already use RTT-1.10 on Windows/MSVC 2005 and everything seems to work
well. Excuse my ignorance, but what does this patch brings more compared to
the current version?

Thank you,

Philippe

2009/12/10 Peter Soetens <peter [..] ...>

> Hi Jean,
>
> On Thu, Dec 10, 2009 at 16:19, Jean Sreng <jean [dot] sreng [..] ...> wrote:
> > Le 04/12/2009 09:29, Peter Soetens a écrit :
> >>> I would like to know if you are interested in this changeset and if so,
> >>> in which form (patches, fork on GitHub, etc.). Some of my code may need
> >>> some work to fit your coding standards although...
> >>
> >> If you're familiar with github, it's easiest for me if you fork my
> >> repository and create a for-peter branch which I can pull and merge.
> >> If you're not into git, a patch on the mailinglist will be just fine
> >> too.
> >
> > Hello, I just pushed on github (http://github.com/jsreng/orocos-rtt) the
> > atomic functions for MSVC. I didn't tested them heavily but core-test
> > passed without any errors.
>
> That means a lot ! Also don't forget to run the list-test since it
> tests the lock-free lists.
>
> I could merge your branch locally on the rtt-2.0 mainline. All seems
> fine, but these minor questions:
> - could you prefix your commits in the future with a 'tag', like
> win32: Export missing symbols or cmake: Hide lockfree structures with
> OROBLD_OS_NO_ASM etc.
> - When adding a multi-line commit message, be sure to leave a blank
> line between the first and third line, because git am and other tools
> interprete commit messages as email bodies. The subject and body in
> emails are separated by a blank line.
> - Is the simple Posix wrapper DLL present on all windows platforms ?
> What else does it include ?
> - /MP is not yet officially supported on MSVC 2005. It works 'kindof',
> sometimes you have to turn it off. Maybe turn it off by default if
> MSVC80 cmake variable is true ?
>
> Finally, I'm planning to extend the 'plugin' functionality of the RTT
> with functions for loading DLL/.so files. This will be used to load
> tool/type kits and components by RTT of the deployer. This would make
> the deployment component easier to port to win32. Do you have any
> advise on how to do this best on win32 ? There was before a discussion
> on the mailinglist that there are dlopen wrappers for win32, but maybe
> you prefer a full-native solution ?
>
> I see no reasons to delay accepting your branch, but since I won't
> merge it on a daily basis, I'll wait for your final ok-to-pull, in
> case you would change something in response to my above remarks.
>
> Thanks for doing this !
>
> Peter
> --
> Orocos-Dev mailing list
> Orocos-Dev [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
>

RTT-2.0 and Windows

On Thu, Dec 10, 2009 at 17:48, Philippe Hamelin
<philippe [dot] hamelin [..] ...> wrote:
> We already use RTT-1.10 on Windows/MSVC 2005 and everything seems to work
> well. Excuse my ignorance, but what does this patch brings more compared to
> the current version?

If I may answer.
The current Windows target uses mutex objects to synchronize access to
thread-safe buffers, lists, queues and data objects. The patches of
Jean are 1) for the RTT 2.0 mainline and 2) allow to use the lock-free
algorithms instead of the mutexes. There are also some cleanups that
could be back-ported to the 1.x lines though.

Peter