[MacPorts] #54446: nghttp2 @1.24.0 does not build on PPC Leopard, Mac OS X 10.5.8, with configure.cxx_stdlib = macports-libstdc++ and macports-gcc-6 because "'AI_NUMERICSERV' was not declared in this scope"

MacPorts noreply at macports.org
Thu Feb 29 21:23:46 UTC 2024


#54446: nghttp2 @1.24.0 does not build on PPC Leopard, Mac OS X 10.5.8, with
configure.cxx_stdlib = macports-libstdc++ and macports-gcc-6 because
"'AI_NUMERICSERV' was not declared in this scope"
------------------------+-------------------------
  Reporter:  ballapete  |      Owner:  Schamschula
      Type:  defect     |     Status:  closed
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:  2.4.1
Resolution:  fixed      |   Keywords:  leopard
      Port:  nghttp2    |
------------------------+-------------------------

Comment (by ballapete):

 IMO it is OK the way it is handled. There are only two places where this
 macro is used:

 {{{
 ./src/shrpx_tls_test.cc:210:  hints.ai_flags = AI_NUMERICHOST |
 AI_NUMERICSERV;
 ./src/shrpx_config.cc:4532:  auto resolve_flags = numeric_addr_only ?
 AI_NUMERICHOST | AI_NUMERICSERV : 0;
 }}}

 `numeric_addr_only` is a `boolean` value, the result of the comparison is
 later used here:


 {{{
  4583         if (!addr.dns) {
  4584           if (resolve_hostname(&addr.addr, addr.host.c_str(),
 addr.port,
  4585                                downstreamconf.family, resolve_flags)
 == -1) {
  4586             LOG(FATAL) << "Resolving backend address failed: " <<
 hostport;
  4587             return -1;
  4588           }
 }}}

 For testing with `Ruby` it is used too:

 {{{
 ./third-party/mruby/mrbgems/mruby-socket/src/const.cstub:52:#if
 defined(AI_NUMERICHOST)
 ./third-party/mruby/mrbgems/mruby-socket/src/const.cstub:53:
 define_const(AI_NUMERICHOST);
 ./third-party/mruby/mrbgems/mruby-socket/src/const.cstub:55:#if
 defined(AI_NUMERICSERV)
 ./third-party/mruby/mrbgems/mruby-socket/src/const.cstub:56:
 define_const(AI_NUMERICSERV);
 ./third-party/mruby/mrbgems/mruby-socket/src/const.def:19:AI_NUMERICHOST
 ./third-party/mruby/mrbgems/mruby-socket/src/const.def:20:AI_NUMERICSERV
 }}}

 The last two lines seem to be just items on a long list, which is OK. In
 `const.cstub` each `define_const(…)` line is followed by `#endif`. So
 `#define`ing it artificially could cause a problem – but  `Ruby` is not
 used here, this code never reached.

-- 
Ticket URL: <https://trac.macports.org/ticket/54446#comment:19>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list