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: A generated python hier_block is written to the wrong directory #5547

Merged
merged 2 commits into from Mar 27, 2022

Conversation

dl1ksv
Copy link
Contributor

@dl1ksv dl1ksv commented Feb 1, 2022


Pull Request Details

The generated code is written to the directory of the generating grc file
instead to the 'hier_block_lib_dir' directory.

cpp generated code ends up in the correct directory.

This error was introduced with commit af3fbe4

Description

Take the directory from the config settings ( as before)

Related Issue

Fixes #5531

Testing Done

Tested with different hier blocks

Checklist

The generated code is written to the directory of the generating grc file
instead to the 'hier_block_lib_dir' directory.

cpp generated code ends up in the correct directory.

This error was introduced with commit af3fbe4

FIxes gnuradio#5531

Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>
@willcode willcode added the GRC label Feb 1, 2022
@willcode
Copy link
Member

willcode commented Feb 1, 2022

Does this still work with grcc? #4871 makes it seem like this change was intended. Should the correct directory be passed in from above instead of ignored?

@willcode willcode added the Backport-3.10 Should be backported to 3.10 label Feb 1, 2022
Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>
@dl1ksv
Copy link
Contributor Author

dl1ksv commented Feb 2, 2022

Good point.

Without my patch
In case test.grc is a hier block with output langage python
grcc -o /tmp/test test.grc
is written to /tmp/test
but if the output language is c++ the code is written ~/.grc_gnuradio/
which is not intended.

After my patch in both cases the code is written ~/.grc_gnuradio.

All other combinations of generation option and output language are not affected by my patch.
To write hier block code to the specified output directory this should be fixed in grcc.
This is done by the commit 5114e51.

@mormj
Copy link
Contributor

mormj commented Feb 9, 2022

After my patch in both cases the code is written ~/.grc_gnuradio.

Shouldn't the output given grcc -o /tmp/test be to /tmp/test in both cases?

@dl1ksv
Copy link
Contributor Author

dl1ksv commented Feb 9, 2022

Yes, but I wanted to point out, that this was not the case without any patch. After my first commit the code for the hier block is written to ~/.grc_gnuradio , independently of the the output language. For other types the code is written to the correct directory.
The second commit forces grcc -o /tmp/test to write to /tmp/test for hier blocks , too.

@mormj
Copy link
Contributor

mormj commented Feb 14, 2022

Ah ok - I didn't get the distinction between the two commits. Thanks!

@mormj
Copy link
Contributor

mormj commented Mar 27, 2022

Tested and working - sorry for the delay and thank you for the fix.

@mormj mormj merged commit 63b6def into gnuradio:main Mar 27, 2022
@willcode willcode added ported-to-3.10 Has been ported to 3.10 and removed Backport-3.10 Should be backported to 3.10 labels Mar 30, 2022
@dl1ksv dl1ksv deleted the i5531 branch June 2, 2022 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GRC ported-to-3.10 Has been ported to 3.10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hier Blocks are not installed to ~/.grc_gnuradio
3 participants