Tuesday, September 29, 2015

Rebuilding the DB2 node modules failed with "sqlcli1.h: No such file or directory"

Problem: 
Rebuilding the DB2 node modules failed with "sqlcli1.h: No such file or directory"

Logs:
# node -v
v0.12.1

[root@ibm_db]# node-gyp build
gyp info it worked if it ends with ok
gyp info using node-gyp@1.0.2
gyp info using node@0.12.1 | linux | x64
child_process: customFds option is deprecated, use stdio instead.
make: Entering directory `/db2_node/node_modules/ibm_db/build'
gyp info  ACTION Regenerating Makefile
 spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Leaving directory `/db2_node/node_modules/ibm_db/build'
make: Entering directory `/db2_node/node_modules/ibm_db/build'
  CXX(target) Release/obj.target/odbc_bindings/src/odbc_connection.o
In file included from ../src/odbc_connection.cpp:25:
../src/odbc.h:30:21: warning: sqlcli1.h: No such file or directory
In file included from ../src/odbc_connection.cpp:25:
../src/odbc.h:50: error: âSQLLENâ does not name a type
../src/odbc.h:51: error: âSQLUSMALLINTâ does not name a type
../src/odbc.h:55: error: âSQLSMALLINTâ does not name a type
../src/odbc.h:56: error: âSQLSMALLINTâ does not name a type
../src/odbc.h:57: error: âSQLLENâ does not name a type
../src/odbc.h:59: error: âSQLLENâ does not name a type
../src/odbc.h:60: error: âSQLLENâ does not name a type
../src/odbc.h:61: error: âSQLSMALLINTâ does not name a type
../src/odbc.h:71: error: expected â;â before â(â token
../src/odbc.h:73: error: âSQLHSTMTâ has not been declared
../src/odbc.h:74: error: âSQLHSTMTâ has not been declared
In file included from ../src/odbc_connection.cpp:25:
../src/odbc.h:75: error: âSQLHSTMTâ has not been declared
../src/odbc.h:76: error: âSQLSMALLINTâ has not been declared
../src/odbc.h:76: error: âSQLHANDLEâ has not been declared
../src/odbc.h:77: error: âSQLSMALLINTâ has not been declared
../src/odbc.h:77: error: âSQLHANDLEâ has not been declared
../src/odbc.h:78: error: âSQLSMALLINTâ has not been declared
../src/odbc.h:78: error: âSQLHANDLEâ has not been declared
../src/odbc.h:79: error: âSQLSMALLINTâ has not been declared
../src/odbc.h:79: error: âSQLHANDLEâ has not been declared
../src/odbc.h:80: error: âSQLHENVâ has not been declared
../src/odbc.h:80: error: âSQLHDBCâ has not been declared
../src/odbc.h:80: error: âSQLHSTMTâ has not been declared
../src/odbc.h:108: error: âSQLHENVâ does not name a type
../src/odbc.h:114: error: âSQLHDBCâ does not name a type
../src/odbc.h:134: error: âSQLHSTMTâ does not name a type
In file included from ../src/odbc_connection.cpp:26:
../src/odbc_connection.h:37: error: expected â)â before âhENVâ
../src/odbc_connection.h:97: error: âSQLRETURNâ does not name a type
../src/odbc_connection.h:103: error: âSQLHENVâ does not name a type
../src/odbc_connection.h:104: error: âSQLHDBCâ does not name a type
../src/odbc_connection.h:105: error: âSQLUSMALLINTâ does not name a type
../src/odbc_connection.h:109: error: âSQLUINTEGERâ does not name a type
../src/odbc_connection.h:115: error: âSQLHSTMTâ does not name a type
../src/odbc_connection.h:122: error: âSQLHSTMTâ does not name a type
In file included from ../src/odbc_connection.cpp:27:
../src/odbc_result.h:33: error: expected â)â before âhENVâ
../src/odbc_result.h:68: error: âSQLRETURNâ does not name a type
../src/odbc_result.h:80: error: âSQLHENVâ does not name a type
../src/odbc_result.h:81: error: âSQLHDBCâ does not name a type
../src/odbc_result.h:82: error: âSQLHSTMTâ does not name a type
In file included from ../src/odbc_connection.cpp:28:
../src/odbc_statement.h:32: error: expected â)â before âhENVâ
../src/odbc_statement.h:75: error: âSQLRETURNâ does not name a type
../src/odbc_statement.h:81: error: âSQLHENVâ does not name a type
../src/odbc_statement.h:82: error: âSQLHDBCâ does not name a type
../src/odbc_statement.h:83: error: âSQLHSTMTâ does not name a type
../src/odbc_connection.cpp: In member function âvoid ODBCConnection::Free()â:
../src/odbc_connection.cpp:91: error: âm_hDBCâ was not declared in this scope
../src/odbc_connection.cpp:95: error: âSQLDisconnectâ was not declared in this scope
../src/odbc_connection.cpp:96: error: âSQL_HANDLE_DBCâ was not declared in this scope
../src/odbc_connection.cpp:96: error: âSQLFreeHandleâ was not declared in this scope
../src/odbc_connection.cpp: In static member function âstatic void ODBCConnection::New(const v8::FunctionCallbackInfo<v8::Value>&)â:
../src/odbc_connection.cpp:115: error: âSQLHENVâ was not declared in this scope
../src/odbc_connection.cpp:115: error: expected â;â before âhENVâ
../src/odbc_connection.cpp:116: error: âSQLHDBCâ was not declared in this scope
../src/odbc_connection.cpp:116: error: expected â;â before âhDBCâ
../src/odbc_connection.cpp:118: error: âhENVâ was not declared in this scope
../src/odbc_connection.cpp:118: error: âhDBCâ was not declared in this scope
../src/odbc_connection.cpp: In static member function âstatic void ODBCConnection::LoginTimeoutGetter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>&)â:
../src/odbc_connection.cpp:159: error: âclass ODBCConnectionâ has no member named âloginTimeoutâ
../src/odbc_connection.cpp:159: error: return-statement with a value, in function returning 'void'
../src/odbc_connection.cpp: In static member function âstatic void ODBCConnection::UV_Open(uv_work_t*)â:
../src/odbc_connection.cpp:233: error: âSQLINTEGERâ was not declared in this scope
../src/odbc_connection.cpp:233: error: expected â;â before âbufâ
../src/odbc_connection.cpp:238: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:239: error: âSQL_ATTR_LOGIN_TIMEOUTâ was not declared in this scope
../src/odbc_connection.cpp:240: error: âSQLPOINTERâ was not declared in this scope
../src/odbc_connection.cpp:241: error: âSQLSetConnectAttrâ was not declared in this scope
../src/odbc_connection.cpp:244: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:244: error: âSQL_ATTR_ENLIST_IN_XAâ was not declared in this scope
../src/odbc_connection.cpp:244: error: âSQLPOINTERâ was not declared in this scope
../src/odbc_connection.cpp:244: error: âbufâ was not declared in this scope
../src/odbc_connection.cpp:244: error: âSQLSetConnectAttrâ was not declared in this scope
../src/odbc_connection.cpp:249: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:251: error: âSQLTCHARâ was not declared in this scope
../src/odbc_connection.cpp:251: error: expected primary-expression before â)â token
../src/odbc_connection.cpp:256: error: âSQL_DRIVER_NOPROMPTâ was not declared in this scope
../src/odbc_connection.cpp:256: error: âSQLDriverConnectâ was not declared in this scope
../src/odbc_connection.cpp:259: error: âSQL_SUCCEEDEDâ was not declared in this scope
../src/odbc_connection.cpp:260: error: âSQLHSTMTâ was not declared in this scope
../src/odbc_connection.cpp:260: error: expected â;â before âhStmtâ
../src/odbc_connection.cpp:263: error: âSQL_HANDLE_STMTâ was not declared in this scope
../src/odbc_connection.cpp:263: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:263: error: âhStmtâ was not declared in this scope
../src/odbc_connection.cpp:263: error: âSQLAllocHandleâ was not declared in this scope
../src/odbc_connection.cpp:268: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:269: error: âSQL_API_SQLMORERESULTSâ was not declared in this scope
../src/odbc_connection.cpp:270: error: âclass ODBCConnectionâ has no member named âcanHaveMoreResultsâ
../src/odbc_connection.cpp:270: error: âSQLGetFunctionsâ was not declared in this scope
../src/odbc_connection.cpp:273: error: âclass ODBCConnectionâ has no member named âcanHaveMoreResultsâ
../src/odbc_connection.cpp:277: error: âSQLFreeHandleâ was not declared in this scope
../src/odbc_connection.cpp: In static member function âstatic void ODBCConnection::UV_AfterOpen(uv_work_t*, int)â:
../src/odbc_connection.cpp:298: error: âSQL_HANDLE_DBCâ was not declared in this scope
../src/odbc_connection.cpp:298: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp: In static member function âstatic void ODBCConnection::OpenSync(const v8::FunctionCallbackInfo<v8::Value>&)â:
../src/odbc_connection.cpp:346: error: âSQLRETURNâ was not declared in this scope
../src/odbc_connection.cpp:346: error: expected â;â before âretâ
../src/odbc_connection.cpp:366: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:367: error: âSQL_ATTR_LOGIN_TIMEOUTâ was not declared in this scope
../src/odbc_connection.cpp:368: error: âSQLPOINTERâ was not declared in this scope
../src/odbc_connection.cpp:369: error: âSQLSetConnectAttrâ was not declared in this scope
../src/odbc_connection.cpp:371: error: invalid use of member (did you forget the â&â ?)
../src/odbc_connection.cpp:371: error: base operand of â->â is not a pointer
../src/odbc_connection.cpp:371: error: âSQL_ATTR_ENLIST_IN_XAâ was not declared in this scope
../src/odbc_connection.cpp:371: error: âSQLPOINTERâ was not declared in this scope
../src/odbc_connection.cpp:371: error: âbufâ was not declared in this scope
../src/odbc_connection.cpp:371: error: âSQLSetConnectAttrâ was not declared in this scope
../src/odbc_connection.cpp:375: error: âretâ was not declared in this scope
../src/odbc_connection.cpp:376: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:378: error: âSQLTCHARâ was not declared in this scope
../src/odbc_connection.cpp:378: error: expected primary-expression before â)â token
../src/odbc_connection.cpp:383: error: âSQL_DRIVER_NOPROMPTâ was not declared in this scope
../src/odbc_connection.cpp:383: error: âSQLDriverConnectâ was not declared in this scope
../src/odbc_connection.cpp:385: error: âSQL_SUCCEEDEDâ was not declared in this scope
../src/odbc_connection.cpp:388: error: âSQL_HANDLE_DBCâ was not declared in this scope
../src/odbc_connection.cpp:388: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:391: error: âSQLHSTMTâ was not declared in this scope
../src/odbc_connection.cpp:391: error: expected â;â before âhStmtâ
../src/odbc_connection.cpp:394: error: âSQL_HANDLE_STMTâ was not declared in this scope
../src/odbc_connection.cpp:394: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:394: error: âhStmtâ was not declared in this scope
../src/odbc_connection.cpp:394: error: âSQLAllocHandleâ was not declared in this scope
../src/odbc_connection.cpp:399: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:400: error: âSQL_API_SQLMORERESULTSâ was not declared in this scope
../src/odbc_connection.cpp:401: error: âclass ODBCConnectionâ has no member named âcanHaveMoreResultsâ
../src/odbc_connection.cpp:401: error: âSQLGetFunctionsâ was not declared in this scope
../src/odbc_connection.cpp:404: error: âclass ODBCConnectionâ has no member named âcanHaveMoreResultsâ
../src/odbc_connection.cpp:408: error: âSQLFreeHandleâ was not declared in this scope
../src/odbc_connection.cpp: In static member function âstatic void ODBCConnection::CreateStatementSync(const v8::FunctionCallbackInfo<v8::Value>&)â:
../src/odbc_connection.cpp:557: error: âSQLHSTMTâ was not declared in this scope
../src/odbc_connection.cpp:557: error: expected â;â before âhSTMTâ
../src/odbc_connection.cpp:562: error: âSQL_HANDLE_STMTâ was not declared in this scope
../src/odbc_connection.cpp:563: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:564: error: âhSTMTâ was not declared in this scope
../src/odbc_connection.cpp:564: error: âSQLAllocHandleâ was not declared in this scope
../src/odbc_connection.cpp:569: error: âclass ODBCConnectionâ has no member named âm_hENVâ
../src/odbc_connection.cpp:570: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp: In static member function âstatic void ODBCConnection::UV_CreateStatement(uv_work_t*)â:
../src/odbc_connection.cpp:629: error: âSQL_HANDLE_STMTâ was not declared in this scope
../src/odbc_connection.cpp:630: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:631: error: âstruct create_statement_work_dataâ has no member named âhSTMTâ
../src/odbc_connection.cpp:631: error: âSQLAllocHandleâ was not declared in this scope
../src/odbc_connection.cpp: In static member function âstatic void ODBCConnection::UV_AfterCreateStatement(uv_work_t*, int)â:
../src/odbc_connection.cpp:655: error: âclass ODBCConnectionâ has no member named âm_hENVâ
../src/odbc_connection.cpp:656: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:657: error: âstruct create_statement_work_dataâ has no member named âhSTMTâ
../src/odbc_connection.cpp: In static member function âstatic void ODBCConnection::UV_Query(uv_work_t*)â:
../src/odbc_connection.cpp:815: error: âSQLRETURNâ was not declared in this scope
../src/odbc_connection.cpp:815: error: expected â;â before âretâ
../src/odbc_connection.cpp:820: error: âSQL_HANDLE_STMTâ was not declared in this scope
../src/odbc_connection.cpp:821: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:822: error: âstruct query_work_dataâ has no member named âhSTMTâ
../src/odbc_connection.cpp:822: error: âSQLAllocHandleâ was not declared in this scope
../src/odbc_connection.cpp:829: error: âretâ was not declared in this scope
../src/odbc_connection.cpp:830: error: âstruct query_work_dataâ has no member named âhSTMTâ
../src/odbc_connection.cpp:831: error: âSQLTCHARâ was not declared in this scope
../src/odbc_connection.cpp:831: error: expected primary-expression before â)â token
../src/odbc_connection.cpp:832: error: âSQLExecDirectâ was not declared in this scope
../src/odbc_connection.cpp:836: error: âretâ was not declared in this scope
../src/odbc_connection.cpp:837: error: âstruct query_work_dataâ has no member named âhSTMTâ
../src/odbc_connection.cpp:838: error: âSQLTCHARâ was not declared in this scope
../src/odbc_connection.cpp:838: error: expected primary-expression before â)â token
../src/odbc_connection.cpp:839: error: âSQLPrepareâ was not declared in this scope
../src/odbc_connection.cpp:841: error: âSQL_SUCCESSâ was not declared in this scope
../src/odbc_connection.cpp:841: error: âSQL_SUCCESS_WITH_INFOâ was not declared in this scope
../src/odbc_connection.cpp:851: error: âstruct query_work_dataâ has no member named âhSTMTâ
../src/odbc_connection.cpp:853: error: âSQL_PARAM_INPUTâ was not declared in this scope
../src/odbc_connection.cpp:854: error: âstruct Parameterâ has no member named âc_typeâ
../src/odbc_connection.cpp:855: error: âstruct Parameterâ has no member named âtypeâ
../src/odbc_connection.cpp:856: error: âstruct Parameterâ has no member named âsizeâ
../src/odbc_connection.cpp:857: error: âstruct Parameterâ has no member named âdecimalsâ
../src/odbc_connection.cpp:859: error: âstruct Parameterâ has no member named âbuffer_lengthâ
../src/odbc_connection.cpp:861: error: âstruct Parameterâ has no member named âlengthâ
../src/odbc_connection.cpp:861: error: âSQLBindParameterâ was not declared in this scope
../src/odbc_connection.cpp:863: error: âSQL_ERRORâ was not declared in this scope
../src/odbc_connection.cpp:866: error: âSQL_SUCCEEDEDâ was not declared in this scope
../src/odbc_connection.cpp:867: error: âstruct query_work_dataâ has no member named âhSTMTâ
../src/odbc_connection.cpp:867: error: âSQLExecuteâ was not declared in this scope
../src/odbc_connection.cpp:873: error: âretâ was not declared in this scope
../src/odbc_connection.cpp: In static member function âstatic void ODBCConnection::UV_AfterQuery(uv_work_t*, int)â:
../src/odbc_connection.cpp:887: error: âSQL_ERRORâ was not declared in this scope
../src/odbc_connection.cpp:894: error: âSQL_HANDLE_STMTâ was not declared in this scope
../src/odbc_connection.cpp:894: error: âstruct query_work_dataâ has no member named âhSTMTâ
../src/odbc_connection.cpp:894: error: âSQLFreeHandleâ was not declared in this scope
../src/odbc_connection.cpp:908: error: âclass ODBCConnectionâ has no member named âm_hENVâ
../src/odbc_connection.cpp:909: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:910: error: âstruct query_work_dataâ has no member named âhSTMTâ
../src/odbc_connection.cpp:917: error: âSQL_HANDLE_STMTâ was not declared in this scope
../src/odbc_connection.cpp:917: error: âstruct query_work_dataâ has no member named âhSTMTâ
../src/odbc_connection.cpp:939: error: âstruct Parameterâ has no member named âc_typeâ
../src/odbc_connection.cpp:940: error: âSQL_C_WCHARâ was not declared in this scope
../src/odbc_connection.cpp:941: error: âSQL_C_CHARâ was not declared in this scope
../src/odbc_connection.cpp:942: error: âSQL_C_LONGâ was not declared in this scope
../src/odbc_connection.cpp:943: error: âSQL_C_DOUBLEâ was not declared in this scope
../src/odbc_connection.cpp:944: error: âSQL_C_BITâ was not declared in this scope
../src/odbc_connection.cpp: In static member function âstatic void ODBCConnection::QuerySync(const v8::FunctionCallbackInfo<v8::Value>&)â:
../src/odbc_connection.cpp:983: error: âSQLRETURNâ was not declared in this scope
../src/odbc_connection.cpp:983: error: expected â;â before âretâ
../src/odbc_connection.cpp:984: error: âSQLHSTMTâ was not declared in this scope
../src/odbc_connection.cpp:984: error: expected â;â before âhSTMTâ
../src/odbc_connection.cpp:1074: error: âretâ was not declared in this scope
../src/odbc_connection.cpp:1074: error: âSQL_HANDLE_STMTâ was not declared in this scope
../src/odbc_connection.cpp:1075: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:1076: error: âhSTMTâ was not declared in this scope
../src/odbc_connection.cpp:1076: error: âSQLAllocHandleâ was not declared in this scope
../src/odbc_connection.cpp:1083: error: âSQL_SUCCEEDEDâ was not declared in this scope
../src/odbc_connection.cpp:1090: error: âSQLTCHARâ was not declared in this scope
../src/odbc_connection.cpp:1090: error: expected primary-expression before â)â token
../src/odbc_connection.cpp:1091: error: âSQLExecDirectâ was not declared in this scope
../src/odbc_connection.cpp:1097: error: âSQLTCHARâ was not declared in this scope
../src/odbc_connection.cpp:1097: error: expected primary-expression before â)â token
../src/odbc_connection.cpp:1098: error: âSQLPrepareâ was not declared in this scope
../src/odbc_connection.cpp:1100: error: âSQL_SUCCESSâ was not declared in this scope
../src/odbc_connection.cpp:1100: error: âSQL_SUCCESS_WITH_INFOâ was not declared in this scope
../src/odbc_connection.cpp:1112: error: âSQL_PARAM_INPUTâ was not declared in this scope
../src/odbc_connection.cpp:1113: error: âstruct Parameterâ has no member named âc_typeâ
../src/odbc_connection.cpp:1114: error: âstruct Parameterâ has no member named âtypeâ
../src/odbc_connection.cpp:1115: error: âstruct Parameterâ has no member named âsizeâ
../src/odbc_connection.cpp:1116: error: âstruct Parameterâ has no member named âdecimalsâ
../src/odbc_connection.cpp:1118: error: âstruct Parameterâ has no member named âbuffer_lengthâ
../src/odbc_connection.cpp:1120: error: âstruct Parameterâ has no member named âlengthâ
../src/odbc_connection.cpp:1120: error: âSQLBindParameterâ was not declared in this scope
../src/odbc_connection.cpp:1122: error: âSQL_ERRORâ was not declared in this scope
../src/odbc_connection.cpp:1126: error: âSQLExecuteâ was not declared in this scope
../src/odbc_connection.cpp:1133: error: âstruct Parameterâ has no member named âc_typeâ
../src/odbc_connection.cpp:1134: error: âSQL_C_WCHARâ was not declared in this scope
../src/odbc_connection.cpp:1135: error: âSQL_C_CHARâ was not declared in this scope
../src/odbc_connection.cpp:1136: error: âSQL_C_LONGâ was not declared in this scope
../src/odbc_connection.cpp:1137: error: âSQL_C_DOUBLEâ was not declared in this scope
../src/odbc_connection.cpp:1138: error: âSQL_C_BITâ was not declared in this scope
../src/odbc_connection.cpp:1149: error: âSQL_ERRORâ was not declared in this scope
../src/odbc_connection.cpp:1163: error: âSQLFreeHandleâ was not declared in this scope
../src/odbc_connection.cpp:1173: error: âclass ODBCConnectionâ has no member named âm_hENVâ
../src/odbc_connection.cpp:1174: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp: In static member function âstatic void ODBCConnection::UV_Tables(uv_work_t*)â:
../src/odbc_connection.cpp:1277: error: âSQL_HANDLE_STMTâ was not declared in this scope
../src/odbc_connection.cpp:1277: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:1277: error: âstruct query_work_dataâ has no member named âhSTMTâ
../src/odbc_connection.cpp:1277: error: âSQLAllocHandleâ was not declared in this scope
../src/odbc_connection.cpp:1281: error: âSQLRETURNâ was not declared in this scope
../src/odbc_connection.cpp:1281: error: expected â;â before âretâ
../src/odbc_connection.cpp:1290: error: âretâ was not declared in this scope
../src/odbc_connection.cpp: In static member function âstatic void ODBCConnection::UV_Columns(uv_work_t*)â:
../src/odbc_connection.cpp:1388: error: âSQL_HANDLE_STMTâ was not declared in this scope
../src/odbc_connection.cpp:1388: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:1388: error: âstruct query_work_dataâ has no member named âhSTMTâ
../src/odbc_connection.cpp:1388: error: âSQLAllocHandleâ was not declared in this scope
../src/odbc_connection.cpp:1392: error: âSQLRETURNâ was not declared in this scope
../src/odbc_connection.cpp:1392: error: expected â;â before âretâ
../src/odbc_connection.cpp:1401: error: âretâ was not declared in this scope
../src/odbc_connection.cpp: In static member function âstatic void ODBCConnection::BeginTransactionSync(const v8::FunctionCallbackInfo<v8::Value>&)â:
../src/odbc_connection.cpp:1415: error: âSQLRETURNâ was not declared in this scope
../src/odbc_connection.cpp:1415: error: expected â;â before âretâ
../src/odbc_connection.cpp:1418: error: âretâ was not declared in this scope
../src/odbc_connection.cpp:1419: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:1420: error: âSQL_ATTR_AUTOCOMMITâ was not declared in this scope
../src/odbc_connection.cpp:1421: error: âSQLPOINTERâ was not declared in this scope
../src/odbc_connection.cpp:1422: error: âSQL_NTSâ was not declared in this scope
../src/odbc_connection.cpp:1422: error: âSQLSetConnectAttrâ was not declared in this scope
../src/odbc_connection.cpp:1424: error: âSQL_SUCCEEDEDâ was not declared in this scope
../src/odbc_connection.cpp:1425: error: âSQL_HANDLE_DBCâ was not declared in this scope
../src/odbc_connection.cpp:1425: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp: In static member function âstatic void ODBCConnection::UV_BeginTransaction(uv_work_t*)â:
../src/odbc_connection.cpp:1483: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:1484: error: âSQL_ATTR_AUTOCOMMITâ was not declared in this scope
../src/odbc_connection.cpp:1485: error: âSQLPOINTERâ was not declared in this scope
../src/odbc_connection.cpp:1486: error: âSQL_NTSâ was not declared in this scope
../src/odbc_connection.cpp:1486: error: âSQLSetConnectAttrâ was not declared in this scope
../src/odbc_connection.cpp: In static member function âstatic void ODBCConnection::UV_AfterBeginTransaction(uv_work_t*, int)â:
../src/odbc_connection.cpp:1505: error: âSQL_SUCCEEDEDâ was not declared in this scope
../src/odbc_connection.cpp:1508: error: âSQL_HANDLE_DBCâ was not declared in this scope
../src/odbc_connection.cpp:1508: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp: In static member function âstatic void ODBCConnection::EndTransactionSync(const v8::FunctionCallbackInfo<v8::Value>&)â:
../src/odbc_connection.cpp:1541: error: âSQLRETURNâ was not declared in this scope
../src/odbc_connection.cpp:1541: error: expected â;â before âretâ
../src/odbc_connection.cpp:1543: error: âSQLSMALLINTâ was not declared in this scope
../src/odbc_connection.cpp:1543: error: expected â;â before âcompletionTypeâ
../src/odbc_connection.cpp:1549: error: âretâ was not declared in this scope
../src/odbc_connection.cpp:1550: error: âSQL_HANDLE_DBCâ was not declared in this scope
../src/odbc_connection.cpp:1551: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:1552: error: âcompletionTypeâ was not declared in this scope
../src/odbc_connection.cpp:1552: error: âSQLEndTranâ was not declared in this scope
../src/odbc_connection.cpp:1555: error: âSQL_SUCCEEDEDâ was not declared in this scope
../src/odbc_connection.cpp:1558: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:1563: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:1564: error: âSQL_ATTR_AUTOCOMMITâ was not declared in this scope
../src/odbc_connection.cpp:1565: error: âSQLPOINTERâ was not declared in this scope
../src/odbc_connection.cpp:1566: error: âSQL_NTSâ was not declared in this scope
../src/odbc_connection.cpp:1566: error: âSQLSetConnectAttrâ was not declared in this scope
../src/odbc_connection.cpp:1572: error: âSQL_SUCCEEDEDâ was not declared in this scope
../src/odbc_connection.cpp:1577: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp: In static member function âstatic void ODBCConnection::EndTransaction(const v8::FunctionCallbackInfo<v8::Value>&)â:
../src/odbc_connection.cpp:1615: error: âSQL_ROLLBACKâ was not declared in this scope
../src/odbc_connection.cpp:1616: error: âSQL_COMMITâ was not declared in this scope
../src/odbc_connection.cpp: In static member function âstatic void ODBCConnection::UV_EndTransaction(uv_work_t*)â:
../src/odbc_connection.cpp:1644: error: âSQLRETURNâ was not declared in this scope
../src/odbc_connection.cpp:1644: error: expected â;â before âretâ
../src/odbc_connection.cpp:1649: error: âretâ was not declared in this scope
../src/odbc_connection.cpp:1651: error: âSQL_SUCCEEDEDâ was not declared in this scope
../src/odbc_connection.cpp:1657: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
../src/odbc_connection.cpp:1658: error: âSQL_ATTR_AUTOCOMMITâ was not declared in this scope
../src/odbc_connection.cpp:1659: error: âSQLPOINTERâ was not declared in this scope
../src/odbc_connection.cpp:1660: error: âSQL_NTSâ was not declared in this scope
../src/odbc_connection.cpp:1660: error: âSQLSetConnectAttrâ was not declared in this scope
../src/odbc_connection.cpp:1662: error: âSQL_SUCCEEDEDâ was not declared in this scope
../src/odbc_connection.cpp: In static member function âstatic void ODBCConnection::UV_AfterEndTransaction(uv_work_t*, int)â:
../src/odbc_connection.cpp:1685: error: âSQL_SUCCEEDEDâ was not declared in this scope
../src/odbc_connection.cpp:1688: error: âSQL_HANDLE_DBCâ was not declared in this scope
../src/odbc_connection.cpp:1688: error: âclass ODBCConnectionâ has no member named âm_hDBCâ
make: *** [Release/obj.target/odbc_bindings/src/odbc_connection.o] Error 1
make: Leaving directory `/db2_node/node_modules/ibm_db/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/nagesh/connectIN/ibm/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:268:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Linux 2.6.32-358.el6.x86_64
gyp ERR! command "node" "/nagesh/connectIN/ibm/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build"
gyp ERR! cwd /db2_node/node_modules/ibm_db
gyp ERR! node -v v0.12.1
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok

Resolution:
Export the following environment variables and do recompile. Change the directories paths based on your installation.

export LIBRARY_PATH=/opt/ibm/db2/V10.1/lib64:$LD_LIBRARY_PATH
export CPLUS_INCLUDE_PATH=/db2_node/node_modules/ibm_db/installer/clidriver/include:$CPLUS_INCLUDE_PATH