Opened 7 years ago

Closed 6 years ago

#55608 closed defect (fixed)

dar @2.5.14: error: C++ compiler lack support for c++11 standard

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: mavericks yosemite Cc:
Port: dar

Description

Mavericks uses libc++ which has C++11 support, but dar's configure says:

checking for c++11 support... no
checking for c++ support with -std=c++11 option set... no
configure: error: C++ compiler lack support for c++11 standard

Maybe it needs a newer clang and we should blacklist old versions. Will investigate config.log.

Change History (2)

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

Keywords: yosemite added

Same on Yosemite.

The error is:

configure:21468: checking for c++11 support
configure:21482: /usr/bin/clang++ -c -pipe -Os -stdlib=libc++ -arch x86_64 -I/opt/local/include conftest.cpp >&5
conftest.cpp:106:2: error: unknown type name 'thread_local'
 thread_local static int test = 0;
 ^
conftest.cpp:106:15: error: expected unqualified-id
 thread_local static int test = 0;
              ^
2 errors generated.

Thread local is available in open-source clang 3.3 and later, but Apple did not include it until Xcode 8 because they apparently wanted to write a different implementation.

It builds on El Capitan with Xcode clang 800.0.42.1.

It also builds on Mountain Lion with MacPorts clang 5.

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

Resolution: fixed
Status: newclosed

In 6209f9f0cb1f019321d76f9d5998597e255b134a/macports-ports (master):

dar: Blacklist clang from Xcode < 8

Fixes build on OS X 10.9 and 10.10, and on 10.11 for users who haven't
upgraded to Xcode 8.

Closes: #55608

Note: See TracTickets for help on using tickets.