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

Build fails w/ Node JS v6.5.0 and Visual Studio 2015 #12

Open
zam6ak opened this issue Sep 14, 2016 · 8 comments
Open

Build fails w/ Node JS v6.5.0 and Visual Studio 2015 #12

zam6ak opened this issue Sep 14, 2016 · 8 comments

Comments

@zam6ak
Copy link

zam6ak commented Sep 14, 2016

node-pdfium fails with Node JS 6.5.0

error seems to be indicative of change in Node JS native API

..\..\..\third_party\pdfium\fpdfsdk\src\javascript\JS_Runtime.cpp(103): error C2660: 'v8::Isolate::New': function does not take 0 arguments [X:\node-pdfium\build\third_party\pdfium\javascript.vcxproj]

config step

X:\node-pdfium>node-gyp configure
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info spawn X:\Frameworks\python2\python.EXE
gyp info spawn args [ 'X:\\Frameworks\\nvm\\v6.5.0\\node_modules\\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   'X:\\node-pdfium\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'X:\\node-pdfium\\common.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'X:\\Frameworks\\nvm\\v6.5.0\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\Admin\\.node-gyp\\6.5.0\\include\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\Admin\\.node-gyp\\6.5.0',
gyp info spawn args   '-Dnode_gyp_dir=X:\\Frameworks\\nvm\\v6.5.0\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=X:\\node-pdfium',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'X:\\node-pdfium\\build',
gyp info spawn args   '-Goutput_dir=.' ]
Warning: Missing input files:
X:\node-pdfium\build\third_party\pdfium\..\..\..\third_party\pdfium\core\src\fxcodec\libjpeg\makefile
gyp info ok

build step


X:\node-pdfium>node-gyp build
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info spawn C:\Program Files (x86)\MSBuild\14.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.
  win_delay_load_hook.cc
  bigint.vcxproj -> X:\node-pdfium\build\Release\\bigint.lib
  win_delay_load_hook.cc
  fdrm.vcxproj -> X:\node-pdfium\build\Release\\fdrm.lib
  win_delay_load_hook.cc
  formfiller.vcxproj -> X:\node-pdfium\build\Release\\formfiller.lib
  win_delay_load_hook.cc
  fpdfapi.vcxproj -> X:\node-pdfium\build\Release\\fpdfapi.lib
  win_delay_load_hook.cc
  fpdfdoc.vcxproj -> X:\node-pdfium\build\Release\\fpdfdoc.lib
  win_delay_load_hook.cc
  fpdftext.vcxproj -> X:\node-pdfium\build\Release\\fpdftext.lib
  win_delay_load_hook.cc
  freetype.vcxproj -> X:\node-pdfium\build\Release\\freetype.lib
  win_delay_load_hook.cc
  fx_lpng.vcxproj -> X:\node-pdfium\build\Release\\fx_lpng.lib
  win_delay_load_hook.cc
  fxcodec.vcxproj -> X:\node-pdfium\build\Release\\fxcodec.lib
  win_delay_load_hook.cc
  fxcrt.vcxproj -> X:\node-pdfium\build\Release\\fxcrt.lib
  win_delay_load_hook.cc
  fxedit.vcxproj -> X:\node-pdfium\build\Release\\fxedit.lib
  win_delay_load_hook.cc
  fxge.vcxproj -> X:\node-pdfium\build\Release\\fxge.lib
  JS_Runtime.cpp
  win_delay_load_hook.cc
..\..\..\third_party\pdfium\fpdfsdk\src\javascript\JS_Runtime.cpp(103): error C2660: 'v8::Isolate::New': function does not take 0 arguments [X:\node-pdfium\build\third_party\pdfium\javascript.vcxproj]
  win_delay_load_hook.cc
  jsapi.vcxproj -> X:\node-pdfium\build\Release\\jsapi.lib
  win_delay_load_hook.cc
  pdfwindow.vcxproj -> X:\node-pdfium\build\Release\\pdfwindow.lib
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 (X:\Frameworks\nvm\v6.5.0\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:215:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "X:\\Frameworks\\nodejs\\node.exe" "X:\\Frameworks\\nodejs\\node_modules\\node-gyp\\bin\\node-gyp.js" "build"
gyp ERR! cwd X:\node-pdfium
gyp ERR! node -v v6.5.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
@dhenson02
Copy link

+1

2 similar comments
@AlexanderReen
Copy link

+1

@ArsNV
Copy link

ArsNV commented Nov 11, 2016

+1

@gaboelnuevo
Copy link

gaboelnuevo commented Dec 16, 2016

hello, I had the same issue, I got work in node v6.9.2 in this branch:
--> https://github.com/gaboelnuevo/node-pdfium/tree/patch-node-version

I don't make a pull request because it need to be tested in older node versions to maintain backward compatibility.

@tojocky
Copy link
Owner

tojocky commented Dec 21, 2016

Hi @gaboelnuevo ,
Thank you your patch. did you check the latest pdfium code if this it is corrected?

We may consider to create another branch for upper versions.

@gaboelnuevo
Copy link

I only tested EMF page conversion in Win7 (x64)

I think that we can use NODE_MODULE_VERSION of node_version.h instead to maintain a same branch example:

#if (NODE_MODULE_VERSION > 46)
/* Code for upper versions /
#else
/
Code for older versions */
#endif

Note: 46 is only a example, 46 is node v4.0.0 version, I don't know exactly what versions are compatible with this fix.

@augurios
Copy link

augurios commented Jan 6, 2018

any chance on this getting fixed? thanks..

@tojocky
Copy link
Owner

tojocky commented Jan 8, 2018

Could you please try now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants