|
From: | Josh Morman |
Subject: | Re: problem porting OOT to gr_3.9 : gr_modtool bind error |
Date: | Fri, 9 Apr 2021 13:37:30 -0400 |
Hi Josh - thank you for your help !I have been following the instructions from the porting guide:----------------
Porting from 3.8 to 3.9 can be achieved most simply by creating a new OOT module (with the same name as the 3.8 OOT but in a different directory), then performing some manual steps
1. Use the 3.9 gr_modtool to generate a module with the same name (in another directory)
2. Copy the python folder from 3.9 OOT into your 3.8 OOT
3. (in 3.8 OOT) Add the bindings directory to the python directory CMakeLists
./python/CMakeLists.txt → add the line: add_subdirectory(bindings)4. (in 3.8 OOT) Call gr_modtool bind for each block in your OOT
...
-----------------
I have not created anything in the 3.9 directory except using gr_modtool new and add, nor have I copied in any codefrom 3.8 directory to the 3.9 directory. I was under the impression that step 4 would modify my 3.8 code so that I couldthen copy it from the 3.8 directory over to the 3.9 directory.There are significant file differences between the newly created 3.9 and the existing 3.8 with conflicts in the /lib directory:the hermesNB_impl.h and .cc and hermesWB.h and .cc files differ significantly in content.Do I need to first look through the code and figure out how to merge the 3.8 and 3.9 .h and .cc files together?Then do I put those merged file into the 3.8 or the 3.9 directory?-- Tom, N5EGOn Fri, Apr 9, 2021 at 9:27 AM Josh Morman <mormjb@gmail.com> wrote:Tom,If I am following correctly, it looks like you are running gr_modtool (which is the 3.9 version since that is what you have installed in the VM) in the 3.8 OOT directory?What happens when you run `gr_modtool bind` in the gr-hpsdr_3.9 directoryThe process you are following seems sound to have created a 3.9 OOT with 3.9 modtool, and then copied code in from 3.8.JoshOn Fri, Apr 9, 2021 at 12:08 PM Tom McDermott <tom.n5eg@gmail.com> wrote:I am having difficulty porting an OOT module to gr 3.9.* VM with only gnuradio 3.9.0.0 installed.*The functional 3.8 OOT module is cloned into this VM.Installed is 3.9.0.0Python 3.8.5pygccxml 2.1.0pybind11 2.6.2* Created the gr-hpsdr_3.9 directory, populated it using gr_modtool newmod, added thetwo modules hermesNB and hermesWB with constructor parameters.In the 3.8 directory:hermesNB.h and hermesWB.h both exist in the /include directory, andhermesWB_impl.cc and hermesNB_impl.cc both exist in the /lib directoryEdited the ./python/Cmakelists.txt file to add the bindings subdirectory.From the directory gr-hpsdr_3.8/gr-hpsdr, I execute gr_modtool bindIt prompts for the block name. I used the base module name without any suffixes:hermesNB(also tried hermesNB.h, hermesNB_impl.cc, hermesWB, hermewWB.h, hermesWB_impl.cc)I always get the following error message:tom@tom-Standard-PC-Q35-ICH9-2009:~/gr-hpsdr_3.8/gr-hpsdr$ gr_modtool bind
GNU Radio module name identified: hpsdr
Which blocks do you want to parse? (Regex): hermesNB
/usr/lib/python3/dist-packages/apport/report.py:13: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import fnmatch, glob, traceback, errno, sys, atexit, locale, imp, stat
Traceback (most recent call last):
File "/usr/bin/gr_modtool", line 18, in <module>
cli()
File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python3/dist-packages/gnuradio/modtool/cli/base.py", line 133, in wrapper
return func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/gnuradio/modtool/cli/bind.py", line 46, in cli
run(self)
File "/usr/lib/python3/dist-packages/gnuradio/modtool/cli/base.py", line 152, in run
module.run()
File "/usr/lib/python3/dist-packages/gnuradio/modtool/core/bind.py", line 61, in run
file_to_process = os.path.join(self.dir, self.info['includedir'], self.info['blockname'] + '.h')
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'Thus am stuck at this time. Is there a new or revised gr_modtool ?-- Tom, N5EG
[Prev in Thread] | Current Thread | [Next in Thread] |