Open Vanclief opened 6 years ago
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
Updated thread, I created a PR for this repo with my workaround for Android: https://github.com/janeasystems/nodejs-mobile/pull/137
For this issue, a change to add -fPIC
was added to nodejs-mobile-gyp
: https://github.com/janeasystems/nodejs-mobile-gyp/commit/fa19d39733f08cf121479de8a0a6985ebc815e8a
This change was included with nodejs-mobile-gyp
version 0.2.1
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 forcommon.gypi
. Added'cflags': [ '-O3', '-fPIC']
in line 173.