developmentseed/node-sqlite3 — Issue #63: Windows: building with node-gyp 0.1.2 fails
Author: cmundi
Created: 2012-02-13 17:17:40+00:00
State: open

From the top:
1. running node0.6.10 installed from MSI
2. npm -g install bindings
3. npm-g install node-gyp // @v0.1.2
4. download fresh copy of the "gyp" branch of node-sqlite3 tarball
5. uppack tarball; unpack sqlite-autoconf-3070800.tar.gz to sqlite3
6. node-gyp clean // ok
7. node-gyp configure // ok
8. node-gyp build // FAIL. See below...

C:\NODEV\modules\node-sqlite3>node-gyp build
info it worked if it ends with ok
spawn msbuild [ 'bindings.sln',
'/clp:Verbosity=minimal',
'/nologo',
'/p:Configuration=Release' ]
MSBUILD : error MSB1009: Project file does not exist.
Switch: bindings.sln
ERR! Error: `msbuild` failed with exit code: 1
at Array.1 (C:\Documents and Settings\cm\Application Data\npm\node_modules\node-gyp\lib\build.js:118:25)
at EventEmitter._tickCallback (node.js:192:40)
ERR! not ok

Note that node-gyp seems to be looking for 'bindings.sln' which does not exist. So was 'node-gyp configure' supposed to create it, or is that the wrong name?

If I rename build.sln (created by node-gyp?) to bindings.sln and then 'node-gyp build' I do get a little farther:

C:\NODEV\modules\node-sqlite3>node-gyp build
info it worked if it ends with ok
spawn msbuild [ 'bindings.sln',
'/clp:Verbosity=minimal',
'/nologo',
'/p:Configuration=Release' ]
database.cc
node_sqlite3.cc
src\database.cc(431): warning C4244: 'argument' : conversion from 'double' to 'int32_t', possible loss of data [C:\NODEV
\modules\node-sqlite3\node_sqlite3.vcxproj]
src\database.cc(476): warning C4244: 'argument' : conversion from 'sqlite3_int64' to 'int32_t', possible loss of data [C
:\NODEV\modules\node-sqlite3\node_sqlite3.vcxproj]
statement.cc
src\statement.cc(278): warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data [C:\NODEV\m
odules\node-sqlite3\node_sqlite3.vcxproj]
src\statement.cc(477): warning C4244: 'argument' : conversion from 'sqlite3_int64' to 'int32_t', possible loss of data [
C:\NODEV\modules\node-sqlite3\node_sqlite3.vcxproj]
src\statement.cc(755): warning C4244: 'argument' : conversion from 'int64_t' to 'double', possible loss of data [C:\NODE
V\modules\node-sqlite3\node_sqlite3.vcxproj]
sqlite3.c
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\NODEV\modu
les\node-sqlite3\Release\node_sqlite3.dll) does not match the Linker's OutputFile property value (C:\NODEV\modules\node-
sqlite3\Release\node_sqlite3.node). This may cause your project to build incorrectly. To correct this, please make sure
that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile). [C:\NODE
V\modules\node-sqlite3\node_sqlite3.vcxproj]
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(991,5): warning MSB8012: TargetExt(.dll) does not
match the Linker's OutputFile property value (.node). This may cause your project to build incorrectly. To correct this
, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.Ou
tputFile). [C:\NODEV\modules\node-sqlite3\node_sqlite3.vcxproj]
LINK : fatal error LNK1181: cannot open input file 'node.lib' [C:\NODEV\modules\node-sqlite3\node_sqlite3.vcxproj]
ERR! Error: `msbuild` failed with exit code: 1
at Array.1 (C:\Documents and Settings\cm\Application Data\npm\node_modules\node-gyp\lib\build.js:118:25)
at EventEmitter._tickCallback (node.js:192:40)
ERR! not ok

FYI, I verify that 'C:\NODEV\modules\node-sqlite3\.node-gyp\0.6\Release\node.lib' exists but this seems not to be the location where node_sqlite3.vcxproj is looking. So if I open up node_sqlite3.vcxproj and grep for the Linkage section I find this:

.node-gyp\0.6\$(Configuration)\node.lib;node.lib;%(AdditionalDependencies)c:\node\Release\lib;c:\node\Release;%(AdditionalLibraryDirectories)truetruetruetrueUseLinkTimeCodeGenerationtrue$(OutDir)node_sqlite3.nodetruetrue

which sure looks like it should be able to resolve C:\NODEV\modules\node-sqlite3\.node-gyp\0.6\Release\node.lib so I am not sure what's going on.