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

pkcs11js - build workaround #4

Open
Vanclief opened this issue Oct 17, 2018 · 3 comments
Open

pkcs11js - build workaround #4

Vanclief opened this issue Oct 17, 2018 · 3 comments

Comments

@Vanclief
Copy link

Vanclief commented Oct 17, 2018

pkcs11js

iOS
The package has multiple throw exceptions, so for now the only available option is to allow CPP_EXCEPTIONS in the common.gypi

This is the line you should change:
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', # -fno-exceptions

Android

The package was not linking successfuly when paired with grpc. I needed to add a -fPIC flag in the cflags for common.gypi. Added 'cflags': [ '-O3', '-fPIC'] in line 173.

@jaimecbernardo
Copy link
Collaborator

Thank you for sharing this workaround. Another way of doing this would be to create a section for 'OS=="ios"' similar to the one for 'OS=="mac"' in pkcs11js's binding.gyp file:
https://github.com/PeculiarVentures/pkcs11js/blob/f6f46336994f3b7cc04a9714717bc9ba32ee0c4f/binding.gyp#L32-L43

@Vanclief
Copy link
Author

Updated thread, I created a PR for this repo with my workaround for Android: JaneaSystems/nodejs-mobile#137

@jaimecbernardo
Copy link
Collaborator

jaimecbernardo commented Dec 18, 2018

For this issue, a change to add -fPIC was added to nodejs-mobile-gyp: JaneaSystems/nodejs-mobile-gyp@fa19d39

This change was included with nodejs-mobile-gyp version 0.2.1

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

2 participants