discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BladeRF 2 in GRC3.8


From: Marcus Müller
Subject: Re: BladeRF 2 in GRC3.8
Date: Wed, 18 Mar 2020 16:40:25 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

Hi Jerom,

now under Ubuntu 18.04:

On 18.03.20 13:45, Jerom Maas - LR wrote:
> Hello Marcus,
> 
> first of all, I hope that this email reaches you in good health. Thanks
> for your answer. I've tried to work as cautiously as possible, but it
> seems that I still have trouble installing gr-osmosdr. I hope that you
> can help me connecting the last dots.
> 
> I install GRC using the ppa:
> $ sudo add-apt-repository ppa:gnuradio/gnuradio-releases
> $ sudo apt-get update
> $ sudo apt install gnuradio
> 
> I install LibbladeRF using the ppa:
> $ sudo add-apt-repository ppa:bladerf/bladerf

yep, works now. They simply don't have any packages for modern Ubuntu.

> $ sudo apt-get update
> $ sudo apt-get install bladerf
> $ sudo apt-get install libbladerf-dev
> 
> Then I've installed two libraries for OsmoSDR:
> $ sudo apt update
> $ sudo apt install libosmosdr-dev
> $ sudo apt-get install librtlsdr-dev
> 

That's superfluous unless you want to use the RTL SDR or the very rare
OsmoSDR hardware.

> After this, it's time to follow the instructions on 
> https://osmocom.org/projects/gr-osmosdr/wiki#Automated-installation
> For this, I've used cmake version 3.15.2.

How did you install that? I'm doing

wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc
2>/dev/null | sudo apt-key add -
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'

to get the official CMake packages from kitware, but that gives me 3.16,
so you've got some strange third party installation (?).

> $ git clone git://git.osmocom.org/gr-osmosdr
> $ cd gr-osmosdr/
> $ mkdir build
> $ cd build/
> $ cmake ../

Works! And lists BladeRF as enabled component.

> After this, I try to do:
> $ make

THIS (not later) is the point where I get the linking error.
That makes a difference; I was assuming some run-time linker/.so loader
ambiguity, but this simply means gr-osmosdr's CMake scripts aren't
checking for all they need (maybe that's GNU Radio's fault due to
changing quite a bit of CMake infrastructure lately, I don't know).
I should've read more diligently, though; your error message says
"make", so I shouldn't have guessed it's make install :)

However, easy to solve:

sudo apt install liborc-0.4-dev

After that, `make` runs through without issue.

> $ sudo make install
> $ sudo ldconfig
> 
> But this is where I meet my error:
> 
> make[2]: *** No rule to make target
> '/usr/lib/x86_64-linux-gnu/liborc-0.4.so', needed by
> 'lib/libgnuradio-osmosdr.so.0.2.0.0'. Stop.
> CmakeFiles/Makefile2:177: recipe for target
> 'lib/CMakeFiles/gnuradio-osmosdr.dir/all' failed
> make[1]:*** [lib/CMakeFiles/gnuradio-osmosdr.dir/all] Error 2
> Makefile:140: recipe for target 'all' failed
> make: *** [all] Error 2
> 
> I've read that this means that '/usr/lib/x86_64-linux-gnu/liborc-0.4.so'
> is not found on my computer, which is indeed the case. In that folder, I
> do have the files: 
> liborc-0.4.so.0

.... that is confusing. There should be no liborc* whatsoever in there
unless you've installed it.

So, I'm putting my bets on future problems here on conflicting
installations. Make sure you don't have conflicting installations if it
doesn't work after installing liborc-0.4-dev

> So I decided to do a simple hack, and copied liborc-0.4.so.0 to a new
> file with the expected name:
> $ cd /usr/lib/x86_64-linux-gnu/
> $ sudo cp liborc-0.4.so.0 liborc-0.4.so

uuuh this probably works? Maybe? I don't recommend it. It's unclear
where your liborc-0.4.so.0 comes from if liborc isn't installed.

> When I go back to the previous terminal, it is found that 'make' does
> not provide any errors anymore, and 'make install'  and 'ldconfig' also
> work. And when I open GRC, I can find the Osmocom source and sink
> blocks, which are the ones that I need. So that's good. 
> 
> BUT 
> when I run my GRC flowchart, I get a python error:
> ModuleNotFoundError: No module named 'osmosdr'
> 
> I've spent some time trying to solve this, but I'm not getting any
> further. I guess that my little hack of renaming liborc was problematic,
> but then I wouldn't know where to find the original file. 

Yeah, dropping in random versions of libraries via symlinks has the
potential to do that.
However, here, it's most likely you should have run

cmake -DCMAKE_INSTALL_PREFIX=/usr ..

instead of `cmake ..`, because otherwise the python libraries simply get
installed into /usr/local/..., and Python doesn't look there.


Best regards,
Marcus



reply via email to

[Prev in Thread] Current Thread [Next in Thread]