grpc upgrade the gcc version in a patch release
See original GitHub issueProblem description
My CI process get a failure these days, which works well before. When I check the CI process I found the following error logs.
[root@c22a7f15f9de /app/node_modules]# tnpm i typescript
(node:10324) ExperimentalWarning: The fs.promises API is experimental
npm ERR! code 1
npm ERR! path /app/node_modules/grpc
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@6.1.0
npm ERR! gyp info using node@10.16.3 | linux | x64
npm ERR! gyp info find Python using Python version 2.7.5 found at "/usr/bin/python"
npm ERR! gyp info spawn /usr/bin/python
npm ERR! gyp info spawn args [ '/app/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/app/node_modules/grpc/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/app/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/root/.cache/node-gyp/10.16.3/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/10.16.3',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/app/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/10.16.3/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/app/node_modules/grpc',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.' ]
npm ERR! gyp: Undefined variable module_name in binding.gyp while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/app/node_modules/node-gyp/lib/configure.js:351:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:198:13)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
npm ERR! gyp ERR! System Linux 3.10.107-1-tlinux2_kvm_guest-0049
npm ERR! gyp ERR! command "/usr/local/lib/node/bin/node" "/app/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /app/node_modules/grpc
npm ERR! gyp ERR! node -v v10.16.3
npm ERR! gyp ERR! node-gyp -v v6.1.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.tnpm/_logs/2021-02-25T02_59_12_695Z-debug.log
Reason
It took a lot of time to trouble shot, and finally I found the reason.
- One of my dependences in package.json depend on
grpc
. npm install
automatically upgrade the patch version togrpc@1.24.5
- In
1.24.5
, it changed the C++ standard. - My CI env does not support
-std=c++14
Here is the commit: https://github.com/grpc/grpc-node/commit/6b336fd7c9479b06cbefdd43990444abe22b4bd2
Concern
Is that change should be in a patch version?
There are more than 100k package depend on grpc
.
If they do not lock the patch version, they will get the same issue to.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Quick start | C++ - gRPC
Quick start · Build and locally install gRPC and Protocol Buffers · Build the example · Try it! · Update the gRPC service...
Read more >gRPC C++ - Google Git
This section describes how to add gRPC as a dependency to your C++ project. In the C++ world, there's no universally accepted standard...
Read more >what is Grpc c++ Release version matching to minimum gcc ...
I have a query on how to find the minimum GCC version for a specific GRPC C++ release. Iam aware that the current...
Read more >Protocol Buffers | Google Developers
Protocol buffers currently support generated code in Java, Python, Objective-C, and C++. With our new proto3 language version, you can also work with...
Read more >Moving gRPC core to C++
Should be built with gcc 4.8, clang 3.3, and Visual C++ 2015. ... More updates as team time becomes available and committed to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I also just had the same issue in my CI env but it wasn’t actually related to that environment.
For me the issue was caused by upgrading my package-lock.json file from lockfileversion 1 to lockfileversion 2 when I switched npm versions from 6->7.
In my case I was able to fix the issue by deleting the package-lock.json file and recreating it with
npm i --package-lock-only
I see no evidence that the change in question broke anything, and the
grpc
package is now deprecated, so no further action will be taken on this issue.