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

SoapyHackRF installs but is not found by probe #42

Open
hambone01 opened this issue Oct 13, 2022 · 3 comments
Open

SoapyHackRF installs but is not found by probe #42

hambone01 opened this issue Oct 13, 2022 · 3 comments

Comments

@hambone01
Copy link

I installed hackrf with brew:

brew install hackrf

─gormanst@d-vyjyrp9t06 /opt 
╰─$ brew install hackrf
==> Downloading https://ghcr.io/v2/homebrew/core/hackrf/manifests/2022.09.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/hackrf/blobs/sha256:b3b9c286eba911da05c8df47bb447616925070acaa8b3d44ed2337a814ca2220
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:b3b9c286eba911da05c8df47bb447616925070acaa8b3d44ed2
######################################################################## 100.0%
==> Pouring hackrf--2022.09.1.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/hackrf/2022.09.1: 18 files, 712.5KB
==> Running `brew cleanup hackrf`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

I then installed SoapyHackRF

─$ cd SoapyHackRF 
╭─gormanst@d-vyjyrp9t06 ~/temp/SoapyHackRF ‹master› 
╰─$ mkdir build
╭─gormanst@d-vyjyrp9t06 ~/temp/SoapyHackRF ‹master› 
╰─$ cd build 
╭─gormanst@d-vyjyrp9t06 ~/temp/SoapyHackRF/build ‹master› 
╰─$ cmake ..
CMake Deprecation Warning at CMakeLists.txt:5 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The CXX compiler identification is AppleClang 14.0.0.14000029
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build type not specified: defaulting to release.
-- Found PkgConfig: /opt/homebrew/bin/pkg-config (found version "0.29.2") 
-- Found LIBHACKRF: /opt/homebrew/Cellar/hackrf/2022.09.1/lib/libhackrf.dylib  
-- LIBHACKRF_INCLUDE_DIRS - /opt/homebrew/Cellar/hackrf/2022.09.1/include/libhackrf
-- LIBHACKRF_LIBRARIES - /opt/homebrew/Cellar/hackrf/2022.09.1/lib/libhackrf.dylib
-- Checking for hackrf_device_list API...
--   Reading /opt/homebrew/Cellar/hackrf/2022.09.1/include/libhackrf/hackrf.h...
-- Found Git: /usr/local/bin/git (found version "2.33.0") 
-- Module HackRFSupport configured with version: 0.3.4-6c0c33f
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/gormanst/temp/SoapyHackRF/build

omitting warnings:

╰─$ sudo make install
Password:
Consolidate compiler generated dependencies of target HackRFSupport
[100%] Built target HackRFSupport
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib/SoapySDR/modules0.8/libHackRFSupport.so

However, after installation SoapySDRUtil check/probe can't locate the driver.

╭─gormanst@d-vyjyrp9t06 ~/temp/SoapyHackRF/build ‹master●› 
╰─$ SoapySDRUtil --check=hackrf                            
######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

Loading modules... done
Checking driver 'hackrf'... MISSING!
╭─gormanst@d-vyjyrp9t06 ~/temp/SoapyHackRF/build ‹master●› 
╰─$ SoapySDRUtil --probe="driver=hackrf"                                                                   1 ↵
######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

Probe device driver=hackrf
Error probing device: SoapySDR::Device::make() no match

I have seen some mentions of setting my LD_LIBRARY_PATH

@talesluna
Copy link

talesluna commented Jan 29, 2023

Hi @hambone01 and everyone. I passed by the same issue and this solution worked for me.

Homebrew install the libs at /opt/homebrew/lib/ (🤷‍♂️) and the project at /usr/local/lib/ by unix pattern. So i just copied the file lib file to /opt/homebrew/lib/ and all works fine.

cp /usr/local/lib/SoapySDR/modules0.8/libHackRFSupport.so /opt/homebrew/lib/SoapySDR/modules0.8/

Before

build❯ SoapySDRUtil --find                                                                                                                         SoapyHackRF/git/master 
######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

No devices found! 

After

######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

Found device 0
  device = HackRF One
  driver = hackrf
  label = HackRF One #0 xxxxxxxxxxxxxxx
  part_id = zzzzzzzzzzzzzzzz
  serial = 00000000000000000xxxxxxxxxxxxxxx
  version = 2021.03.1

@nodemand
Copy link

nodemand commented Oct 7, 2023

@talesluna Thank you soooo much!!

@ybm911
Copy link

ybm911 commented Apr 19, 2024

You need to specify the file location during compilation:

cmake -DCMAKE_INSTALL_PREFIX=/opt/homebrew ..

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

No branches or pull requests

4 participants