[MacPorts] #60302: nds2-client @0.16.2: error: cannot omit braces around initialization of subobject when using direct list-initialization
Edward Maros
pappa.maros at gmail.com
Fri Apr 3 13:36:39 UTC 2020
On 4/2/20 21:35, MacPorts wrote:
> #60302: nds2-client @0.16.2: error: cannot omit braces around initialization of
> subobject when using direct list-initialization
> ------------------------+-------------------------
> Reporter: ryandesign | Owner: emaros
> Type: defect | Status: assigned
> Priority: Normal | Milestone:
> Component: ports | Version: 2.6.2
> Keywords: lion | Port: nds2-client
> ------------------------+-------------------------
> nds2-client fails to build on Lion only:
>
> {{{
> :info:build
> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_nds2-client/nds2-client/work/nds2-client-0.16.2/src/common/common/status_codes.hh:16:50:
> error: cannot omit braces around initialization of subobject when using
> direct list-initialization
> :info:build const auto STATUS_DAQD_OK = status_code{ '0', '0',
> '0', '0' };
> :info:build
> ^~~~~~~~~~~~~~~~~~
> :info:build {
> }
> :info:build
> }}}
>
> It builds fine on Snow Leopard (using gcc) and it builds fine on Mountain
> Lion and later (using clang). My guess is that later versions of clang
> have relaxed whatever this restriction is.
>
> Possible solutions might include adding the braces as mentioned in the
> error message or blacklisting older versions of clang.
>
After doing some research, it seems that the correct solution is to
blacklist. The syntax being used changed during the C++2011 standard and
is acceptable from late 2011 and beyond. What compilers need to be
blacklisted? I will change the Portfile once I know.
Thanks,
Ed
More information about the macports-dev
mailing list