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

nghttp2-1.27 to 1.34 fail to build applications #1258

Closed
wtarreau opened this issue Nov 13, 2018 · 3 comments
Closed

nghttp2-1.27 to 1.34 fail to build applications #1258

wtarreau opened this issue Nov 13, 2018 · 3 comments
Labels

Comments

@wtarreau
Copy link

Hi,

I'm facing a build failure trying to upgrade from 1.16.1. I'm using it for h2load which I'd like to upgrade due to an issue with 1xx responses (I prefer to test newer versions before reporting known old bugs).

I tried every version from 1.34 down to 1.27 and stopped there. 1.27 and 1.28 fail with this cryptic C++ error :

CXX libnghttpx_a-shrpx_accept_handler.o
shrpx_config.cc: In function 'int shrpx::{anonymous}::parse_psk_secrets(shrpx::Config*, const nghttp2::StringRef&)':
shrpx_config.cc:1313:35: error: 'class std::map<nghttp2::StringRef, nghttp2::StringRef>' has no member named 'emplace'
shrpx_config.cc:1313:59: error: unable to deduce 'auto' from ''

1.29 to 1.34 fail with this one :

CXX libnghttpx_a-shrpx_worker.o

shrpx_config.cc: In function 'int shrpx::{anonymous}::parse_mapping(shrpx::Config*, shrpx::DownstreamAddrConfig&, std::map<nghttp2::StringRef, long unsigned int>&, const nghttp2::StringRef&, const nghttp2::StringRef&)':
shrpx_config.cc:1127:26: error: 'class std::map<nghttp2::StringRef, long unsigned int>' has no member named 'emplace'
shrpx_config.cc: In function 'int shrpx::{anonymous}::parse_psk_secrets(shrpx::Config*, const nghttp2::StringRef&)':
shrpx_config.cc:1497:35: error: 'class std::map<nghttp2::StringRef, nghttp2::StringRef>' has no member named 'emplace'
shrpx_config.cc:1497:59: error: unable to deduce 'auto' from ''

It also speaks about this "emplace" thing, but sadly I can really not parse C++ at all, I'm only a C developer and have no idea what the stuff above means (only that something is missing a member named "emplace" in the code). The affected line is this one :

auto rv = tlsconf.psk_secrets.emplace(identity, secret);

I once thought it could be related to the openssl version but I tried to build forcing to use a locally installed 1.0.2 and 1.1.0 and got the same issue each time.

I can easily run more tests and try approximate patches using some guidance about what to modify. Thanks!

@tatsuhiro-t
Copy link
Member

I think C++ compiler is too old to compile C++ code. Could you try gcc >= 6.0 or clang >= 6.0?

@wtarreau
Copy link
Author

wtarreau commented Nov 13, 2018 via email

@wtarreau
Copy link
Author

Yeah, you figured it right Tatsuhiro, it works fine with gcc 6.4 here (and my 1xx issue is still there, I'll report on a separate issue). I'm closing this issue now. Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants