2

For some reason, while CMake is able to find libusb-1.0 (from pkgconfig) and correctly identify its linked location, the linker is not able to find the library (i.e., I receive the error ld: library not found for -lusb-1.0.)

Some details:

  • I am using an M1 Mac
  • libusb was installed using Homebrew and brew link reports it has been linked
  • This comes from trying to compile osmocom's rtl-sdr library found here (essentially cloning, making a new build/ directory in the cloned repo folder, and running cmake ../ from this new directory)
  • similar things have failed in previous compilation attempts with other packages

It is very possible I'm being silly and there is an additional step that needs to be taken when attempting to link against these libraries on Big Sur? I'm honestly not 100% sure here.

Thank you in advance !

1
  • 1
    I was able to fix the error by manually specifying the library location to the linker, but it feels like there should be a simpler way to go about this? I'm leaving it up as I'm still interested in a more general solution :) Commented Jul 26, 2021 at 18:12

1 Answer 1

-1

Issue the command:

autoreconf -i -I/opt/homebrew/share/aclocal

Ticket to update wiki: https://osmocom.org/issues/6012

3
  • That is building a library with autotools - however this library is being built with CMake
    – mmmmmm
    Commented Apr 23, 2023 at 7:46
  • There are instructions on osmocom.org/projects/rtl-sdr/wiki/Rtl-sdr how to build using either cmake or autotools......neither of these documented instructions worked on my macos. I was able to figure out how to build using autotools. Commented Apr 24, 2023 at 10:37
  • I think you need to put that in the answer
    – mmmmmm
    Commented Apr 24, 2023 at 10:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .