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

MacPorts noreply at macports.org
Thu Dec 24 01:08:48 UTC 2020


#61868: libusb @1.0.24: error: compiler with C11 support is required to build
libusb
-----------------------------------+-----------------------
  Reporter:  dgonyier              |      Owner:  michaelld
      Type:  defect                |     Status:  reopened
  Priority:  Normal                |  Milestone:
 Component:  ports                 |    Version:  2.6.4
Resolution:                        |   Keywords:
      Port:  libusb, libusb-devel  |
-----------------------------------+-----------------------

Comment (by kencu):

 Here's the upstream bug report for mainline gcc. It's been an issue for 10
 years:

 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50909>

 Hmmm. ... not 100% sure how to approach this.

 We could modify the existing USB.h header on relevant systems (well all
 systems, to be honest, that try to use USB.h with mainline gcc will see
 this, but practically it happens on 10.4 and 10.5), and put the modified
 USB.h header in legacysupport, as per the workaround in that ticket:

 ie in USB.h, change all the implementations of this
 {{{
 #pragma options align=reset
 }}}
 to
 {{{
 #if defined(__clang__) || defined(__llvm__)
     #pragma options align=reset
 #else
     #pragma pack()
 #endif
 }}}

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


More information about the macports-tickets mailing list