Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grc global_blocks_path and pybombs #505

Open
josephernst opened this issue Jun 18, 2018 · 3 comments
Open

grc global_blocks_path and pybombs #505

josephernst opened this issue Jun 18, 2018 · 3 comments
Labels

Comments

@josephernst
Copy link

When using multiple prefixes with pybombs and grc, I have to manually edit the global_blocks_path in ~/.gnuradio/config.conf when switching between prefixes. Otherwise, I have the wrong blocks in grc.

To replicate:

$ pybombs prefix init ~/prefix -a prefix -R gnuradio-default
$ pybombs prefix init ~/prefix2 -a prefix2 -R gnuradio-default
$ pybombs -p prefix2 install OUT_OF_TREE MODULE
$ source ~/prefix2/setup_env.sh
$ gnuradio-companion

Now the gnuradio-companion from prefix2 will load with the blocks list from prefix1

@mbr0wn mbr0wn added the bug label Jun 18, 2018
@mbr0wn
Copy link
Member

mbr0wn commented Jun 18, 2018

Wow, that is odd. How would it even know about prefix1? Bizarre.

@josephernst
Copy link
Author

Regardless of which prefix you choose, grc is referencing ~/.gnuradio/config.conf for the global_blocks_path environment variable.

@mbr0wn
Copy link
Member

mbr0wn commented Jul 3, 2018

OK, I see. You shouldn't have to edit your ~/.gnuradio/config.conf for the sake of accommodating PyBOMBS prefixes. If the path is unset, gnuradio-companion will usually find the blocks just fine by itself. @namccart changed this in 9c0e27f.

Maybe removing the line from config.conf is all it takes. I have a bunch of prefixes here and often switch back and forth (or even open multiple companions from different prefixes at the same time). After launching GRC from a prefix, this is the first thing it prints in the log window:

<<< Welcome to GNU Radio Companion 3.7.12git-351-ga098720f >>>

Block paths:
	/home/mbr0wn/.grc_gnuradio
	/home/mbr0wn/prefix/radar/share/gnuradio/grc/blocks

Notice how it picked up only blocks from my radar prefix (which is from where I launched it). Other prefixes have other paths, but they don't need encoding.

There is an actual environment variable (GRC_BLOCKS_DIR) which could help if you're not getting anywhere. Try running

$ pybombs -p prefix2 run gnuradio-companion

...and see if that worked. The run command injects its own environment, which includes GRC_BLOCKS_PATH (although I'm not convinced that is necessary).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants