Cannot see my custom blocks in GRC

Hi all,

After having problems in version 3.6.5 I decided to move to 3.7. So I
reinstalled Ubuntu to start with a clean OS without ‘loose ends’
pointing to old GNU radio versions, then installed UHD and GNU radio via
Ettus R. packages. Versions:

GNU radio 3.7.2.1 (standard installation to /usr/lib)
CMake 2.8.7
Ubuntu 12.04

After installing my custom blocks, they are not available in GRC (in
3.6.5 I had no problems with that). I followed the tutorial for
out-of-tree modules. Output of ‘make install’ (followed by ‘sudo
ldconfig’):

[ 33%] Built target gnuradio-TNO_jamming
[ 66%] Built target test-TNO_jamming
[100%] Built target pygen_python_2a2c4
[100%] Built target pygen_apps_9a6dd
Install the project…
– Install configuration: “Release”
– Installing: /usr/local/lib/cmake/TNO_jamming/TNO_jammingConfig.cmake
– Installing: /usr/local/include/TNO_jamming/api.h
– Installing: /usr/local/include/TNO_jamming/sweeped_LO.h
– Installing: /usr/local/include/TNO_jamming/random_OFDM.h
– Installing: /usr/local/lib/libgnuradio-TNO_jamming.so
– Installing:
/usr/local/lib/python2.7/dist-packages/TNO_jamming/init.py
– Installing:
/usr/local/lib/python2.7/dist-packages/TNO_jamming/init.pyc
– Installing:
/usr/local/lib/python2.7/dist-packages/TNO_jamming/init.pyo
– Installing:
/usr/local/share/gnuradio/grc/blocks/TNO_jamming_sweeped_LO.xml
– Installing:
/usr/local/share/gnuradio/grc/blocks/TNO_jamming_random_OFDM.xml

I set some environment variables to see if this changes things:

export PYTHONPATH=/usr/local/lib/python2.7/dist-packages:$PYTHONPATH
export export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

But the blocks are still not available in GRC (I expect a new category
‘TNO_jamming’ in the list with my blocks). Any ideas?

Jeroen

On 01/17/2014 03:20 PM, [email protected] wrote:

Hi all,

After having problems in version 3.6.5 I decided to move to 3.7. So I
reinstalled Ubuntu to start with a clean OS without ‘loose ends’
pointing to old GNU radio versions, then installed UHD and GNU radio via
Ettus R. packages. Versions:

GNU radio 3.7.2.1 (standard installation to /usr/lib)
CMake 2.8.7
Ubuntu 12.04

When GRC goes to /usr/lib, it doesn’t look in /usr/local/lib for blocks.
We know about this and it will be fixed in an upcoming release.

In the meantime, the solution is very simple. You can either add another
env variable

GRC_BLOCKS_PATH=:/usr/local/share/gnuradio/grc/blocks

or edit .gnuradio/config.conf to search for blocks in other places.

MB

Martin B. schreef op 2014-01-17 16:31:

CMake 2.8.7
GRC_BLOCKS_PATH=:/usr/local/share/gnuradio/grc/blocks

or edit .gnuradio/config.conf to search for blocks in other places.

MB


Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page

For some reason I can’t get it to work… I added the env var manually:

export GRC_BLOCKS_PATH=/usr/local/share/gnuradio/grc/blocks

which did not seem to work (although that folder contains my xml-files
of both blocks).

Then I did a search for the config.conf file which isn’t on my file
system, so I created one in ~/.grc_gnuradio (I have no ~/.gnuradio
folder…):

[grc]
local_blocks_path=/usr/local/share/gnuradio/grc/blocks

No result… What do I do wrong?

On 18-1-2014 16:45, Martin B. wrote:

folder…):
by manually copying the blocks to /usr/share[…] and see if they turn up
in GRC.

MB


Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page

I copied the xml-files manually to usr/share, and now they appear in
GRC. I can use them in a flowgraph, change parameters etc. BUT: the
next error I encounter now is the message:

  ImportError: No module named TNO_jamming_swig

where ‘TNO_jamming’ is the name of my module. The only file on the drive
that has something to do with the error is ‘TNO_jamming_swig.i’ in my
module folder (gr-TNO_jamming). Getting lost again…

On 01/17/2014 05:05 PM, [email protected] wrote:

[grc]
local_blocks_path=/usr/local/share/gnuradio/grc/blocks

No result… What do I do wrong?

Assuming you’ve double-checked the paths, there’s always the possibility
that your XMLs are borked. If you run gnuradio-companion in the command
line, do you see any errors or warnings corresponding to your block?

If you’re sure you’re blocks work, test if it’s really a pathing problem
by manually copying the blocks to /usr/share[…] and see if they turn up
in GRC.

MB