jean-airoldie / zeromq-src-rs

Source code and logic to build ZeroMQ from source
MIT License
11 stars 14 forks source link

Define `strlcpy()` to be available on Android targets #20

Closed MarijnS95 closed 2 years ago

MarijnS95 commented 2 years ago
zeromq-src-rs-0f53d1812b0afc70/ad5010b/vendor/src/compat.hpp:45:1: error: static declaration of 'strlcpy' follows non-static declaration
strlcpy (char *dest_, const char *src_, const size_t dest_size_)
^
Android/Sdk/ndk/25.0.8151533/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/string.h:146:8: note: previous declaration is here
size_t strlcpy(char* __dst, const char* __src, size_t __n);
       ^

This definition has been traced back to at least NDK 19.2.

jean-airoldie commented 2 years ago

Thanks, I guess that's what I get for not having an android CI build.

jean-airoldie commented 2 years ago

I'll do a new release.

MarijnS95 commented 2 years ago

@jean-airoldie I personally still feel like partially blaming not having cmake's check_cxx_symbol_exists tools in Rust (and/or in this crate) but instead co-maintaining this pretty-much-parallel CMakeLists.txt implementation. But we can't have our cake and eat it too, at least for the time being.

MarijnS95 commented 2 years ago

Setting up an Android build in GH CI is quite straightforward when cargo-apk/ndk is used, their virtual environment ships with the NDK.

jean-airoldie commented 2 years ago

Alright, I'll look into it, thanks.