Opened 20 months ago

Last modified 14 months ago

#67189 assigned defect

hidapi @0.12.0_0: hidapi_darwin.h missing — at Version 2

Reported by: UNIVAC-Colonel-Panic Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc:
Port: hidapi

Description (last modified by ryandesign (Ryan Carsten Schmidt))

My first report -- please be kind :) as I am not very familiar with the MacPorts ecosystem.

I'm compiling a program and it fails with this error:

fatal error: 'hidapi/hidapi_darwin.h' file not found; #include <hidapi/hidapi_darwin.h>

When I extract the source tarball: https://github.com/libusb/hidapi/archive/refs/tags/hidapi-0.12.0.tar.gz

there are two hidapi-related headers:

  • hidapi-0.12.0/mac/hidapi_darwin.h (about 4k bytes)
  • hidapi-0.12.0/hidapi/hidapi.h (about 18k bytes)

After I do sudo port install hidapi the only hidapi-related header file on my Big Sur is located here:

  • /opt/local/include/hidapi/hidapi.h (about 18k bytes)

In case it helps, Homebrew puts these headers here:

  • /usr/local/include/hidapi/hidapi.h -> /usr/local/Cellar/hidapi/... (about 18k bytes)
  • /usr/local/opt/hidapi/include/hidapi/hidapi.h -> /usr/local/Cellar/hidapi/... (about 18k bytes)
  • /usr/local/include/hidapi/hidapi_darwin.h -> /usr/local/Cellar/hidapi/... (about 4k bytes)
  • /usr/local/opt/hidapi/include/hidapi/hidapi_darwin.h -> /usr/local/Cellar/hidapi/... (about 4k bytes)

Change History (2)

comment:1 Changed 20 months ago by jmroot (Joshua Root)

Cc: raimue@… removed
Owner: set to raimue
Status: newassigned

comment:2 Changed 20 months ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

The hidapi Portfile contains no special directives affecting what gets installed, so it's entirely up to the hidapi build system what gets installed, and I guess they don't install hidapi_darwin.h.

To the extent that I understand its syntax, the Homebrew formula doesn't seem to mention anything about hidapi_darwin.h either. However, Homebrew is installing 0.13.1 while we are installing 0.12.0. Maybe we should start by updating the port to the latest version. That may already fix it. Maybe there was a bug in 0.12.0 that caused that file not to get installed. I do see one place (in dist/hidapi.podspec) where they forgot to mention that header in 0.12.0 and fixed it afterward but I don't know if that file is involved in the installation process.

Note: See TracTickets for help on using tickets.