discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gr_modtool bind makes incorrect file


From: Ryan Volz
Subject: Re: gr_modtool bind makes incorrect file
Date: Thu, 19 Jan 2023 15:18:51 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0

Hi Jameson,

On 1/19/23 1:03 PM, Jameson Collins wrote:
I am using gnuradio 3.10.2 from conda.  If I make a new module and simply edit its _impl.cc and yaml files then everything works correctly.

If I take the same module, and run `gr_modtool bind` on it then the new binding file will be different and I'll get errors when trying to run.

Here is the code to start with:
```
     py::class_<newmod2, gr::sync_block, gr::block, gr::basic_block,
         std::shared_ptr<newmod2>>(m, "newmod2", D(newmod2))

         .def(py::init(&newmod2::make),
            D(newmod2,make)
         )
```

Here is the code after running `gr_modtool bind`:
```
     py::class_<newmod2,
         std::shared_ptr<newmod2>>(m, "newmod2", D(newmod2))

         .def(py::init(&newmod2::make),
            py::arg("myarg") =  false,
            D(newmod2,make)
         )
```

I'm not an expert on `gr_modtool bind` (never used it), but I do know that the conda packages do not include pygccxml as a dependency and that that is important when autogenerating pybind11 bindings. If I had to guess, you probably need to install pygccxml. Pip install should work, although it will make maintaining that conda environment more of a challenge.

If that's not it, then someone more familiar with `gr_modtool bind` should be able to clarify.

Cheers,
Ryan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]