Opened 5 years ago

Closed 5 years ago

#60429 closed defect (fixed)

cfm: fatal error: 'stdatomic.h' file not found

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: WillEccles (Will Eccles)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc:
Port: cfm

Description

cfm fails to build on Lion because it can't find the stdadomic.h header. See this log:

cc -O3 -std=c11 -Wall -W -pedantic -D_XOPEN_SOURCE=700 cfm.c -o cfm
cfm.c:19:10: fatal error: 'stdatomic.h' file not found
#include <stdatomic.h>
         ^
1 error generated.

Lion's clang is supposed to support C11, but apparently this header was missing until Xcode 7. You could combat this using:

PortGroup compiler_blacklist_versions 1.0

near the top of the Portfile after the PortSystem line, and

compiler.blacklist-append {clang < 700}

near the end of the file. However, compiler blacklisting will have no effect until the port is using the right compiler.

Change History (1)

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

Resolution: fixed
Status: assignedclosed

In 3f10173a71f4d1d03e69b7d9e8b3d2d1c394060f/macports-ports (master):

cfm: Blacklist compilers without stdatomic.h

Closes: #60429

Note: See TracTickets for help on using tickets.