Open jaimecbernardo opened 6 years ago
grpc no longer has the -zdefs
flag, so the workaround isn't needed anymore:
https://github.com/grpc/grpc-node/pull/255
We've received a report that for running correctly on Android 6 devices, the targetSDK and minSDK values have to been increased.
Thank you, @neogeno, for sharing this workaround.
Newer versions of grpc add a node-pre-gyp
name that still isn't patched by the nodejs-mobile
plugins (glibc
), which means it won't be properly loaded in the mobile device environment:
https://github.com/grpc/grpc-node/blob/073dc563858a2d74bd114e5cc50d02203123078f/packages/grpc-native-core/package.json#L54
Current workarounds while this isn't fixed:
{glibc}
part from that line in package.json
.The {libc} error should no longer affect newer releases of the nodejs-mobile
plugin, since it's patched before trying to build the native modules.
While trying to build grpc, the following error my occur:
error: unknown warning option '-Wno-cast-function-type'; did you mean '-Wno-bad-function-cast'? [-Werror,-Wunknown-warning-option]
make: *** [Release/obj.target/grpc_node/ext/byte_buffer.o] Error 1
Deleting -Wno-cast-function-type
from https://github.com/grpc/grpc-node/blob/10a0472f1e205833a86104a79405d4722ad6af35/packages/grpc-native-core/binding.gyp#L965-L969 , which should be within node_modules/grpc/binding.gyp
in the installation
grpc
iOS
grpc builds out of the box for iOS.
Android
For building grpc for Android, you need to remove the
-zdefs
flag from the build process, by deleting this line: https://github.com/grpc/grpc-node/blob/153501df82936348f7544743350abda0978c0bb2/packages/grpc-native-core/binding.gyp#L878-zdefs
does not seem to be accepted by the NDK compiler.