gr-tempest icon indicating copy to clipboard operation
gr-tempest copied to clipboard

Error executing example flowgraphs - libgnuradio-tempest.so.1.0.0:cannot open shared object file

Open Hammie5150 opened this issue 1 year ago • 5 comments

I have installed and compiled gr-tempest without errors. When I try to run any of the example flowgraphs, I get:

File "/usr/local/lib/python3.10/dist-packages/gnuradio/tempest/init.py", line 18, in from .tempest_python import * ImportError: libgnuradio-tempest.so.1.0.0: cannot open shared object file: No such file or directory

I cannot find any reference to this error or this library. Stock GNU flowgraphs run without issue. Any help is appreciated.

Hammie5150 avatar Aug 13 '24 01:08 Hammie5150

Hi. You probably forgot to execute $ sudo ldconfig in your terminal.

git-artes avatar Aug 13 '24 10:08 git-artes

Thanks for the reply. That command did not resolve the issue.

Hammie5150 avatar Aug 14 '24 01:08 Hammie5150

Mmmm... Other questions: Is libgnuradio-tempest.so.1.0.0 anywhere on your system? Did you "$sudo make install"?

git-artes avatar Aug 14 '24 11:08 git-artes

Yes, libgnuradio-tempest.so.1.0.0 is on the system under /etc/lib/. Yes, I did the make install after the build per the build/installation instructions.

Hammie5150 avatar Aug 15 '24 21:08 Hammie5150

That's not the typical place for the shared libraries to be located at, maybe that's the problem. In my system it is located at /usr/local/lib/x86_64-linux-gnu/.

Maybe you could edit /etc/ld.so.conf so that it includes /etc/lib/?

git-artes avatar Aug 16 '24 12:08 git-artes

Hello, I am having this issue as well. I am stumped as to what might be causing it. When I execute ldconfig, it moves the tempest python module into a folder called gnuradio which means that I get the "module not found error" when importing the library. /usr/local/lib/x86_64-linux-gnu/ does contain libgnuradio-tempest.so.1.0.0 I created a docker file that essentially illustrates all the steps that are done when installing gr-tempest.

Here is the Dockerfile:

FROM ubuntu:22.04 LABEL maintainer="Federico 'Larroca' La rocca - [email protected]" LABEL editor="ravenspired"

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update

RUN apt-get install -y gir1.2-gtk-3.0

RUN apt-get install -y software-properties-common

RUN apt-get update && apt-get install -y wget gnupg2

RUN apt-get install -y sudo RUN useradd --create-home --shell /bin/bash -G sudo gnuradio RUN echo 'gnuradio:gnuradio' | chpasswd

RUN mkdir /home/gnuradio/persistent && chown gnuradio /home/gnuradio/persistent

RUN apt-get update

RUN apt-get install -y gnuradio

RUN apt-get install -y gnuradio-dev cmake git libboost-all-dev libcppunit-dev liblog4cpp5-dev python3-pygccxml pybind11-dev liborc-dev python3-pip libgsl-dev libsndfile1-dev

RUN apt-get install -y vim

RUN pip install packaging

WORKDIR /persistent RUN git config --global http.sslverify "false" RUN git clone https://github.com/git-artes/gr-tempest.git WORKDIR /persistent/gr-tempest

RUN gr_modtool bind Hsync RUN gr_modtool bind fft_peak_fine_sampling_sync RUN gr_modtool bind fine_sampling_synchronization RUN gr_modtool bind frame_drop RUN gr_modtool bind framing RUN gr_modtool bind infer_screen_resolution RUN gr_modtool bind normalize_flow RUN gr_modtool bind sampling_synchronization RUN gr_modtool bind ssamp_correction RUN gr_modtool bind sync_detector

RUN cmake . RUN make RUN make install

USER gnuradio

WORKDIR /home/gnuradio

ENV PYTHONPATH "${PYTHONPATH}:/usr/local/lib/python3/dist-packages"

CMD bash

Do you have any idea on what I could be missing? Ive tried installing on both virtual machines, docker, and actual hardware and have not been able to get past this problem on any platforms.

ravenspired avatar Nov 29 '24 04:11 ravenspired

Sorry I forgot to add system info, I'm using Ubuntu 22, GNURadio 3.10.1.1, Python 3.10.12. I took the docker image on https://github.com/git-artes/docker-gnuradio and tried modifying it to install gr-tempest.

ravenspired avatar Nov 29 '24 04:11 ravenspired

Ok, I finally had time to get back to this.

I updated /etc/ld.so.conf to include the directory for shared libraries, which for me was /usr/local/lib/. I inserted the string 'include=/usr/local/lib', but now it throws:

ModuleNotFoundError: No module named ‘tempest’

Hammie5150 avatar Jan 08 '25 16:01 Hammie5150

I assume this ModuleNotFoundError comes from the line import tempest?

If so, that error is caused by grc generating the import statement for tempest twice, once as import tempest and once as from gnuradio import tempest. You can delete the second import statement and then run the .py file from your terminal.

Running it from grc again will regenerate the second import statement and produce the same error. A cleaner solution would be to figure out why that grc tries to import tempest twice, but this workaround still runs fine.

Yathoss avatar Mar 16 '25 10:03 Yathoss