{"action":"created","issue":{"url":"https://api.github.com/repos/ros2/rclcpp/issues/734","repository_url":"https://api.github.com/repos/ros2/rclcpp","labels_url":"https://api.github.com/repos/ros2/rclcpp/issues/734/labels{/name}","comments_url":"https://api.github.com/repos/ros2/rclcpp/issues/734/comments","events_url":"https://api.github.com/repos/ros2/rclcpp/issues/734/events","html_url":"https://github.com/ros2/rclcpp/issues/734","id":447487092,"node_id":"MDU6SXNzdWU0NDc0ODcwOTI=","number":734,"title":"Cross-compilation with Android API 28","user":{"login":"roderick-koehle","id":50633232,"node_id":"MDQ6VXNlcjUwNjMzMjMy","avatar_url":"https://avatars2.githubusercontent.com/u/50633232?v=4","gravatar_id":"","url":"https://api.github.com/users/roderick-koehle","html_url":"https://github.com/roderick-koehle","followers_url":"https://api.github.com/users/roderick-koehle/followers","following_url":"https://api.github.com/users/roderick-koehle/following{/other_user}","gists_url":"https://api.github.com/users/roderick-koehle/gists{/gist_id}","starred_url":"https://api.github.com/users/roderick-koehle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roderick-koehle/subscriptions","organizations_url":"https://api.github.com/users/roderick-koehle/orgs","repos_url":"https://api.github.com/users/roderick-koehle/repos","events_url":"https://api.github.com/users/roderick-koehle/events{/privacy}","received_events_url":"https://api.github.com/users/roderick-koehle/received_events","type":"User","site_admin":false},"labels":[{"id":120328827,"node_id":"MDU6TGFiZWwxMjAzMjg4Mjc=","url":"https://api.github.com/repos/ros2/rclcpp/labels/bug","name":"bug","color":"d73a4a","default":true},{"id":120328830,"node_id":"MDU6TGFiZWwxMjAzMjg4MzA=","url":"https://api.github.com/repos/ros2/rclcpp/labels/help%20wanted","name":"help wanted","color":"008672","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-05-23T07:15:16Z","updated_at":"2019-07-18T15:45:27Z","closed_at":"2019-07-18T15:45:27Z","author_association":"CONTRIBUTOR","body":"## Bug report\r\n- Operating System:\r\n  - Android NDK r19\r\n  - ANDROID_ABI=x86,armeabi-7a, arm64-v8a\r\n  - ANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-clang\r\n  - ANDROID_NATIVE_API_LEVEL=android-28\r\n- Installation type:\r\n  - Source\r\n- Version or commit hash:\r\n  - master\r\n- DDS implementation:\r\n  - Fast-RTPS\r\n- Client library (if applicable):\r\n  - rclcpp\r\n\r\n#### Steps to reproduce issue\r\n\r\nAndroid cross compilation with latest platform API results in a compile error in the signal_handler of rclcpp.\r\n\r\n#### Actual behavior\r\n```\r\nStarting >>> rclcpp\r\n--- stderr: rclcpp\r\n/home/EU/dekoehlr/work/ros2_core_ws/src/ros2/rclcpp/rclcpp/src/rclcpp/signal_handler.cpp:176:7: \r\nerror: cannot initialize a variable of type 'int' with an rvalue of type 'char *'\r\n   int error_status = strerror_r(errnum, buffer, buffer_length);\r\n       ^              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n1 error generated.\r\nmake[2]: *** [CMakeFiles/rclcpp.dir/src/rclcpp/signal_handler.cpp.o] Error 1\r\nmake[1]: *** [CMakeFiles/rclcpp.dir/all] Error 2\r\nmake: *** [all] Error 2\r\n---\r\nFailed   <<< rclcpp     [ Exited with code 2 ]\r\n```\r\n\r\n#### Additional information\r\nThe cause is the use of the reentrant `strerror_r` reporting function, which has a inconsistent function signature in the XSI and GNU string.h core library.\r\nThe feature test macros (see https://linux.die.net/man/3/strerror_r) to distinguish between XSI and POSIX are not reliable on Android as the _GNU_SOURCE may or may not be defined depending on the API level. For a discussion of the use of `strerror_r` see http://austingroupbugs.net/view.php?id=655.\r\n\r\nPossible solutions are substituting the ambiguous `strerror_r` by the (re-entrant) `strerror_l`, or use the prototype definition check provided by cmake, e.g.:\r\n```cmake\r\n# Query platform depended string functions\r\ncheck_prototype_definition(strerror_r\r\n  \"int strerror_r(int errnum, char *strerrbuf, size_t buflen)\"\r\n  \"0\"\r\n  \"string.h\"\r\n  XSI_STRERROR_R)\r\ncheck_prototype_definition(strerror_r\r\n  \"char *strerror_r(int errnum, char *buf, size_t buflen)\"\r\n  \"NULL\"\r\n  \"string.h\"\r\n  GNU_STRERROR_R)\r\nif(XSI_STRERROR_R)\r\n   add_compile_options(-DXSI_STRERROR_R)\r\nendif()\r\nif(GNU_STRERROR_R)\r\n   add_compile_options(-DGNU_STRERROR_R)\r\nendif()\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ros2/rclcpp/issues/comments/512872838","html_url":"https://github.com/ros2/rclcpp/issues/734#issuecomment-512872838","issue_url":"https://api.github.com/repos/ros2/rclcpp/issues/734","id":512872838,"node_id":"MDEyOklzc3VlQ29tbWVudDUxMjg3MjgzOA==","user":{"login":"nuclearsandwich","id":358882,"node_id":"MDQ6VXNlcjM1ODg4Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/358882?v=4","gravatar_id":"","url":"https://api.github.com/users/nuclearsandwich","html_url":"https://github.com/nuclearsandwich","followers_url":"https://api.github.com/users/nuclearsandwich/followers","following_url":"https://api.github.com/users/nuclearsandwich/following{/other_user}","gists_url":"https://api.github.com/users/nuclearsandwich/gists{/gist_id}","starred_url":"https://api.github.com/users/nuclearsandwich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nuclearsandwich/subscriptions","organizations_url":"https://api.github.com/users/nuclearsandwich/orgs","repos_url":"https://api.github.com/users/nuclearsandwich/repos","events_url":"https://api.github.com/users/nuclearsandwich/events{/privacy}","received_events_url":"https://api.github.com/users/nuclearsandwich/received_events","type":"User","site_admin":false},"created_at":"2019-07-18T15:45:27Z","updated_at":"2019-07-18T15:45:27Z","author_association":"MEMBER","body":"@roderick-koehle with #742 merged I am going to close this issue. If there are other issues with cross-compilation we can re-open this one or you can submit a new one as appropriate."}}
{"actor":{"display_login":"nuclearsandwich"}}