Update sqlite to 3.7.5 and fix deps #28

Open
wants to merge 3 commits into
from

Projects

None yet

1 participant

@BillBarnhill

I'm on Mac OS X, which ships with an older version of sqlite. Because the include in the node-sqlite file src/database.h is global the older version was being pulled in, causing the following error:

Signal:node-sqlite $ node-waf build
Waf: Entering directory `/Users/wolf/MyContribs2011/node-sqlite/build'
make: Nothing to be done for `all'.
[1/6] cc: deps/sqlite/sqlite3.c -> build/default/deps/sqlite/sqlite3_1.o
[2/6] cxx: src/sqlite3_bindings.cc -> build/default/src/sqlite3_bindings_2.o
[3/6] cxx: src/database.cc -> build/default/src/database_2.o
[4/6] cxx: src/statement.cc -> build/default/src/statement_2.o
../src/database.h:95: error: ‘sqlite3_int64’ does not name a type
../src/database.h:95: error: ‘sqlite3_int64’ does not name a type
../src/database.h:95: error: ‘sqlite3_int64’ does not name a type
../src/database.cc: In static member function ‘static int Database::EIO_Open(eio_req*)’:
../src/database.cc:97: error: ‘SQLITE_OPEN_READWRITE’ was not declared in this scope
../src/database.cc:98: error: ‘SQLITE_OPEN_CREATE’ was not declared in this scope
../src/database.cc:99: error: ‘SQLITE_OPEN_FULLMUTEX’ was not declared in this scope
../src/database.cc:100: error: ‘sqlite3_open_v2’ was not declared in this scope
../src/database.cc: In static member function ‘static int Database::EIO_AfterPrepareAndStep(eio_req*)’:
../src/database.cc:261: error: ‘struct prepare_request’ has no member named ‘lastInsertId’
../src/database.cc: In static member function ‘static int Database::EIO_PrepareAndStep(eio_req*)’:
../src/database.cc:335: error: ‘struct prepare_request’ has no member named ‘lastInsertId’
../src/database.cc:340: error: ‘struct prepare_request’ has no member named ‘lastInsertId’
../src/database.cc: In static member function ‘static int Database::EIO_Prepare(eio_req*)’:
../src/database.cc:434: error: ‘struct prepare_request’ has no member named ‘lastInsertId’
../src/database.cc:439: error: ‘struct prepare_request’ has no member named ‘lastInsertId’
../deps/sqlite/sqlite3.c: In function ‘proxyGetHostID’:
../deps/sqlite/sqlite3.c:28396: warning: unused variable ‘timeout’
Waf: Leaving directory `/Users/wolf/MyContribs2011/node-sqlite/build'
Build failed:
-> task failed (err #1): 
    {task: cxx sqlite3_bindings.cc -> sqlite3_bindings_2.o}
-> task failed (err #1): 
    {task: cxx database.cc -> database_2.o}
-> task failed (err #1): 
    {task: cxx statement.cc -> statement_2.o}

So this branch contains a change to database.h so the include is relative, using the path to sqlite.h under deps.

Also, I noticed that the sqlite dependency is older than 3.7.5 and the sqlite folks recommend upgrading to 3.7.5 and I couldn't tell which version of sqlite was there, except that it wasn't the same as 3.7.5, so I updated the sqlite files and renamed sqlite to show which version was current. To reflect this I also updated the paths in wscript to use a SQLITE variable that points to the sqlite sub-dir of deps.

Please feel free to contact me via Skype (Bill.Barnhill), or email (w.a.barnhill@gmail).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment