Skip to content

Action defined in binding.gyp results misconfigured file path in generated vcxproj file after v4.0.0 #2485

@lkallas

Description

@lkallas
  • Node Version: v14.17.4
  • Platform:
OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.19043 N/A Build 19043
System Type:               x64-based PC
  • Compiler: Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
  • Module: node-rdkafka

Correct file path generation for Windows vcxproj build files is broken.

Tiny repository for reproducing the bug provided with bug description & workaround can be found here.

Verbose output (from node-gyp rebuild):
error C:\sixfold\code\sixfold-tour-status-service\node_modules\node-rdkafka: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: C:\sixfold\code\sixfold-tour-status-service\node_modules\node-rdkafka
Output:
C:\sixfold\code\sixfold-tour-status-service\node_modules\node-rdkafka>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (no
de "C:\Users\Lennar\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp info it worked if it ends with ok
gyp info using node-gyp@8.1.0
gyp info using node@14.17.4 | win32 | x64
gyp info find Python using Python version 3.8.2 found at "C:\Python38\python.exe"
gyp info find VS using VS2015 (14.0) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio 14.0"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Python38\python.exe
gyp info spawn args [
gyp info spawn args   'C:\\Users\\Lennar\\AppData\\Roaming\\npm\\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   '-I',
gyp info spawn args   'C:\\sixfold\\code\\sixfold-tour-status-service\\node_modules\\node-rdkafka\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\Lennar\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\Lennar\\AppData\\Local\\node-gyp\\Cache\\14.17.4\\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\\Lennar\\AppData\\Local\\node-gyp\\Cache\\14.17.4',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\Lennar\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\Lennar\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\14.17.4\\\\<(target_arch)\\\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=C:\\sixfold\\code\\sixfold-tour-status-service\\node_modules\\node-rdkafka',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\sixfold\\code\\sixfold-tour-status-service\\node_modules\\node-rdkafka\\build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe
gyp info spawn args [
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'
gyp info spawn args ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  Getting librdkafka from nuget
  python: can't open file 'deps/windows-install.py': [Errno 2] No such file or directory
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 2. [C:\sixfold\code\sixfold-tour-status-service\node_modules\node-rdkafka\build\node-librdkafka.vcxpro
j]
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\Lennar\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Windows_NT 10.0.19043
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Lennar\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\sixfold\code\sixfold-tour-status-service\node_modules\node-rdkafka
gyp ERR! node -v v14.17.4
gyp ERR! node-gyp -v v8.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions