ghostop14 / gr-correctiq

GNURadio blocks to remove that IQ DC spike just like some software and drivers do! Three techniques available: auto, auto-tune to dc offset, and manual.
GNU General Public License v3.0
82 stars 19 forks source link

Runtime error, GRC on Ubuntu #2

Closed kevmiyashiro closed 7 years ago

kevmiyashiro commented 7 years ago

Hello,

Great writeup, great solution, thank you for making.

My setup: Running HackRF with a Raspberry Pi running Ubuntu.
using the osmocom source, QT GUI's. grabbed your source code, built it, etc. made sure grc was closed while building. relaunched GRC, found Correctiq, dropped it in. Ran it, got the following error:

File "/home/kevin/top_block2.py", line 165, in main() File "/home/kevin/top_block2.py", line 153, in main tb=top_block_cls() File "/home/kevin/top_block2.py", line 122, in_init_self.correctiq_correctiq_0=correctiq.correctiq() AttributeError:'module' object has not attribute 'correctiq'

Got any ideas?

ghostop14 commented 7 years ago

Hi, I've gotten that message with custom modules in the past too. Most often its because ldconfig wasn't run after the first install. Try closing gnuradio and running 'sudo ldconfig' the open gnuradio again and try. See if that does thr trick.

kevmiyashiro commented 7 years ago

Hi,

Thank you for the suggestion, I tried closing GRC, explicitly doing the sudo ldconfig (instead of just ldconfig) and then relaunching, unfortunately I get the same error.

Is there an easy way for me to deinstall everything and try again, would that solve this?

ghostop14 commented 7 years ago

You can 'sudo make uninstall' it. It sounds like Ubuntu is not loading the library. When you reinstall it make sure the library file /usr/local/lib/libgnuradio-correctiq.so is present. The only other thing I can think of is maybe it's something about the Pi build of Ubuntu? Can you try it on a standard Ubuntu install say in a VM or on hardware and see if it happens there?

kevmiyashiro commented 7 years ago

Hi, tried multiple options, same result each time. Also did the uninstall as you suggested, redid everything, same result.

Additional detail: on Pi, running Ubuntu "MATE" 16.04 Tried also on an AWS EC2 server (so not on rasp pi) running Ubuntu 16.04 LTS

On both Ubuntu's, the GRC version is 3.7.9.

I can confirm the correctiq.so is present in /usr/local/lib and I can successfully find it in the GRC UI and drop the component down.

I get a few warnings during the cmake / make, tried to capture them in output logs, but only got some of the returns back, most of the warnings got suppressed somehow.

I am attaching the logs here, FWIW. "out.txt" is the return from cmake.

Warnings that might be relevant: during cmake: Could NOT find Doxygen Disabling SWIG because version check failed Cmake warning (dev) at Cmake/Modules/Grtest.cmake:45 (get_target_property) Policy CMP0045 is not set: Error on non existent target in get_target_property

make_install_out.txt make_out.txt out.txt

I suspect it's something really subtle, but can't figure out what it is. What else could you suggest I try?

kevmiyashiro commented 7 years ago

Hello,

did a complete restart back to bare bones Ubuntu, retraced things.

I believe the mis-step I had was not having the latest swig installed. now correctiq runs, and successfully gets rid of the zero IF DC signal! thank you for your help.

ghostop14 commented 7 years ago

It does sound like some prereqs for building oot modules may be missing. Doxygen is for the documentation but swig wraps the c++ classes for access in python. So skipping swig due to version is probably the issue. See if there's a newer swig in the repo? The correctiq block is way less computationally intensive that sig src/multiply freq shifting so using it on a pi is a great idea. If you cant find a quick seig fix, I'd suggest uninstalling the repo gnuradio and install the latest using pybombs. I've used that on Ubuntu without issue and I believe the latest is still 3.7.10 so sounds like the repo version is outdated. But I really think seig is your issue. It explains not finding the class.

ghostop14 commented 7 years ago

Sorry didnt mean to close the issue yet. Did either of those suggestions correct your issue? (Its definitely related to that swig version error)

kevmiyashiro commented 7 years ago

Sorry for the late reply, yes, the swig version was the gating issue, once that was up to date, the module worked!

ghostop14 commented 7 years ago

Awesome! Glad I could help.