Hi Nathan

So it *does* look like that function gets exported in the node 
> executable. I'm assuming this comes from OpenSSL, which gets 
> statically linked to the binary: 
>
>   $ nm `which node` | grep SHA256_Update 
>   00000001000df69f T _SHA256_Update 
>

That makes sense.  Didn't know about nm, thanks!
 

>
> > I have heard about node_g, yet I can't find any source to obtain it. 
> Please 
> > can someone tell me where to get it? 
>
> You must compile a "debug" build of node: 
>
>   $ configure --debug && make 
>
> After that it will be in the root of the node source code directory. 
>

Again, thanks.
 

>
> > Scrypt is authored in C, so should I create a `static_library` in gyp, 
> or 
> > should I compile it together with my main addon file. 
>
> Personally, I'd recommend writing a dedicated gyp file for the scrypt 
> library (so using "static_library"). I wrote a blog article detailing 
> how to do this: http://n8.io/converting-a-c-library-to-gyp/ 
>

Yup, I read your blog post. Thanks a lot for making such an awesome post. I 
will definitely head that route eventually, I just want to get a quick win 
first.
 

>
> > I am forced to wrap my header file for scrypt in `extern "c"` for 
> correctly 
> > linking. This is correct, isn't it? 
>
> Not *totally* positive but I believe this is correct. Ben or someone 
> else can probably clarify. 
>

Who is Ben? I take it he is a guru :)
 

>
> > How can I ensure that the correct `SHA256_Update` is executed. And if 
> this 
> > is not being executed, what is? 
>
> So this is kinda the tough problem right? Since you have control over 
> the scrypt code at this point, you could rename that particular 
> function since it seems to be incompatible with the SHA256_Update in 
> the node binary. Again, one of the more experienced C guys can 
> probably come up with a better solution for that particular problem. 
>

Yeah, I suppose I can do this, but this seems to me very inelegant. 

>
> Cheers! 
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to