Skip to content

Conversation

@mringwal
Copy link

@mringwal mringwal commented Dec 9, 2021

This PR is based on mikaeleiman's #36
It first detects the OS type in the Makefile using uname and picks hidapi for macOS and libusb for linux as before.

@mringwal mringwal changed the title Mac port macOS port Dec 9, 2021
README.md Outdated
The implementation makes use of libusb for Linux builds and hidapi for Windows.
For Linux we include a build and installation script, `build.sh` and `install.sh` respectively, for building and installing the application.
The implementation makes use of libusb for Linux builds and hidapi for macOS and Windows.
For Linux nad macOS we include a build and installation script, `build.sh` and `install.sh` respectively, for building and installing the application.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small typo here, "nad" instead of "and".

Thanks for cleaning up my proof of concept mess! :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem - thanks for the proof of concept to get started.

@mvi
Copy link

mvi commented Jun 1, 2023

Hey, firstly thanks for implementing this.

I had a few issues getting this to work on an M1 Mac (Apple Silicon):

Missing pkg-config

Firstly I hadn't got pkg-config installed, I fixed this with

brew install pkg-config

I'd suggest adding this to install instructions as you've done with hidapi

Linker Error

I then had a linker error

ld: library not found for -lhidapi

This took me a while to figure out a workaround for, I'm not sure it's the best way of handling it however with

export LIBRARY_PATH=/opt/homebrew/lib

I'm guessing this is more of a Silicon specific issue with the move of homebrew to /opt I wonder if there's a better way of handling this

Install Error

This then successfully compiled and linked producing an executable.

However running sudo ./install.sh then failed with Operation not permitted.

I manually copied it to another folder in PATH and it now seems happy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants