[MacPorts] #67545: gnucash @5.0_1: error: no template named 'unary_function' in namespace 'std' (was: gnucash @5.0_1: doesn't build on macos 10.11 and other)
MacPorts
noreply at macports.org
Thu Jun 1 17:46:18 UTC 2023
#67545: gnucash @5.0_1: error: no template named 'unary_function' in namespace
'std'
----------------------+----------------------
Reporter: tenzap | Owner: drkp
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Resolution: | Keywords:
Port: gnucash |
----------------------+----------------------
Comment (by ryandesign):
The Portfile sets `compiler.cxx_standard 2017` and I see `-std=c++17` in
the log.
The Internet tells me `std::unary_function` is deprecated in C++11 and
removed in C++17.
So this is not a situation of El Capitan being too old. On the contrary,
it's a situation where the compiler we're using to support those old
systems (Clang 16 in this case) is so new that it has removed support for
`unary_function` which boost, which gnucash depends on, uses. I think the
Xcode clang versions we're using on newer macOS versions already support
C++17 but aren't new enough that they removed `unary_function`, but they
will start failing too once we update to newer versions of Xcode.
gnucash is using boost 1.71 which is old. The
[https://github.com/boostorg/config/pull/440 upstream PR about this issue]
has been merged so it should either be fixed in the latest boost or the
next boost to be released; gnucash could switch to newer boost.
--
Ticket URL: <https://trac.macports.org/ticket/67545#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list