nodejs / nodejs/node-gyp

The --no-duplicate-basename-check option does not work

Open
#2,026 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.7k
Forks
1.9k
Avg merge
1d 4h
Merged PRs (30d)
5

Description

  • Node Version: Node: v12.9.0 npm: 6.10.2
  • Platform: Linux 5.2.17-1rodete3-amd64 #1 SMP Debian 5.2.17-1rodete3 (2019-10-21 > 2018) x86_64 GNU/Linux
  • Compiler: gcc version 8.3.0 (Debian 8.3.0-6)
  • Module: a version not on npm
Verbose output (from npm or node-gyp):
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   '/usr/local/google/home/mlumish/.nvm/versions/node/v12.9.0/bin/node',
gyp verb cli   '/usr/local/google/home/mlumish/.nvm/versions/node/v12.9.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'clean'
gyp verb cli ]
gyp info using node-gyp@5.0.3
gyp info using node@12.9.0 | linux | x64
gyp verb command clean []
gyp verb clean removing "build" directory
gyp info ok 
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   '/usr/local/google/home/mlumish/.nvm/versions/node/v12.9.0/bin/node',
gyp verb cli   '/usr/local/google/home/mlumish/.nvm/versions/node/v12.9.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'configure',
gyp verb cli   '--fallback-to-build',
gyp verb cli   '--library=static_library',
gyp verb cli   '--no-duplicate-basename-check',
gyp verb cli   '--module=/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core/src/node/extension_binary/node-v72-linux-x64-glibc/grpc_node.node',
gyp verb cli   '--module_name=grpc_node',
gyp verb cli   '--module_path=/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core/src/node/extension_binary/node-v72-linux-x64-glibc',
gyp verb cli   '--napi_version=4',
gyp verb cli   '--node_abi_napi=napi',
gyp verb cli   '--napi_build_version=0',
gyp verb cli   '--node_napi_label=node-v72'
gyp verb cli ]
gyp info using node-gyp@5.0.3
gyp info using node@12.9.0 | linux | x64
gyp verb command configure []
gyp verb find Python Python is not set from command line or npm configuration
gyp verb find Python Python is not set from environment variable PYTHON
gyp verb find Python checking if "python" can be used
gyp verb find Python - executing "python" to get executable path
gyp verb find Python - executable path is "/usr/bin/python"
gyp verb find Python - executing "/usr/bin/python" to get version
gyp verb find Python - version is "2.7.17"
gyp info find Python using Python version 2.7.17 found at "/usr/bin/python"
gyp verb get node dir no --target version specified, falling back to host node version: 12.9.0
gyp verb command install [ '12.9.0' ]
gyp verb install input version string "12.9.0"
gyp verb install installing version: 12.9.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 12.9.0
gyp verb build dir attempting to create "build" dir: /usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core/build
gyp verb build dir "build" dir needed to be created? /usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core/build/config.gypi
gyp verb config.gypi checking for gypi file: /usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core/config.gypi
gyp verb common.gypi checking for gypi file: /usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args   '/usr/local/google/home/mlumish/.nvm/versions/node/v12.9.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/google/home/mlumish/.nvm/versions/node/v12.9.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/google/home/mlumish/.cache/node-gyp/12.9.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=/usr/local/google/home/mlumish/.cache/node-gyp/12.9.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/google/home/mlumish/.nvm/versions/node/v12.9.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/usr/local/google/home/mlumish/.cache/node-gyp/12.9.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core',
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   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
static library binding.gyp:absl/strings_strings#target has several files with the same basename:
  escaping: deps/grpc/third_party/abseil-cpp/absl/strings/escaping.cc deps/grpc/third_party/abseil-cpp/absl/strings/internal/escaping.cc
libtool on Mac cannot handle that. Use --no-duplicate-basename-check to disable this validation.
gyp: Duplicate basenames in sources section, see list above
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/google/home/mlumish/.nvm/versions/node/v12.9.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:344:16)
gyp ERR! stack     at ChildProcess.emit (events.js:209:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 5.2.17-1rodete3-amd64
gyp ERR! command "/usr/local/google/home/mlumish/.nvm/versions/node/v12.9.0/bin/node" "/usr/local/google/home/mlumish/.nvm/versions/node/v12.9.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--no-duplicate-basename-check" "--module=/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core/src/node/extension_binary/node-v72-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core/src/node/extension_binary/node-v72-linux-x64-glibc" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core
gyp ERR! node -v v12.9.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok

The lines from the log I want to emphasize are these:

static library binding.gyp:absl/strings_strings#target has several files with the same basename:
  escaping: deps/grpc/third_party/abseil-cpp/absl/strings/escaping.cc deps/grpc/third_party/abseil-cpp/absl/strings/internal/escaping.cc
libtool on Mac cannot handle that. Use --no-duplicate-basename-check to disable this validation.
...
gyp ERR! command "/usr/local/google/home/mlumish/.nvm/versions/node/v12.9.0/bin/node" "/usr/local/google/home/mlumish/.nvm/versions/node/v12.9.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--no-duplicate-basename-check" "--module=/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core/src/node/extension_binary/node-v72-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core/src/node/extension_binary/node-v72-linux-x64-glibc" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"

The logged gyp command includes the argument "--no-duplicate-basename-check" but the build is still failing as a result of the duplicate basename check.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at node-gyp/lib/configure.js and trace how the logged --no-duplicate-basename-check argument reaches the gyp invocation. Reproduce the configure command with the duplicate basenames shown in the report, then verify that the option prevents the duplicate-basename failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, python
Domain
build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.