[MacPorts] #61868: libusb @1.0.24: cannot parse USB.h with mainline gcc versions due to variant pragma handling not accepted by gcc

MacPorts noreply at macports.org
Mon Oct 25 20:14:00 UTC 2021


#61868: libusb @1.0.24: cannot parse USB.h with mainline gcc versions due to
variant pragma handling not accepted by gcc
-----------------------------------+-----------------------
  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 michaelld):

 OK so if we want to do this generically, we need to augment LegacySupport.
 -If- this solution ("hack") is generic across macOS & GCC versions, then
 it would be a simple addition to LegacySupport as it is static / does not
 require parsing the current USB.h header (as my script requires). This is
 a positive feature! I would prefer to not just fix libusb, but rather use
 LegacySupport & fix the overarching issue.

 @evanmiller : if you look in LegacySupport there is code that shows how to
 "#include_next", which is I think what we want here. We create a file
 "include/IOKit/usb/USB.h" in LegacySupport that looks for GCC and its
 version & then does your hack if required. Then includes the next USB.h.
 I'm pretty sure this will work, and in this manner we can test out your
 hack & it would be much more robustly used!

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


More information about the macports-tickets mailing list