You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I am working on compiling ROS2 nodes to WebAssembly using Emscripten so that I can simulate robot control software in the browser. For the most part, this is going smoothly so far but there are a couple warnings that I think should be addressed:
It seems when I compile using Clang/Emscripten, none of the #ifdefs are matching my configuration in rcutils_get_platform_library_name, which is a bit unusual since I was under the impression that Emscripten defines __LINUX__ (uppercase). I will investigate this, however, there is also the possibility of checking whether __EMSCRIPTEN__ has been defined.
rcutils/src/strerror.c:32:10: warning: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' [-Wint-conversion]
This warning seems very similar to the previous one. It seems again that conditional compilation has gone down the wrong path since the version strerror_r that comes with Emscripten's C standard library returns an int instead of a char*.
For reference, I am using the Emscripten 3.1.0 (Clang 14.0.0) with the following colcon mixin:
Note: Emscripten does support dynamic linking (with so or wasm as the recommended extension), however, it is still a bit strange that shared_library.c is getting compiled at all when BUILD_SHARED_LIBS=OFF...
For point 2, rcutils_strerror does have a conditional branch that deals with the XSI-compliant strerror_r signature (second signature), but I think conditional compilation went down the wrong path here too.
Hi! I am working on compiling ROS2 nodes to WebAssembly using Emscripten so that I can simulate robot control software in the browser. For the most part, this is going smoothly so far but there are a couple warnings that I think should be addressed:
rcutils_get_platform_library_name
It seems when I compile using Clang/Emscripten, none of the
#ifdef
s are matching my configuration inrcutils_get_platform_library_name
, which is a bit unusual since I was under the impression that Emscripten defines__LINUX__
(uppercase). I will investigate this, however, there is also the possibility of checking whether__EMSCRIPTEN__
has been defined.rcutils_strerror
This warning seems very similar to the previous one. It seems again that conditional compilation has gone down the wrong path since the version
strerror_r
that comes with Emscripten's C standard library returns anint
instead of achar*
.For reference, I am using the Emscripten 3.1.0 (Clang 14.0.0) with the following colcon mixin:
The text was updated successfully, but these errors were encountered: