Skip to content

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

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

Open
murgatroid99 opened this issue Jan 17, 2020 · 1 comment
Open

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

murgatroid99 opened this issue Jan 17, 2020 · 1 comment

Comments

@murgatroid99
Copy link

  • Node Version: Node: v12.9.0 npm: 6.10.2
  • Platform: Linux 5.2.17-1rodete3-amd64 Make 0.6.x work #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.

@jkryl
Copy link

jkryl commented Jan 5, 2021

I hit the same problem when trying to build grpc bindings for nodejs. The problem is that node-gyp does not recognise "--no-duplicate-basename-check" option and does not pass it to gyp (written in python). I tried the same with nodejs v14 and still the same because it is using the same version of npm, node-gyp (5.1) and gyp as v12. The hope comes with the next stable version of nodejs (v16) that should contain newer version of npm with node-gyp 7.x that uses gyp >= 0.5.0. From gyp changelog for 0.5.0:

The --no-duplicate-basename-check option was removed.

The option was removed because it became the default. So there will be no need to specify it explicitly and thus node-(pre)-gyp will start to work 🤞

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

2 participants