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

Can't use module NodObjC with node-webkit #520

Closed
zippo445 opened this issue Mar 8, 2013 · 6 comments
Closed

Can't use module NodObjC with node-webkit #520

zippo445 opened this issue Mar 8, 2013 · 6 comments

Comments

@zippo445
Copy link

zippo445 commented Mar 8, 2013

I'm trying to use objectiveC node.js binding module NodeObjC https://github.com/TooTallNate/NodObjC with node-webkit on OSX.
it depends on module ffi. I'm using the following command to install ffi 'npm install ffi --arch=ia32 --target=v0.8.17' since node-webkit is 32 bits and based on version v0.8.17 of node.js. but I get a crash when I do 'ffi= require("ffi")' (see error log bellow).

TooTallNate, author of NodeObjC tried to help me out but suggested I bring the issue back here....

any idea how can I solve this? thanks!

error log:

dyld: lazy symbol binding failed: Symbol not found: __ZN2v816FunctionTemplate3NewEPFNS_6HandleINS_5ValueEEERKNS_9ArgumentsEES3_NS1_INS_9SignatureEEE
Referenced from: /Users/philippe/Git/BUBL/src/client/node-wk/nw/node_modules/ffi/node_modules/ref/build/Release/binding.node
Expected in: dynamic lookup

dyld: Symbol not found: __ZN2v816FunctionTemplate3NewEPFNS_6HandleINS_5ValueEEERKNS_9ArgumentsEES3_NS1_INS_9SignatureEEE
Referenced from: /Users/philippe/Git/BUBL/src/client/node-wk/nw/node_modules/ffi/node_modules/ref/build/Release/binding.node
Expected in: dynamic lookup

@rogerwang
Copy link
Member

On Fri, Mar 8, 2013 at 9:39 AM, phil notifications@github.com wrote:

I'm trying to use objectiveC node.js binding module NodeObjC
https://github.com/TooTallNate/NodObjC with node-webkit on OSX.
it depends on module ffi. I'm using the following command to install ffi
'npm install ffi --arch=ia32 --target=v0.8.17' since node-webkit is 32 bits
and based on version v0.8.17 of node.js. but I get a crash when I do 'ffi=
require("ffi")' (see error log bellow).

The native module should be built for node-webkit, see:

https://github.com/rogerwang/node-webkit/wiki/Build-native-modules-with-nw-gyp

Roger

@zippo445
Copy link
Author

zippo445 commented Mar 8, 2013

hello roger, thanks for the reply. I was able to compile ffi with nw-gyp following your instructions but was less successful with NodObjC.

node-ffi seems to be a dependency of NodObjC. so my first shot was to compile node-ffi (with nw-gyp) and then install NodObjC a) manually (doesn't work) b) via npm (doesn't work either. it looks like NodObjC 'includes' its dependencies into its directory in its own node_modules sub-directory... when doing a npm NodObjC, it compiles the modules inside the included node_modules. my second try was to go inside the modules of the node_modules residing inside the NodObjC directory and to compile them with nw-gyp but that doesn't work either (clang: error: no such file or directory: '/Users/philippe/Git/BUBL/src/client/node-wk/nw/node_modules/NodObjC/node_modules/node-ffi/deps/libffi/.libs/libffi.a')

any suggestion on how I should compile nested modules?

I'm a newbie when it comes to nodejs modules and the way they are structured, so I hope the above makes sense to you!.... thanks for your help.

@zippo445
Copy link
Author

zippo445 commented Mar 8, 2013

I finally found my was in the structure of the module. I figured the problem being in some dependencies base on x64 architecture. the author of NodeObjC kindly supplied a fresh-out-of-the-oven version of NodObjC to help me along the way. After a few hours of trial and error, I succeeded in recompiling all but one dependency on i386 architecture. the last dep. is libxmljs that depends on libxml2 and I have a hard time recompiling it with a i386 version of libxml2.... Any chance we could get a x64 version of node-webkit binaries?

@zippo445
Copy link
Author

Abandoned project... will wait until a x64 version of chromium+ nodewebkit is available....

@sdog869
Copy link

sdog869 commented Jan 12, 2014

Zippo did you ever get this to work, it's been 10 months, I notice there is as of yet no 64-bit version of node-webkit, but I thought you might have found another way? Thanks!

@zippo445
Copy link
Author

nope. I abandoned the idea to bind with objective-C altogether...

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

3 participants