Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile Error when using NPM installation #466

Closed
njbeach opened this issue Jul 1, 2016 · 5 comments
Closed

Compile Error when using NPM installation #466

njbeach opened this issue Jul 1, 2016 · 5 comments

Comments

@njbeach
Copy link

njbeach commented Jul 1, 2016

Using Oracle Client 11.2, Visual studio 2015 Enterprise, Python 2.7, NPM 3.9.5, and node 6.2.2 on a windows 7 laptop. When I use the npm install command I recieve the following error:
C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(34): error C2373: '__pfnDliNotifyHook2': redefinition; different type modifiers [C:\Users\nbeach\AppData\Roaming\npm\node_modules\oracledb\build\oracledb.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\delayimp.h(134): note: see declaration of '__pfnDliNotifyHook2'
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)

@davidflam
Copy link

Hi,

This error should be caused by nodejs/node-gyp#956. I could compile oracledb by installing an npm version with that issue solved. I installed the latest version globally: npm install -g npm@latest

@njbeach
Copy link
Author

njbeach commented Jul 13, 2016

Installed latest NPM which corrected original error. Now receiving multiple LINK2001 errors.
C-compiler - VS 2015 Enterprise,
NODE - version 6.3.0
NPM - version 3.10.5
Oracle Full client 11.2

"C:\WebstormProjects\NodeCore\node_modules\oracledb\build\binding.sln" (default target) (1) ->
"C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj" (default target) (2) ->
(Link target) ->
dpiEnv.obj : error LNK2001: unresolved external symbol OCIDescriptorFree [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiEnv.obj : error LNK2001: unresolved external symbol OCIHandleFree [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiEnv.obj : error LNK2001: unresolved external symbol OCIArrayDescriptorFree [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiEnvImpl.obj : error LNK2001: unresolved external symbol OCIEnvNlsCreate [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiEnvImpl.obj : error LNK2001: unresolved external symbol OCIDescriptorAlloc [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiEnvImpl.obj : error LNK2001: unresolved external symbol OCIArrayDescriptorAlloc [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiEnvImpl.obj : error LNK2001: unresolved external symbol OCIHandleAlloc [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiConnImpl.obj : error LNK2001: unresolved external symbol OCITransCommit [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiConnImpl.obj : error LNK2001: unresolved external symbol OCITransRollback [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiConnImpl.obj : error LNK2001: unresolved external symbol OCISessionRelease [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiConnImpl.obj : error LNK2001: unresolved external symbol OCISessionGet [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiConnImpl.obj : error LNK2001: unresolved external symbol OCIAttrGet [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiConnImpl.obj : error LNK2001: unresolved external symbol OCIServerRelease [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiConnImpl.obj : error LNK2001: unresolved external symbol OCIAttrSet [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiConnImpl.obj : error LNK2001: unresolved external symbol OCIBreak [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiDateTimeArrayImpl.obj : error LNK2001: unresolved external symbol OCIDateTimeConstruct [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiDateTimeArrayImpl.obj : error LNK2001: unresolved external symbol OCIDateTimeSubtract [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiDateTimeArrayImpl.obj : error LNK2001: unresolved external symbol OCIIntervalGetDaySecond [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiDateTimeArrayImpl.obj : error LNK2001: unresolved external symbol OCIDateTimeIntervalAdd [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiDateTimeArrayImpl.obj : error LNK2001: unresolved external symbol OCIIntervalSetDaySecond [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiPoolImpl.obj : error LNK2001: unresolved external symbol OCISessionPoolCreate [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiPoolImpl.obj : error LNK2001: unresolved external symbol OCISessionPoolDestroy [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiStmtImpl.obj : error LNK2001: unresolved external symbol OCIStmtExecute [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiStmtImpl.obj : error LNK2001: unresolved external symbol OCIBindByPos [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiStmtImpl.obj : error LNK2001: unresolved external symbol OCIBindByName [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiStmtImpl.obj : error LNK2001: unresolved external symbol OCIStmtPrepare2 [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiStmtImpl.obj : error LNK2001: unresolved external symbol OCIDefineByPos [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiStmtImpl.obj : error LNK2001: unresolved external symbol OCIParamGet [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiStmtImpl.obj : error LNK2001: unresolved external symbol OCIBindDynamic [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiStmtImpl.obj : error LNK2001: unresolved external symbol OCIStmtFetch2 [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiStmtImpl.obj : error LNK2001: unresolved external symbol OCIStmtRelease [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiUtils.obj : error LNK2001: unresolved external symbol OCIErrorGet [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiLob.obj : error LNK2001: unresolved external symbol OCILobGetChunkSize [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiLob.obj : error LNK2001: unresolved external symbol OCILobGetLength2 [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiLob.obj : error LNK2001: unresolved external symbol OCILobRead2 [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiLob.obj : error LNK2001: unresolved external symbol OCILobWrite2 [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
dpiCommon.obj : error LNK2001: unresolved external symbol OCIClientVersion [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]
C:\WebstormProjects\NodeCore\node_modules\oracledb\build\Release\oracledb.node : fatal error LNK1120: 37 unresolved externals [C:\WebstormProjects\NodeCore\node_modules\oracledb\build\oracledb.vcxproj]

36 Warning(s)
38 Error(s)

Time Elapsed 00:00:05.79
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\nbeach\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\Program Files (x86)\nodejs\node.exe" "C:\Users\nbeach\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\WebstormProjects\NodeCore\node_modules\oracledb
gyp ERR! node -v v6.3.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm verb lifecycle oracledb@1.10.0install: unsafe-perm in lifecycle true
npm verb lifecycle oracledb@1.10.0
install: PATH: C:\Users\nbeach\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\WebstormProjects\NodeCore\node_modules\oracledb\node_modules.bin;C:\WebstormProjects\NodeCore\node_modules.bin;C:\Program Files (x86)\nodejs
;C:\app\nbeach\product\11.2.0\client_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Toshiba\Bluetooth Toshiba Stack\sys;C:\Program Files (x86)\Toshiba\Bluetooth Toshiba Stack\sys\x64
;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files (x86)\MQSeries Client\bin;C:\SMS-BR03\P_S5_001\EXE;C:\SMS-BR03\P_S5_001\DLL;C:\ProgramData\ComposerSetup\bin;C:\PROGRA2\IBM\SQLLIB\BIN;C:\PROGRA2\IBM\SQLLIB\FU
NCTION;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\GitExtensions;C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\bin;C:\Program Files (x86)\Zend\ZendServer\bin;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Program Files (x86)\Window
s Kits\10\Windows Performance Toolkit;C:\Program Files\Git\cmd;C:\WINDOWS\system32\config\systemprofile.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files (x86)\nodejs;C:\Users\nbeach\AppData\Roaming\npm
npm verb lifecycle oracledb@1.10.0install: CWD: C:\WebstormProjects\NodeCore\node_modules\oracledb
npm info lifecycle oracledb@1.10.0
install: Failed to exec install script
npm verb unlock done using C:\Users\nbeach\AppData\Roaming\npm-cache_locks\staging-6e7a7f00284adea6.lock for C:\WebstormProjects\NodeCore\node_modules.staging
npm verb stack Error: oracledb@1.10.0 install: node-gyp rebuild
npm verb stack Exit status 1
npm verb stack at EventEmitter. (C:\Users\nbeach\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:242:16)
npm verb stack at emitTwo (events.js:106:13)
npm verb stack at EventEmitter.emit (events.js:191:7)
npm verb stack at ChildProcess. (C:\Users\nbeach\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14)
npm verb stack at emitTwo (events.js:106:13)
npm verb stack at ChildProcess.emit (events.js:191:7)
npm verb stack at maybeClose (internal/child_process.js:852:16)
npm verb stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
npm verb pkgid oracledb@1.10.0
npm verb cwd C:\WebstormProjects\NodeCore
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Users\nbeach\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "--verbose" "install" "oracledb" "--save"
npm ERR! node v6.3.0
npm ERR! npm v3.10.5
npm ERR! code ELIFECYCLE

If someone could point in the direction if I am doing something wrong. Utilizing Oracle DB with a node app is the last task I have to complete for a POC.

@cjbj
Copy link
Member

cjbj commented Jul 21, 2016

@njbeach It doesn't look like you set the environment variables and/or have an Oracle client. See https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#instwin

@djejaquino
Copy link

I've set both variables correctly but it stops in the middle of the process.

Please, take a look:

npm install > install.log

oracledb@1.11.0 install C:\dev\git\qotd\node_modules\oracledb
node-gyp rebuild

C:\dev\git\qotd\node_modules\oracledb>if not defined npm_config_node_gyp (node "C:\Users\user\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
njsOracle.cpp
njsPool.cpp
njsConnection.cpp
njsResultSet.cpp
..\src\njs\src\njsConnection.cpp(2448): warning C4244: 'argument': conversion from 'sb8' to 'size_t', possible loss of data [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
njsMessages.cpp
njsIntLob.cpp
dpiEnv.cpp
dpiEnvImpl.cpp
dpiException.cpp
dpiExceptionImpl.cpp
dpiConnImpl.cpp
dpiDateTimeArrayImpl.cpp
dpiPoolImpl.cpp
dpiStmtImpl.cpp
dpiUtils.cpp
dpiLob.cpp
dpiCommon.cpp
win_delay_load_hook.cc
Creating library C:\dev\git\qotd\node_modules\oracledb\build\Release\oracledb.lib and object C:\dev\git\qotd\node_modules\oracledb\build\Release\oracledb.exp
dpiEnv.obj : error LNK2001: unresolved external symbol _OCIDescriptorFree [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiEnv.obj : error LNK2001: unresolved external symbol _OCIHandleFree [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiEnv.obj : error LNK2001: unresolved external symbol _OCIArrayDescriptorFree [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiEnvImpl.obj : error LNK2001: unresolved external symbol _OCIEnvNlsCreate [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiEnvImpl.obj : error LNK2001: unresolved external symbol _OCIDescriptorAlloc [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiEnvImpl.obj : error LNK2001: unresolved external symbol _OCIArrayDescriptorAlloc [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiEnvImpl.obj : error LNK2001: unresolved external symbol _OCIHandleAlloc [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiConnImpl.obj : error LNK2001: unresolved external symbol _OCITransCommit [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiConnImpl.obj : error LNK2001: unresolved external symbol _OCITransRollback [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiConnImpl.obj : error LNK2001: unresolved external symbol _OCISessionRelease [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiConnImpl.obj : error LNK2001: unresolved external symbol _OCISessionGet [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiConnImpl.obj : error LNK2001: unresolved external symbol _OCIAttrGet [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiConnImpl.obj : error LNK2001: unresolved external symbol _OCIServerRelease [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiConnImpl.obj : error LNK2001: unresolved external symbol _OCIAttrSet [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiConnImpl.obj : error LNK2001: unresolved external symbol _OCIBreak [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiDateTimeArrayImpl.obj : error LNK2001: unresolved external symbol _OCIDateTimeConstruct [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiDateTimeArrayImpl.obj : error LNK2001: unresolved external symbol _OCIDateTimeSubtract [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiDateTimeArrayImpl.obj : error LNK2001: unresolved external symbol _OCIIntervalGetDaySecond [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiDateTimeArrayImpl.obj : error LNK2001: unresolved external symbol _OCIDateTimeIntervalAdd [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiDateTimeArrayImpl.obj : error LNK2001: unresolved external symbol _OCIIntervalSetDaySecond [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiPoolImpl.obj : error LNK2001: unresolved external symbol _OCISessionPoolCreate [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiPoolImpl.obj : error LNK2001: unresolved external symbol _OCISessionPoolDestroy [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiStmtImpl.obj : error LNK2001: unresolved external symbol _OCIStmtExecute [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiStmtImpl.obj : error LNK2001: unresolved external symbol _OCIDefineByPos2 [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiStmtImpl.obj : error LNK2001: unresolved external symbol _OCIBindByName2 [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiStmtImpl.obj : error LNK2001: unresolved external symbol _OCIStmtPrepare2 [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiStmtImpl.obj : error LNK2001: unresolved external symbol _OCIParamGet [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiStmtImpl.obj : error LNK2001: unresolved external symbol _OCIBindDynamic [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiStmtImpl.obj : error LNK2001: unresolved external symbol _OCIBindByPos2 [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiStmtImpl.obj : error LNK2001: unresolved external symbol _OCIStmtFetch2 [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiStmtImpl.obj : error LNK2001: unresolved external symbol _OCIStmtRelease [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiUtils.obj : error LNK2001: unresolved external symbol _OCIErrorGet [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiLob.obj : error LNK2001: unresolved external symbol _OCILobGetChunkSize [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiLob.obj : error LNK2001: unresolved external symbol _OCILobGetLength2 [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiLob.obj : error LNK2001: unresolved external symbol _OCILobRead2 [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiLob.obj : error LNK2001: unresolved external symbol _OCILobWrite2 [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
dpiCommon.obj : error LNK2001: unresolved external symbol _OCIClientVersion [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]
C:\dev\git\qotd\node_modules\oracledb\build\Release\oracledb.node : fatal error LNK1120: 37 unresolved externals [C:\dev\git\qotd\node_modules\oracledb\build\oracledb.vcxproj]

@cjbj
Copy link
Member

cjbj commented Dec 1, 2016

@djejaquino this issue is closed. Consider opening a new issue?

You mention "both" variables, but there are actually three: don't forget to set PATH.

Some background info about what versions, platforms, compilers and the important info about how you set things and what you ran might be useful to give.

@oracle oracle locked and limited conversation to collaborators Dec 1, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants