Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile: use pkg-config to detect libusb on macOS #197

Merged
merged 1 commit into from
Oct 6, 2022

Conversation

sdlyyxy
Copy link

@sdlyyxy sdlyyxy commented Aug 16, 2022

Makefile: use pkg-config to detect libusb on macOS
Some versions of librtlsdr (including the version installed by Homebrew
bottle) wrongly declare -lusb-1.0 in its pkg-config file's Libs section.
On Apple Silicon Macs, Homebrew installs libusb dylibs in /opt/homebrew/lib,
which is not a known path for linkers and causes build failure. Some people
reported this linker problem in #166, #181. This should fix it.

For the redundant -lusb-1.0 problem, also see:
https://gitea.osmocom.org/sdr/rtl-sdr/commit/222517b506278178ab93182d79ccf7eb04d107ce

Some versions of librtlsdr (including the version installed by Homebrew
bottle) wrongly declare -lusb-1.0 in its pkg-config file's Libs section.
On Apple Silicon Macs, Homebrew installs libusb dylibs in /opt/homebrew/lib,
which is not a known path for linkers and causes build failure. Some people
reported this linker problem in flightaware#166, flightaware#181. This should fix it.

For the redundant -lusb-1.0 problem, also see:
https://gitea.osmocom.org/sdr/rtl-sdr/commit/222517b506278178ab93182d79ccf7eb04d107ce
@sdlyyxy sdlyyxy changed the base branch from master to dev August 16, 2022 12:17
@sdlyyxy sdlyyxy changed the title dev Makefile: use pkg-config to detect libusb on macOS Aug 16, 2022
@mutability
Copy link

I can't test this right now but it looks reasonable..

@mutability mutability merged commit 6db3a48 into flightaware:dev Oct 6, 2022
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.

None yet

2 participants