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

[Windows] problem when rebuilding gdal #734

Open
hail-kang opened this issue Jun 27, 2021 · 3 comments
Open

[Windows] problem when rebuilding gdal #734

hail-kang opened this issue Jun 27, 2021 · 3 comments

Comments

@hail-kang
Copy link

hail-kang commented Jun 27, 2021

Version

  • node = 14.16.1
  • npm = 6.14.12
  • windows-build-tools = 5.2.2 (I installed it with the command "npm install --vs2015 --global windows-build-tools")
  • electron = 13.1.4
  • electron-rebuild = 2.3.5
  • gdal = 0.10.1

Issue

it's part of my electron project's package.json

  "devDependencies": {
    "electron": "^13.1.4",
    "electron-rebuild": "^2.3.5"
  },
  "dependencies": {
    "gdal": "^0.10.1"
  }

I referenced the link below.
https://www.electronjs.org/docs/tutorial/using-native-node-modules

  • npm config set msvs_version=2015
  • set VCTargetsPath=C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140
  • fixed to 'win_delay_load_hook': 'true' in binding.gyp of gdal

However, when the following command was executed, an error occurred while compiling.
".\node_modules.bin\electron-rebuild.cmd"

Error

c:\users\pc\.electron-gyp\13.1.4\include\node\v8.h(1652): error C2059: syntax error: '' [C:\Users\pc\Desktop\electron_gdal\nod
e_modules\gdal\build\gdal.vcxproj]
c:\users\pc\.electron-gyp\13.1.4\include\node\v8.h(1654): error C2238: ';' Unexpected token in front. [C:\Users\pc\Desktop\ele
ctron_gdal\node_modules\gdal\build\gdal.vcxproj]
c:\users\pc\.electron-gyp\13.1.4\include\node\v8.h(1670): error C2061: syntax error: identifier 'ResolveCallback' [C:\Users\pc\Deskto
p\electron_gdal\node_modules\gdal\build\gdal.vcxproj]
c:\users\pc\.electron-gyp\13.1.4\include\node\v8.h(7292): error C2059: syntax error: '' [C:\Users\pc\Desktop\electron_gdal\nod
e_modules\gdal\build\gdal.vcxproj]
c:\users\pc\.electron-gyp\13.1.4\include\node\v8.h(8652): error C2061: syntax error: identifier 'HostImportModuleDynamicallyCallback'
 [C:\Users\pc\Desktop\electron_gdal\node_modules\gdal\build\gdal.vcxproj]

...

× Rebuild Failed

An unhandled error occurred inside electron-rebuild
node-gyp failed to rebuild 'C:\Users\pc\Desktop\electron_gdal\node_modules\gdal'.
Error: `C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe` failed with exit code: 1



Error: node-gyp failed to rebuild 'C:\Users\pc\Desktop\electron_gdal\node_modules\gdal'.
Error: `C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe` failed with exit code: 1


    at ModuleRebuilder.rebuildNodeGypModule (C:\Users\pc\Desktop\electron_gdal\node_modules\electron-rebuild\lib\src\module-rebuilder.js:193:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Rebuilder.rebuildModuleAt (C:\Users\pc\Desktop\electron_gdal\node_modules\electron-rebuild\lib\src\rebuild.js:190:9)
    at async Rebuilder.rebuild (C:\Users\pc\Desktop\electron_gdal\node_modules\electron-rebuild\lib\src\rebuild.js:152:17)
    at async C:\Users\pc\Desktop\electron_gdal\node_modules\electron-rebuild\lib\src\cli.js:146:9

@sanperrier
Copy link

Has the same with diskusage

@mithusingh32

This comment has been minimized.

@malept malept changed the title problem when rebuilding gdal [Windows] problem when rebuilding gdal Aug 23, 2021
@VadimCiv
Copy link

VadimCiv commented Nov 9, 2021

I have same issue. On windows can't compile gdal
But on my MacBook M1 it's works perfect.

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

4 participants