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

--debug-http2 fails build #27824

Closed
kasicka opened this issue May 22, 2019 · 2 comments
Closed

--debug-http2 fails build #27824

kasicka opened this issue May 22, 2019 · 2 comments
Labels
http2 Issues or PRs related to the http2 subsystem.

Comments

@kasicka
Copy link

kasicka commented May 22, 2019

  • Version: v8.13.0
  • Platform: RHEL 7.6
  • Subsystem: http2

Trying to build node with ./configure --debug-http2 fails with

In file included from ../src/node_http2.cc:4:0:
../src/node_http2.cc: In member function 'void node::http2::Http2Session::HandleOriginFrame(const nghttp2_frame*)':
../src/node_http2.h:39:52: error: expected primary-expression before ')' token
 #define DEBUG_HTTP2(...) debug_vfprintf(__VA_ARGS__);
                                                    ^
../src/node_http2.h:51:7: note: in expansion of macro 'DEBUG_HTTP2'
       DEBUG_HTTP2("Http2Session %s (%.0lf) " message "\n",                    \
       ^~~~~~~~~~~
../src/node_http2.cc:1440:3: note: in expansion of macro 'DEBUG_HTTP2SESSION2'
   DEBUG_HTTP2SESSION2(this, "handling origin frame");
   ^~~~~~~~~~~~~~~~~~~
make[1]: *** [/root/node/out/Release/obj.target/node_lib/src/node_http2.o] Error 1
make[1]: *** Waiting for unfinished jobs....
../src/node_perf.cc: In function 'void node::performance::Init(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>)':
../src/node_perf.cc:365:8: warning: variable 'state_ab' set but not used [-Wunused-but-set-variable]
   auto state_ab = ArrayBuffer::New(isolate, state, sizeof(*state));
        ^~~~~~~~
rm ad16294d2e56dcf8094a61395a5f2db888bad43e.intermediate
make[1]: Leaving directory `/root/node/out'
make: *** [node] Error 2

This is present since v8.13.0, presumably since #22850. I haven't tried building other versions, just v8.13.0 and v8.16.0, the error wasn't present in v8.12.0.

This seems to fix the issue and makes the tests pass too:

--- a/src/node_http2.cc
+++ b/src/node_http2.cc
@@ -1437,7 +1437,7 @@ void Http2Session::HandleOriginFrame(const nghttp2_frame* frame) {
   Local<Context> context = env()->context();
   Context::Scope context_scope(context);
 
-  DEBUG_HTTP2SESSION2(this, "handling origin frame");
+  DEBUG_HTTP2SESSION(this, "handling origin frame");
 
   nghttp2_extension ext = frame->ext;
   nghttp2_ext_origin* origin = static_cast<nghttp2_ext_origin*>(ext.payload);
@addaleax
Copy link
Member

This seems to fix the issue and makes the tests pass too:

If you want, you can go ahead and open a PR with that – v8.x-staging is the branch you would want to target in that case :)

@addaleax addaleax added http2 Issues or PRs related to the http2 subsystem. v8.x labels May 22, 2019
@BridgeAR
Copy link
Member

BridgeAR commented Jan 2, 2020

Node.js v8.x has reached the end-of-life and won't receive any fixes anymore. I am closing this since this issue only applies to Node.js v8.x.

No matter if you run into this issue or not, please update to a newer Node.js version in case you still use v8.x.

@BridgeAR BridgeAR closed this as completed Jan 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
http2 Issues or PRs related to the http2 subsystem.
Projects
None yet
Development

No branches or pull requests

3 participants