Opened 4 years ago

Closed 4 years ago

#60302 closed defect (fixed)

nds2-client @0.16.2: error: cannot omit braces around initialization of subobject when using direct list-initialization

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: emaros
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: lion Cc:
Port: nds2-client

Description

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.

Attachments (1)

main.log.bz2 (10.2 KB) - added by ryandesign (Ryan Carsten Schmidt) 4 years ago.

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: main.log.bz2 added

comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Ed responded by email:

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.

In that case, I will add

compiler.cxx_standard 2011

to the Portfile and then MacPorts should know which compilers to exclude.

comment:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

In f549f6b58a4d86a42447d64d4204529ff73545fd/macports-ports (master):

nds2-client: compiler.cxx_standard 2011

Closes: #60302

Note: See TracTickets for help on using tickets.