Skip to content
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

grpc - build workaround #2

Open
jaimecbernardo opened this issue Feb 28, 2018 · 5 comments
Open

grpc - build workaround #2

jaimecbernardo opened this issue Feb 28, 2018 · 5 comments

Comments

@jaimecbernardo
Copy link
Collaborator

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.

@jaimecbernardo jaimecbernardo changed the title grpc grpc - build instructions workaround Feb 28, 2018
@jaimecbernardo jaimecbernardo changed the title grpc - build instructions workaround grpc - build workaround Feb 28, 2018
@jaimecbernardo
Copy link
Collaborator Author

grpc no longer has the -zdefs flag, so the workaround isn't needed anymore:
grpc/grpc-node#255

@jaimecbernardo
Copy link
Collaborator Author

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.

@jaimecbernardo
Copy link
Collaborator Author

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:

  • Removing the {glibc} part from that line in package.json.

@jaimecbernardo
Copy link
Collaborator Author

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.

@jaimecbernardo
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant