eclipse-cyclonedds / cyclonedds

Eclipse Cyclone DDS project
https://projects.eclipse.org/projects/iot.cyclonedds
Other
798 stars 349 forks source link

Building Cyclone DDS for Android #2026

Open sahinsengul opened 3 weeks ago

sahinsengul commented 3 weeks ago

I tried to build cyclone dds for Android and followed the instructions in "ports/android/README.md" but after building cyclone dds, ddsperf binary file was not created under the build.android/bin/ddsperf directory. Is the document no longer up to date? If not, how can I use cyclone dds on android? thank you in advance for your help

trittsv commented 1 week ago

Hey what build system are you using? I am crosscompiling cyclonedds via CMake without any problems.

eboasson commented 6 days ago

There's this: https://github.com/eclipse-cyclonedds/cyclonedds/blob/d7db65c7f9def668af029890c351de6186977d58/CMakeLists.txt#L63

You can build the Cyclone core without building idlc, but for building ddsperf you a need an idlc for the host machine. So this makes some sense, but it is a bit inelegant. It would perhaps be nicer if idlc were a separate package and it would auto-build idlc if not available and not doing a cross-build, etc., etc., but that's not currently the case.

I think your problem can be solved by doing a host build first to get a copy of idlc, then do a cross build for Android (like it says in the README) with -DBUILD_DDSPERF=1 added to the cmake command.

A PR for the Android port README.md with better instructions would be welcome.