Opened 3 weeks ago

#71125 assigned defect

hostage @1.0.1: error: no type named 'any' in namespace 'std'

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: emcrisostomo (Enrico Maria Crisostomo)
Priority: Normal Milestone:
Component: ports Version: 2.10.2
Keywords: Cc:
Port: hostage

Description

https://build.macports.org/builders/ports-15_x86_64-builder/builds/16543/steps/install-port/logs/stdio

/usr/bin/clang++ -DHAVE_CMAKE_CONFIG_H -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_hostage/hostage/work/build -I/opt/local/include/antlr4-runtime -pipe -Os -DNDEBUG -I/opt/local/include -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -std=gnu++11 -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -mmacosx-version-min=15.0 -MD -MT CMakeFiles/hostage.dir/src/main.cpp.o -MF CMakeFiles/hostage.dir/src/main.cpp.o.d -o CMakeFiles/hostage.dir/src/main.cpp.o -c /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_hostage/hostage/work/hostage-1.0.1/src/main.cpp
In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_hostage/hostage/work/hostage-1.0.1/src/parser/hosts_file_parser.cpp:17:
In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_hostage/hostage/work/hostage-1.0.1/src/parser/hosts_file_parser.h:20:
In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_hostage/hostage/work/hostage-1.0.1/src/parser/../../gen/hostsBaseListener.h:7:
In file included from /opt/local/include/antlr4-runtime/antlr4-runtime.h:30:
In file included from /opt/local/include/antlr4-runtime/InterpreterRuleContext.h:8:
In file included from /opt/local/include/antlr4-runtime/ParserRuleContext.h:8:
In file included from /opt/local/include/antlr4-runtime/RuleContext.h:8:
In file included from /opt/local/include/antlr4-runtime/tree/ParseTree.h:8:
/opt/local/include/antlr4-runtime/support/Any.h:14:20: error: no type named 'any' in namespace 'std'
   14 |   using Any = std::any;
      |               ~~~~~^

std::any is a C++17 feature. The port needs to use compiler.cxx_standard 2017 and it needs to use -std=c++17 (or maybe -std=gnu++17) instead of -std=gnu++11.

Change History (0)

Note: See TracTickets for help on using tickets.