lscardoso/gr-ntsc-rc

Gnuradio 3.8 and python3 support (request)

Opened this issue · 19 comments

Would like to use this with 20.04. Would you happen to still be maintaining this project?

For anyone that gets to this page, I have a fork with support for GnuRadio 3.8 here https://github.com/stevenlovegrove/gr-ntsc-rc

@lscardoso would you like a pull request or anything for a 3.8 specific branch?

Awesome! Thank you for updating this. Can’t wait to try.

@stevenlovegrove I didn't have time to look closer, maybe tomorrow. This is what I've ran in to trying to install your fork (I made sure libcppunit-dev was installed)

CMake Error at lib/CMakeLists.txt:67 (find_package):
By not providing "Findcppunit.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "cppunit", but
CMake did not find one.

Could not find a package configuration file provided by "cppunit" with any
of the following names:

cppunitConfig.cmake
cppunit-config.cmake

Add the installation prefix of "cppunit" to CMAKE_PREFIX_PATH or set
"cppunit_DIR" to a directory containing one of the above files. If
"cppunit" provides a separate development package or SDK, be sure it has
been installed.

oops - sorry, this is my silly case insensitive OSX filesystem which didn't manage to propagate the case change. I just pushed a diff which should fix this for you 32a7d5d

Getting closer, but got this now

52%] Generating python docstrings for NTSC_swig_doc
In file included from /usr/src/gr-ntsc-rc/lib/transmitter_c_impl.cc:27:
/usr/src/gr-ntsc-rc/lib/transmitter_c_impl.h:3:10: fatal error: NTSC/transmitter_c.h: No such file or directory
3 | #include <NTSC/transmitter_c.h>
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/src/gr-ntsc-rc/lib/video_stream_converter_c_impl.cc:36:
/usr/src/gr-ntsc-rc/lib/video_stream_converter_c_impl.h:3:10: fatal error: NTSC/video_stream_converter_c.h: No such file or directory
3 | #include <NTSC/video_stream_converter_c.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
compilation terminated.
In file included from /usr/src/gr-ntsc-rc/lib/decoder_c_impl.cc:31:
/usr/src/gr-ntsc-rc/lib/decoder_c_impl.h:3:10: fatal error: NTSC/decoder_c.h: No such file or directory
3 | #include <NTSC/decoder_c.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [lib/CMakeFiles/gnuradio-NTSC.dir/build.make:63: lib/CMakeFiles/gnuradio-NTSC.dir/decoder_c_impl.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [lib/CMakeFiles/gnuradio-NTSC.dir/build.make:76: lib/CMakeFiles/gnuradio-NTSC.dir/video_stream_converter_c_impl.cc.o] Error 1
make[2]: *** [lib/CMakeFiles/gnuradio-NTSC.dir/build.make:89: lib/CMakeFiles/gnuradio-NTSC.dir/transmitter_c_impl.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:301: lib/CMakeFiles/gnuradio-NTSC.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 52%] Built target NTSC_swig_swig_doc
[ 52%] Built target doxygen_target
make: *** [Makefile:141: all] Error 2

This is good though. I need to start learning what all this means. One day I hope to be writing code.

I'm not sure why that is erroring on yours and not mine. I just pushed something which may help (stevenlovegrove@09c083a)

I feel like I'm so close

[ 78%] Swig source NTSC_swig.i
Deprecated command line option: -modern. This option is now always on.
/usr/src/gr-ntsc-rc/swig/NTSC_swig.i:17: Error: Unable to find 'NTSC/decoder_c.h'
/usr/src/gr-ntsc-rc/swig/NTSC_swig.i:19: Error: Unable to find 'NTSC/video_stream_converter_c.h'
/usr/src/gr-ntsc-rc/swig/NTSC_swig.i:21: Error: Unable to find 'NTSC/transmitter_c.h'
make[2]: *** [swig/CMakeFiles/NTSC_swig_swig_compilation.dir/build.make:65: swig/CMakeFiles/NTSC_swig.dir/NTSC_swigPYTHON.stamp] Error 1
make[2]: *** Deleting file 'swig/CMakeFiles/NTSC_swig.dir/NTSC_swigPYTHON.stamp'
make[1]: *** [CMakeFiles/Makefile2:355: swig/CMakeFiles/NTSC_swig_swig_compilation.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

I'm going to review the changes you made and see if I can apply it to the problem I'm seeing now, since it seems so similar.

hmmm - I used the 'PRIVATE' keyword to say that the include files were visible only to the lib. You're now getting the errors outside of the lib. I tried using 'PUBLIC' before, but that generated errors on my computer because it was exporting source-tree includes. I'm not really sure why mine is behaving differently to yours.

You can probably fix your problem by putting:
include_directories("${PROJECT_SOURCE_DIR}/include")

around line 50 of swig/CMakeLists.txt

notice this is different from the previous change because the target getting created is hidden behind a macro in that CMake file.

That did it. It built and installed. Now to test sometime today. Thanks for the help.

I never paid much attention during the make install portion, but considering I open up the flowgraph and it has the missing blocks for the NTSC portion, it got me digging. I notice that NTSC is the only thing standing on it's own in the /usr/lib/include. When I look at the terminal output, it leads me to believe it should not be including all the ../../../ in the install path as shown below.

nstall the project...
-- Install configuration: "Release"
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../lib/cmake/NTSC/NTSCConfig.cmake
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../include/NTSC/api.h
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../include/NTSC/decoder_c.h
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../include/NTSC/video_stream_converter_c.h
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../include/NTSC/transmitter_c.h
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../lib/x86_64-linux-gnu/libgnuradio-NTSC.so.09c083a5
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../lib/x86_64-linux-gnu/libgnuradio-NTSC.so.1.0.0git
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../lib/x86_64-linux-gnu/libgnuradio-NTSC.so
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../lib/cmake/NTSC/gnuradio-NTSCTargets.cmake
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../lib/cmake/NTSC/gnuradio-NTSCTargets-release.cmake
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../lib/cmake/NTSC/gnuradio-NTSCConfig.cmake
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../lib/python3/dist-packages/NTSC/_NTSC_swig.so
-- Set runtime path of "/usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../lib/python3/dist-packages/NTSC/_NTSC_swig.so" to ""
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../lib/python3/dist-packages/NTSC/NTSC_swig.py
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../lib/python3/dist-packages/NTSC/NTSC_swig.pyc
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../lib/python3/dist-packages/NTSC/NTSC_swig.pyo
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../include/NTSC/NTSC/swig/NTSC_swig.i
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../include/NTSC/NTSC/swig/NTSC_swig_doc.i
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../lib/python3/dist-packages/NTSC/init.py
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../lib/python3/dist-packages/NTSC/init.pyc
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../lib/python3/dist-packages/NTSC/init.pyo
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../share/gnuradio/grc/blocks/NTSC_decoder_c.block.yml
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../share/gnuradio/grc/blocks/NTSC_transmitter_c.block.yml
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../share/gnuradio/grc/blocks/NTSC_video_stream_converter_c.block.yml
-- Installing: /usr/lib/x86_64-linux-gnu/cmake/gnuradio/../../../share/doc/gr-NTSC/xml

vs an install of say gr-rds

Install the project...
-- Install configuration: "Release"
-- Up-to-date: /usr/local/include/rds/api.h
-- Up-to-date: /usr/local/include/rds/decoder.h
-- Up-to-date: /usr/local/include/rds/encoder.h
-- Up-to-date: /usr/local/include/rds/parser.h
-- Up-to-date: /usr/local/lib/x86_64-linux-gnu/libgnuradio-rds.so.1.1.0
-- Up-to-date: /usr/local/lib/x86_64-linux-gnu/libgnuradio-rds.so.1
-- Up-to-date: /usr/local/lib/x86_64-linux-gnu/libgnuradio-rds.so
-- Up-to-date: /usr/local/lib/cmake/rds/gnuradio-rdsTargets.cmake
-- Up-to-date: /usr/local/lib/cmake/rds/gnuradio-rdsTargets-release.cmake
-- Up-to-date: /usr/local/lib/cmake/rds/gnuradio-rdsConfig.cmake
-- Installing: /usr/local/lib/python3/dist-packages/rds/_rds_swig.so
-- Set runtime path of "/usr/local/lib/python3/dist-packages/rds/_rds_swig.so" to ""
-- Up-to-date: /usr/local/lib/python3/dist-packages/rds/rds_swig.py
-- Installing: /usr/local/lib/python3/dist-packages/rds/rds_swig.pyc
-- Up-to-date: /usr/local/lib/python3/dist-packages/rds/rds_swig.pyo
-- Up-to-date: /usr/local/include/rds/rds/swig/rds_swig.i
-- Up-to-date: /usr/local/lib/python3/dist-packages/rds/init.py
-- Up-to-date: /usr/local/lib/python3/dist-packages/rds/rdspanel.py
-- Up-to-date: /usr/local/lib/python3/dist-packages/rds/init.pyc
-- Up-to-date: /usr/local/lib/python3/dist-packages/rds/rdspanel.pyc
-- Up-to-date: /usr/local/lib/python3/dist-packages/rds/init.pyo
-- Up-to-date: /usr/local/lib/python3/dist-packages/rds/rdspanel.pyo
-- Up-to-date: /usr/local/share/gnuradio/grc/blocks/rds_decoder.block.yml
-- Up-to-date: /usr/local/share/gnuradio/grc/blocks/rds_encoder.block.yml
-- Up-to-date: /usr/local/share/gnuradio/grc/blocks/rds_panel.block.yml
-- Up-to-date: /usr/local/share/gnuradio/grc/blocks/rds_parser.block.yml

I sort of see what I think is happening, just not sure why. It seems for example that /usr/lib/share ends up getting doc and gnuradio dumped in it instead of in the /usr/local/share where I see all other gnuradio related directories.

And things meant to go in /usr/lib end up in /usr/lib/lib. I probably should have mentioned I'm using Lubuntu 20.04.

/usr/lib/lib$ ls
cmake python3 x86_64-linux-gnu
live@live:/usr/lib/lib$

I'm in business. Learn something new everyday! I had never used cmake-gui, but wow that was an easy change to make. It's now finding all the blocks and once I get time I'll try and run it against this 5GHZ analog video cam I have.

For anyone that gets to this page, I have a fork with support for GnuRadio 3.8 here https://github.com/stevenlovegrove/gr-ntsc-rc

@lscardoso would you like a pull request or anything for a 3.8 specific branch?

Yes, that'd be great!

Thanks!

Just an update and I’ll try on x64 when I get a chance, but on a pi with everything taken care of we talked about above, I finally went to test a radio.

What I ended up getting an an executing python3 -u /tmp/top block

file “/tmp/top_block.py”, line 73 self.NTSC_decoder_c_0 = NTSC.decoder_c($samp_rate) syntax error invalid syntax.

I went and messed around in the GRC folder thinking the $ in front of Samp was wrong, edited the decoder file, but that just bypassed that error and I came to the next one. It’s almost as if the NTSC stuff is not being seen correctly like it did for me on 3.7. Wondered if you had a chance to try on Linux.

Just an update and I’ll try on x64 when I get a chance, but on a pi with everything taken care of we talked about above, I finally went to test a radio.

What I ended up getting an an executing python3 -u /tmp/top block

file “/tmp/top_block.py”, line 73 self.NTSC_decoder_c_0 = NTSC.decoder_c($samp_rate) syntax error invalid syntax.

I went and messed around in the GRC folder thinking the $ in front of Samp was wrong, edited the decoder file, but that just bypassed that error and I came to the next one. It’s almost as if the NTSC stuff is not being seen correctly like it did for me on 3.7. Wondered if you had a chance to try on Linux.

В коде есть ошибка.
/GR-NTSC-RC/grc/NTSC_decoder_c.block.yml в 29 строчке

NTSC.decoder_c($samp_rate) заменить на NTSC.decoder_c(${samp_rate})