r8k / sparrow.js

Light & Simple, Apigee JavaScript adapter, for using with test frameworks, on your local machine !!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sparrow's dependencies not compiling on windows

Mattzr opened this issue · comments

Hi,

Sparrow seems to work fine on mac/linux machine but not on windows. Indeed when running npm to install my package, sparrow.js sub dependency "httpsync" runs some script to compile cUrl (for synchronous request).
The cUrl being compiled is unix specific. I am getting an error upon compiling - the build fails because of unistd.h or sys/socket.h don't exist.

It works fine on mac though (it requires gcc installed by the way (and python for windows)).

Could you please help with this (at least confirm this is not meant to work with windows ?) We want to cover all our javascript policies with a cross-platform setup.

I tried with both minw-get and cygwin.

Cheers,
Amath SARR

Hi @Mattzr ,
Unfortunately, I did not have a Windows instance to test this through. I'm looking at this, and expect to provide you an update shortly.

Hi @Mattzr ,
I've added windows support. Please let me know, how it goes. Again, thanks for using Sparrow.

Sorry for the confusion, some tests are breaking. I'm fixing them.

@Mattzr ,
This should work for you now on Windows. Do let me know for any questions.

@Mattzr - How is it going?

@r8k - thanks for your quick reply and fix. I have to get back my windows machine this morning and I will let you know how it goes.

@r8k : Still having some issue upon curl compilation below stack trace:

build.sh: line 8: make: command not found
gyp info it worked if it ends with ok
gyp info using node-gyp@1.0.1
gyp info using node@0.10.33 | win32 | x64
gyp info spawn python
gyp info spawn args [ 'c:\Program Files\nodejs\node_modules\npm\node_module
s\node-gyp\gyp\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=auto',
gyp info spawn args '-I',
gyp info spawn args 'c:\Users\b8903866\workspace\store-api\node_modules
unit-test-module\node_modules\sparrow.js\node_modules\httpsync\build\confi
g.gypi',
gyp info spawn args '-I',
gyp info spawn args 'c:\Program Files\nodejs\node_modules\npm\node_module
s\node-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'c:\Users\b8903866.node-gyp\0.10.33\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=c:\Users\b8903866.node-gyp\0.10.33',

gyp info spawn args '-Dmodule_root_dir=c:\Users\b8903866\workspace\store-a
pi\node_modules\unit-test-module\node_modules\sparrow.js\node_modules\http
sync',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'c:\Users\b8903866\workspace\store-api\node_modules
unit-test-module\node_modules\sparrow.js\node_modules\httpsync\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args '/clp:Verbosity=minimal',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64' ]
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
main.cc
curl.cc
request.cc
c:\users\b8903866\workspace\store-api\node_modules\unit-test-module\node_module
s\sparrow.js\node_modules\httpsync\deps\curl\include\curl\curlbuild.h(152): fat
al error C1083: Cannot open include file: 'sys/socket.h': No such file or direc
tory (..\src\curl.cc) [c:\Users\b8903866\workspace\store-api\node_modules\unit-
test-module\node_modules\sparrow.js\node_modules\httpsync\build\node_curl.vcxpr
oj]
c:\users\b8903866\workspace\store-api\node_modules\unit-test-module\node_module
s\sparrow.js\node_modules\httpsync\deps\curl\include\curl\curlbuild.h(152): fat
al error C1083: Cannot open include file: 'sys/socket.h': No such file or direc
tory (..\src\main.cc) [c:\Users\b8903866\workspace\store-api\node_modules\unit-
test-module\node_modules\sparrow.js\node_modules\httpsync\build\node_curl.vcxpr
oj]
c:\users\b8903866\workspace\store-api\node_modules\unit-test-module\node_module
s\sparrow.js\node_modules\httpsync\deps\curl\include\curl\curlbuild.h(152): fat
al error C1083: Cannot open include file: 'sys/socket.h': No such file or direc
tory (..\src\request.cc) [c:\Users\b8903866\workspace\store-api\node_modules\un
it-test-module\node_modules\sparrow.js\node_modules\httpsync\build\node_curl.vc
xproj]

Apparently there is a grunt apigee plugin for build and deployment lifecycle management as part of a grunt plugin. I will give it a go but the windows "npm install" failure is still happening on my windows machine.

Hi @Mattzr - Can you paste your npm install command here? and also your package.json?

Also, @Mattzr - You probably have not installed make. Please refer to: http://www.cmake.org/download/ and install make, after which you should not be having any problem.

@Mattzr - any updates?