-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removed Boost and ported to C++11. Added support for Android and iOS #26
Conversation
Also, I put the semaphore under the LGPL3 license, as the rest of the project. I tried my best to keep the same code style (tabs, naming, etc.) in the changes I made, let me know if they need reworking. |
I just rebased against master and fixed the conflicts, I haven't had time to test the latest changes thoroughly, but they should work fine on Android. |
Rebased this PR again against master. Changes since the last rebase:
|
Hi Esteve, Impressive! Thanks a lot for all this effort (again). We will test everything. After our change to Apache License 2.0,Any contribution that you make to this repository (including this pull request) will be under the Apache 2 License, as dictated by that
I note you published the semaphore as LGPL, could you change that? I will contact you directly. |
@JaimeMartin I had the license header removed from the semaphore in a previous rebase. What the clause 5 of the Apache license says is that, given a contributed piece of code that doesn't have an explicit license, it'll default to the Apache 2.0 license. In any case, I pushed an update to the branch where I added a header to the sempahore code with the Apache 2.0 license, just to avoid any confusion. Also, I've split the UWP code into a separate commit, in case you'd rather cherry pick only the C++11 and Android changes. |
I've rebased this PR once again against master, no major changes this time. |
@JaimeMartin is there any word on when/if this will be merged into master? |
Here's yet another periodic rebase. I second @scott-eddy , is there any actual plan to merge or test this? It's been 7 months since I first submitted this for review and updating this PR every time there's a conflict with master consumes a fair amount of time. It's ok if it takes a lot of time to test all the changes (though you already use certain parts of C++11, namely |
Hi Esteve, During the last months we have been working in several features to support properly ROS2 and our customers, so it is a matter of bandwidth. We are very interested on this, and our plan is to prepare an experimental branch to test this PR properly. I think we will be able to start the first tests in less than one month as we are incorporating a new engineer to the project. Thanks for your patience, and your contribution. |
@JaimeMartin that's fantastic, thanks for the update, I just wanted a bit of feedback. Let me know if there's anything I can help with to get this merged. |
I just updated the description to mention that I added support for iOS to this branch. |
I would like to suggest that it might be helpful to split up the unrelated parts of this PR. I would really like to see the boost to c++11 changes to get merged. @JaimeMartin Can you comment if the chances to integrate these changes individually would speed things up? |
@dirk-thomas good idea. I've split the first commit and moved the Android-specific changes to 53fc231 |
@JaimeMartin @richiprosima Can you we please get a comment from you on this? |
Hi @dirk-thomas, @esteve , We will be releasing resources to test & merge this very soon. |
@JaimeMartin thanks for the update. I just rebased this PR against master, @JavierIH @VicenteEprosima feel free to ask me any questions here about the changes. |
@JaimeMartin When you review the changes I would suggest to consider not to introduce custom options like |
@dirk-thomas Fast-CDR already uses |
I will leave it up to eProsima to pick their strategy. I only wanted to provide my 2 cent that adding a custom option for something CMake already provides seems counterproductive. Users familiar with CMake won't know about it and will certainly not expect it. Even worse if the developer uses the CMake option to override the behavior they can affect the |
@dirk-thomas I'm not arguing with you, you raise many valid points, so if you feel so strongly about this, it'd be great you could submit a patch that addresses it, that's the beauty of opensource. I don't have much time to work on this PR, so anyone who can contribute, the more the merrier. |
@esteve changes are good for me because Fast-CDR and Fast-RTPS repositories didn't offer the alternative to build static libraries on Linux. I wasn't aware of the existence of |
I've rebased this PR and applied the same commit that @richiprosima made for |
This code was ported from boost to std, but it won't be used anymore.
Includes additional commits by @JavierIH's addressing the following eProsima's internal refs: - Refs #1933. Fix error codes on logs - Refs #1933. Modified include for asio in flowcontroller - Refs #1933. Updated tests - Refs #1938 Fixed XML parser - Refs #1942. Solved some Windows related compilation errors - Refs #1949. changed virtual for override keyword in some virtual functions - Refs #1942. migrated tests from boost to std - Refs #1933. Updated examples - Refs #1933. solved some warnings related with latest changes - Refs #1934. changed asio error type - Refs #1933. fix deadlineqos example - Refs #1933. fix warnings on windows
I've merged @JavierIH 's PR and reordered and squashed some of the commits, but both two branches are equivalent. I just realized that this PR is one day away from turning a year old since I first submitted it for review, whoa! |
We are very interested in using FastRTPS on Android and would love to see this land. Curious to know if this is a near-term target for eProsima? Would it be safe to start working from this PR's branch? @esteve Thanks in general for your efforts both here and in your efforts towards ROS2 support on Android! |
Also, out of curiosity, do you have available the methods you use to build FastRTPS for Android? Using @esteve's ros2_java README as a baseline, I was able to successfully build using the following commands, but they could probably use a lookover to see if I missed anything: mkdir build
cd build
$HOME/Android/Sdk/cmake/3.6.3155560/bin/cmake \
-DCMAKE_TOOLCHAIN_FILE=$HOME/android/android-ndk-r14/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=armeabi-v7a \
-DANDROID_NDK=$HOME/Android/Sdk/ndk-bundle \
-DCMAKE_BUILD_TYPE=Release \
-DANDROID_NATIVE_API_LEVEL=android-21 \
-DANDROID_PLATFORM=android-21 \
-DANDROID_FUNCTION_LEVEL_LINKING=OFF \
-DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-clang \
-DANDROID_STL=gnustl_shared \
-DTHIRDPARTY=ON \
-DCOMPILE_EXAMPLES=OFF \
-DCMAKE_CXX_FLAGS=-std=c++11 -frtti -fexceptions \
.. |
@spiderkeys thanks for trying out this branch! That CMake incantation is perfect, the only thing I might change is that you don't have to pass any extra flags to the C++ compiler. Starting with NDK r14, RTTI and exceptions are enabled by default (see https://github.com/pombredanne/android.googlesource.com-platform-ndk/commit/9b3fff0a117ab7c49eb97c1bc441b4bb8c3464fc) Additionally, Also, according to the FastRTPS README, you should pass Let me know if you find any other issue, I've been using this code in conjunction with |
This PR replaces Boost with C++11 counterparts. And where they are not available, I either reimplemented them or used an alternative, namely:
I also added support for Android, including:
ifaddrs
for Android.Notes:
std::strftime
instead ofstd::put_time
because the latter is not implemented in GCC 4.8, which is the one that Ubuntu Trusty ships.This work is completely independent and not officially endorsed or supported by OSRF, I did it in my spare time.