[MacPorts] #67189: hidapi @0.12.0_0: hidapi_darwin.h missing

MacPorts noreply at macports.org
Thu Apr 6 06:01:50 UTC 2023


#67189: hidapi @0.12.0_0: hidapi_darwin.h missing
-----------------------------------+----------------------
  Reporter:  UNIVAC-Colonel-Panic  |      Owner:  raimue
      Type:  defect                |     Status:  assigned
  Priority:  Normal                |  Milestone:
 Component:  ports                 |    Version:  2.8.1
Resolution:                        |   Keywords:
      Port:  hidapi                |
-----------------------------------+----------------------

Old description:

> 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)

New description:

 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)

--

Comment (by ryandesign):

 The [https://github.com/macports/macports-
 ports/blob/master/comms/hidapi/Portfile 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
 [https://github.com/Homebrew/homebrew-
 core/blob/625866d3d50fe23535cb211401e6d54aafefb34a/Formula/hidapi.rb
 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
 [https://github.com/libusb/hidapi/commit/59e84ca74fae41a43f8ff3ea96b4f956c79c69b4
 fixed it afterward] but I don't know if that file is involved in the
 installation process.

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


More information about the macports-tickets mailing list