[Architecture] FFI installation

Boyan Sheytanov bsheytanov at asteasolutions.com
Fri Aug 17 11:19:22 EDT 2012


Evgeni,

Thanks for the instructions! I'd like to add a minor correction - the
documentation
of mozilla-build<https://developer.mozilla.org/en-US/docs/Developer_Guide/Build_Instructions/Windows_Prerequisites>
states
that "Even if you are on 64-bit Windows, do not use the start-msvcX-x64.bat
files (unless you know what you're doing). Those files are experimental and
unsupported." This means that on step 3 you should always use the 32-bit
.bat file.

Best,
Boyan

On Fri, Aug 17, 2012 at 6:08 PM, Evgeni Tsakov
<etsakov at asteasolutions.com>wrote:

>     Hi everyone,
>
>     During the last architecture meeting Antranig complained that he
> couldn't manage to install ffi and we were considering to move to node
> C/C++ Addons. The last two days I tried to familiarize myself with the node
> extensions and came to an interesting (and I think a serious) problem. Once
> the C code is written, it needs to be compiled into a node module using
> node-gyp. I followed the tutorial on http://nodejs.org/api/addons.htmland it worked well. The module compiled and was completely operational.
> However, if you add "#include <windows.h>", "node-gyp build" fails to
> compile that library (note that this was done on Windows). I searched the
> Internet for a solution but without any luck.
>
>     Now, a note about ffi. I cloned my virtual machine in order to try
> installing ffi again and i succeeded. I am using Windows 7, 32-bit within
> VirtualBox. I followed the steps bellow:
>
> 1. Install node.js v0.8.7
>     32-bit nodejs.org/dist/v0.8.7/node-v0.8.7-x86.msi
>     64-bit nodejs.org/dist/v0.8.7/x64/node-v0.8.7-x64.msi
>
> 2. Install node-gyp
>     Python (v2.7.2 recommended, v3.x.x not yet supported)
>     Microsoft Visual C++ 2010 (Express version works well)
>     for 64-bit builds - Windows 7 64-bit SDK
> http://www.microsoft.com/en-us/download/details.aspx?displayLang=en&id=8279
>     npm install -g node-gyp (right click cmd.exe -> Run as administrator)
>
> 3. Install ffi
>     Mozilla Build
> http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe
>
>     open "start-msvc10.bat" (or "start-msvc10-x64.bat" for 64-bit version)
> and write:
>     PATH=$PATH:"node_dir" where node_dir is your nodejs installation
> directory (default is C:/Program Files/nodejs)
>     npm install ffi ref ref-struct
>
> In the code you will have to change require("node-ffi") to require("ffi")
> Hope it works for you.
>
> Rock on,
> Evgeni
>
>
> *The information in this e-mail and any accompanying files is intended
> only for the recipients named above. This message may contain CONFIDENTIAL
> INFORMATION THAT IS LEGALLY PRIVILEGED. If you are not an intended
> recipient, you may not download, copy, disseminate, distribute or use in
> any way the information in this e-mail. Any of these actions can be a
> criminal offense. If you have received this e-mail in error, please notify Astea
> Solutions AD immediately by reply e-mail, and delete this e-mail and any
> copies of it.*
>
> _______________________________________________
> Architecture mailing list
> Architecture at lists.gpii.net
> http://lists.gpii.net/cgi-bin/mailman/listinfo/architecture
>
>


-- 
Boyan Sheytanov
Lead Systems Engineer
Astea Solutions AD
www.asteasolutions.com

-- 
*The information in this e-mail and any accompanying files is intended only 
for the recipients named above. This message may contain CONFIDENTIAL 
INFORMATION THAT IS LEGALLY PRIVILEGED. If you are not an intended 
recipient, you may not download, copy, disseminate, distribute or use in 
any way the information in this e-mail. Any of these actions can be a 
criminal offense. If you have received this e-mail in error, please notify Astea 
Solutions AD immediately by reply e-mail, and delete this e-mail and any 
copies of it.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gpii.net/pipermail/architecture/attachments/20120817/5254b917/attachment.html>


More information about the Architecture mailing list