[MacPorts] #65752: libusb @1.0.26: error: compiler with C11 support is required to build libusb

MacPorts noreply at macports.org
Wed Sep 7 22:21:31 UTC 2022


#65752: libusb @1.0.26: error: compiler with C11 support is required to build
libusb
---------------------------+-----------------------
  Reporter:  barracuda156  |      Owner:  michaelld
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.7.2
Resolution:                |   Keywords:
      Port:  libusb        |
---------------------------+-----------------------

Comment (by ryandesign):

 Different C11 features were added to clang in different versions. When you
 tell MacPorts you want C11, it requires a version of clang that supports
 most C11 features (Apple clang ≥ 500 or open source clang ≥ 3.3), but in
 particular these minimum versions do not support stdatomic.h, which libusb
 uses. We could change MacPorts base so that requiring C11 guarantees the
 presence of stdatomic.h, but that would mean that many ports that use
 other C11 features but not stdatomic.h would bring in dependencies on
 newer compilers that are unnecessary. I can't say whether we should do
 that, but so far we haven't, and instead we've had each port that needs
 stdatomic.h add an additional compiler.blacklist for this such as
 [changeset:e185a41504e4ff4477354d6e8d3377b0e823b3e5/macports-ports this
 commit for libusb]. We determined that stdatomic.h support was added to
 Apple clang in version 700. But I think it didn't appear in open source
 clang until 3.5.2-rc1 (based on the list of git tags associated with
 [https://github.com/llvm/llvm-
 project/commit/6970ac8b0a125136d1151740993af4c36b678def this commit that
 added stdatomic.h to llvm]), so we need to blacklist clang-3.3 and
 clang-3.4 as well—not just in libusb, but also in all other ports that
 blacklist Apple clang < 700 for this reason. (Usually the port will
 include a comment line above the compiler.blacklist line citing the reason
 for the blacklist.)

-- 
Ticket URL: <https://trac.macports.org/ticket/65752#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list