eclipse-iceoryx / iceoryx

Eclipse iceoryx™ - true zero-copy inter-process-communication
https://iceoryx.io
Apache License 2.0
1.62k stars 383 forks source link

Basic Windows 10 support #33

Closed budrus closed 3 years ago

budrus commented 4 years ago

Brief feature description

Having the possibility to use iceoryx on Windows 10

Detailed information

The following features have to be implemented

rex-schilasky commented 4 years ago

Highly welcomed by the eCAL project too.

elfenpiff commented 4 years ago

I am on it ...

MatteoRagni commented 3 years ago

Today I tried a compilation in Windows 10 Pro (VS2017 x64):

cmake -Bbuild -Hiceoryx_meta -Ax64
cmake --build build

Patching

In order to successfully compile the current main (347224e):

Testing

Even if compiled correctly, still I got errors in tests, that I'm attaching (compiled in Debug). I hope it will helps.

binding_c_intengrationtests_stderr.txt binding_c_intengrationtests_stdout.txt

posh_components.txt posh_integrationtests_stderr.txt posh_integrationtests_stdout.txt posh_moduletests_stderr.txt posh_moduletests_stdout.txt

utils_integrationtests_stdout.txt utils_moduletests_stderr.txt utils_moduletests_stdout.txt utils_componenttests_stout.txt test_stress_sofi_stdout.txt

Examples

The examples (like simple publisher/subscriber) crashes with errors about UID/GID (not finding 0). Ican provide more detail on request.

budrus commented 3 years ago

Cool @MatteoRagni, thanks for pushing the WIndows support. So far we do not officially support it. I also think there was no running setup so far. @elfenpiff can give a status where we are.

elfenpiff commented 3 years ago

Hi @MatteoRagni thanks for your work but Windows is currently not yet supported. We only have a compilation test in our pipeline where the semaphore is verified. Your getpid snippet would fit perfectly into: https://github.com/eclipse/iceoryx/blob/master/iceoryx_utils/platform/win/include/iceoryx_utils/platform/unistd.hpp Here I proceed as follows.

  1. Lookup the include file in the manpage (unistd.h)
  2. Find corresponding platform file in iceoryx_utils/platform and add it here so that it behaves like the getpid in linux.

At the moment the following in Windows should work:

The next big Windows port would be:

If you would like to start with this you could try to run only the iceoryx_utils message queue tests: ./build/utils/test/utils_moduletests --gtest_filter="MessageQueue*" in Windows. If everything is ported and and green we could merge it into iceoryx and we would be one step closer to our windows support.

@MatteoRagni would you like to continue? Otherwise I hope that I can continue exactly with this in 2 or 3 weeks.

Btw. if you have further questions you can contact me via gitter: https://gitter.im/eclipse/iceoryx (or directly)

MatteoRagni commented 3 years ago

@elfenpiff I tried the actual situation of the test utils_moduletests --gtest_filter="MessageQueue*" (I removed the _WIN32 guard). I'm attaching the results, but I had to disable timedSend, since it goes in dead lock.

Unfortunately 8 on 19 are green... 😞

message_quque_stdout.txt

I'll try to check out to make something green, but it is something that I have to do in my free time unfortunately.

elfenpiff commented 3 years ago

@MatteoRagni no problem. I will try to work as soon as possible on it. Maybe you get the Windows support as your personal christmas present ;) but I cannot promise this.

elfenpiff commented 3 years ago

Basic Windows support is implemented. All examples are running and most of the unit tests too (except unix domain sockets or ACLs). The tests which are excluded at the moment are testing corner cases which are not relevant for the everyday use and will be implemented with #846