You are right - that is an easier process than merging the 3.8 code into
3.9.  The wiki should be correct in this case.

Which directory are you running gr_modtool from?  Same directory as you
would for doing things like gr_modtool add?


On Fri, Apr 9, 2021 at 1:24 PM Tom McDermott <tom.n...@gmail.com> wrote:

> Hi Josh - thank you for your help !
>
> I have been following the instructions from the porting guide:
> https://wiki.gnuradio.org/index.php/GNU_Radio_3.9_OOT_Module_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 code
> from 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 could
> then 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, N5EG
>
>
>
>
>
>
>
> On Fri, Apr 9, 2021 at 9:27 AM Josh Morman <mor...@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  directory
>>
>> The 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.
>>
>> Josh
>>
>> On Fri, Apr 9, 2021 at 12:08 PM Tom McDermott <tom.n...@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.0
>>> Python 3.8.5
>>> pygccxml 2.1.0
>>> pybind11 2.6.2
>>>
>>> *  Created the gr-hpsdr_3.9  directory, populated it using gr_modtool
>>> newmod, added the
>>> two modules hermesNB and hermesWB with constructor parameters.
>>>
>>> In the 3.8 directory:
>>>  hermesNB.h and hermesWB.h  both exist in the /include directory, and
>>>  hermesWB_impl.cc and hermesNB_impl.cc both  exist in the /lib directory
>>>  Edited the ./python/Cmakelists.txt file to add the bindings
>>> subdirectory.
>>>  From the directory gr-hpsdr_3.8/gr-hpsdr, I execute gr_modtool bind
>>>  It 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
>>>
>>>
>>>
>>>

Reply via email to