-
Notifications
You must be signed in to change notification settings - Fork 243
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
Won't build on Mac OS X Monterey #181
Comments
Can Confirm. Same Issue. |
notes | 05/31/22 | 2:26AM | chris-dev Building with: |
I have integrated your fix to my code and now this happens. https://pastebin.com/u5SPbhQr |
Have you installed the M1 version of libusb? What package system are you using to install it? |
It works on my side (Intel iMac) |
Are you using the native ARM version of libusb? It's actually possible to install and run the intel versions of these package managers on Apple's ARM using Rosetta. Use "file" to check that the actual libraries are arm64 or aarch64 or whatever they call Apple's ARM variant these days. (I think I recall that counterintuitively Apple uses "arm64" and non-Apple 64-bit ARM uses "aarch64" for historical reasons). I don't have an M1 Mac, but you should see something like this, except with arm64 or aarch64 or something similar instead of x86_64:
|
That's because you have a x64 architecture, in 2020 Apple released their M1 MacBooks which ran on arm64 architecture instead of amd64 or x64. I thought is was a developers job to make their software usable on all platforms. Also M1 MacBooks are 100% different that Arch Linux, Raspberry Pi, and Intel Macs |
Please try #185 for the alloca etc compile failures. For the M1 build problem, please create a separate issue. I don't have a M1 build environment (and it's not a target we automatically build for) so it's likely that you'll need to work out the underlying problem yourself and provide a PR (either build changes, if needed, or doc updates to describe what's needed in the build environment) |
@ChrisDev8 Check if there is a libusb-1.0.0.dylib at /opt/homebrew/lib, then try |
That's why I'm asking you to check that the libusb you're using has the right architecture. The linker is either not finding it or there's something wrong with it. In an attempt to diagnose the problem, could you locate the libusb.dylib on your system, and use the |
I tried those pull request and now getting this error. Building with:
Version string: unknown
Architecture: arm64
DSP mix: generic
RTLSDR support: yes
BladeRF support: yes
HackRF support: yes
LimeSDR support: no
cc -g -o dump1090 dump1090.o anet.o interactive.o mode_ac.o mode_s.o comm_b.o net_io.o crc.o demod_2400.o stats.o cpr.o icao_filter.o track.o util.o convert.o ais_charset.o adaptive.o cpu.o sdr.o fifo.o sdr_ifile.o dsp/helpers/tables.o sdr_rtlsdr.o sdr_bladerf.o sdr_hackrf.o compat/clock_nanosleep/clock_nanosleep.o dsp/generated/flavor.generic.o dsp/generated/dispatcher.o -lpthread -lm -L/opt/homebrew/Cellar/librtlsdr/0.6.0/lib -lrtlsdr -lusb-1.0 -L/opt/homebrew/Cellar/libbladerf/2021.10/lib/ -lbladeRF -L/opt/homebrew/Cellar/hackrf/2021.03.1/lib -lhackrf -lncurses
ld: library not found for -lusb-1.0
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [dump1090] Error 1 I Used make -v and i get this:
It's a compatibility error |
Please create a separate issue for your build problems, and be sure to include the command line you are using when trying to build -- I note that you still don't have the right library path in your LDFLAGS. |
Original issue is fixed on the dev branch, closing this. |
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
The text was updated successfully, but these errors were encountered: