JuliaTelecom / UHDBindings.jl

Julia C bindings for UHD to monitor USRP devices.
MIT License
5 stars 3 forks source link

Boost Error #3

Closed sclel016 closed 3 years ago

sclel016 commented 3 years ago

Hi,

I'm trying out the library and getting an error during the initialization of the radio object. Looks like an error with Boost version on my system. Before trying with Julia and UHDBindings.jl I used the Fedora uhd package which has a dependency on some Boost 1.75 libraries. Is it possible to modify the UHDBindings.jl module to prioritize libUHD.so in the system path instead?

Distro: Fedora 34 Julia: 1.6.1 Boost: 1.75

Error:

ERROR: could not load library "/home/<user>/.local/share/julia/artifacts/95ad926e1c215f57d98d15df1c28ddf72873a990/libuhd.so"
libboost_date_time.so.1.65.1: cannot open shared object file: No such file or directory
Stacktrace:
 [1] macro expansion
   @ ~/.local/share/julia/packages/UHDBindings/zrWMV/src/common.jl:97 [inlined]
 [2] openUHD(carrierFreq::Float64, samplingRate::Float64, gain::Int64, antenna::String; args::String)
   @ UHDBindings ~/.local/share/julia/packages/UHDBindings/zrWMV/src/UHDBindings.jl:90
 [3] openUHD (repeats 2 times)
   @ ~/.local/share/julia/packages/UHDBindings/zrWMV/src/UHDBindings.jl:88 [inlined]
 [4] top-level scope
   @ REPL[8]:1
RGerzaguet commented 3 years ago

Hello,

I don't have the bandwidth to do so, but as a temporary workaround you can just dev the package and change line 26 of UHDBindings.jl from

const libUHD = joinpath(libUHD_rootpath, "libuhd.so");

to

const libUHD = "libuhd"

or even to

const libUHD = "/usr/lib/x86_64-linux-gnu/libuhd.so.4.xx";

if you have several UHD libs available and you want to use one specific version.

sclel016 commented 3 years ago

That was my temporary hack. If I can find some time, would you consider a PR that prioritizes system installs if present?

RGerzaguet commented 3 years ago

Yes of course 👍 , but I don't really know how to be able to switch from artifact to local install on the fly though.

RGerzaguet commented 3 years ago

PR https://github.com/JuliaTelecom/UHDBindings.jl/pull/4 is merged :)