[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnuradio-discuss
Subject:    Re: OOT Binding problem
From:       Fabien PELLET <fpellet.f4ctz () free ! fr>
Date:       2021-12-14 14:52:08
Message-ID: 388ju6bsl8dqton1jfvigsop.1639493247114 () email ! android ! com
[Download RAW message or body]

[Attachment #2 (text/plain)]

Si how to use the command "gr_modtool bind"  ?

---- Marcus Müller a écrit ----

>You can't, GNU Radio links against that.
>I'd recommend not updating Python, you essentially can't.
>
>On 14.12.21 14:44, Fabien PELLET wrote:
>> castxml was installed, pygccxml also in v1.9.1. I upgrade pygccxml to 2.2.1 without success.
>> 
>> How to update python version (3.7 actually) without having to recompile gnuradio ?
>> 
>> Le 14/12/2021 à 12:44, Josh Morman a écrit :
>>> Sounds like castxml could be playing a role here.  Along the same lines Ron suggested, 
>>> you could try installing both pygccxml and castxml from pip3
>>>
>>> Josh
>>>
>>> On Tue, Dec 14, 2021 at 6:23 AM Ron Economos <w6rz@comcast.net> wrote:
>>>
>>>     I've tried it on both Ubuntu 18.04 and 20.04, so I don't think it's due
>>>     to the Python version.
>>>
>>>     You could try the latest pygccxml. Use pip or pip3 to install.
>>>
>>>     You could also try building CastXML from source. That's where some of
>>>     the compiler dirty work is being done. For example, you need the latest
>>>     CastXML for gcc 11.
>>>
>>>     https://github.com/CastXML/CastXML
>>>
>>>     You'll need to install clang and libclang-xx-dev (where xx matches the
>>>     version of clang that was installed).
>>>
>>>     Ron
>>>
>>>     On 12/14/21 2:57 AM, Fabien PELLET wrote:
>>>     > Is that could be an incompatibility between Python3.7 that is provide
>>>     > by RaspiOS repo and Pybind11 ?
>>>     >
>>>     > Fabien.
>>>     >
>>>     > Le 14/12/2021 à 11:54, Marcus Müller a écrit :
>>>     >> Uh, since bindtool is Python-only, this should really not be
>>>     >> platform-dependent. Unless we've got a problem with pygccxml, that is...
>>>     >>
>>>     >> On 14/12/2021 11.51, Ron Economos wrote:
>>>     >>> I've never been able to get gr_modtool bind to work on 32-bit ARM
>>>     >>> architecture (Ubuntu on a Beagleboard-X15). I get the same error
>>>     >>> message.
>>>     >>>
>>>     >>> Ron
>>>     >>>
>>>     >>> On 12/14/21 2:15 AM, Fabien PELLET wrote:
>>>     >>>> Hello,
>>>     >>>>
>>>     >>>> I'm trying to write a simple OOT module. For exemple, I create a
>>>     >>>> module "test" (gr-modtool newmod test) and I create a general block
>>>     >>>> inside (gr-modtool add blablamodule) : everything fine up to this
>>>     >>>> point.
>>>     >>>>
>>>     >>>> If now I modify the file "blablamodule.h" I have do a "gr_modtool
>>>     >>>> bind blablamodule" to update the file "blablamodule_python.cc" that
>>>     >>>> is in python/bindings" (if I do not do this, the cmake will
>>>     >>>> complain). I get in return after the parsing of my file
>>>     >>>> "blablamodule.h" the following error :
>>>     >>>>
>>>     >>>> ERROR error occured, while parsing element with name "Field" and
>>>     >>>> attrs "['id', 'name', 'type', 'context', 'access', 'offset']"
>>>     >>>> Error: 'file'.
>>>     >>>> 'file'
>>>     >>>>
>>>     >>>> After several try without any success, I delete all file and
>>>     >>>> recreate the module and the block using gr-modtool and then I try
>>>     >>>> just after creating it without modifying it to execute "gr_modtool
>>>     >>>> bind blablamodule" inside the fresh newly created module
>>>     >>>> directory.... Same error !
>>>     >>>>
>>>     >>>> I read that I need to get pybind11 with a version > 2.5 so I
>>>     >>>> install it from source the v2.8 (well recognized as a cmake command
>>>     >>>> tell that it detects the v2.8.1).
>>>     >>>>
>>>     >>>> I'm on a raspberry PI4 with GNURADIO 3.9.4, PYTHON 3.7.3, PYBIND11
>>>     >>>> 2.8.1. What am I doing wrong ?
>>>     >>>>
>>>     >>>> I try on a other computer with GNURADIO 3.9.3, PYTHON 3.8.10 and I
>>>     >>>> do not see the research of PYBIND11 but "gr_modtool bind
>>>     >>>> blablamodule" is working well....
>>>     >>>>
>>>     >>>> Thanks for your help,
>>>     >>>>
>>>     >>>> Best regards,
>>>     >>>>
>>>     >>>> Fabien, F4CTZ.
>>>     >>>>
>>>     >>>>
>>>     >>>
>>>     >
>>>

[Attachment #3 (text/html)]

Si how to use the command &quot;gr_modtool bind&quot;  ?<br><br>---- Marcus Müller a \
écrit ----<br><br>You can't, GNU Radio links against that.<br>I'd recommend not \
updating Python, you essentially can't.<br><br>On 14.12.21 14:44, Fabien PELLET \
wrote:<br>&gt; castxml was installed, pygccxml also in v1.9.1. I upgrade pygccxml to \
2.2.1 without success.<br>&gt; <br>&gt; How to update python version (3.7 actually) \
without having to recompile gnuradio ?<br>&gt; <br>&gt; Le 14/12/2021 à 12:44, Josh \
Morman a écrit :<br>&gt;&gt; Sounds like castxml could be playing a role here.  Along \
the same lines Ron suggested, <br>&gt;&gt; you could try installing both pygccxml and \
castxml from pip3<br>&gt;&gt;<br>&gt;&gt; Josh<br>&gt;&gt;<br>&gt;&gt; On Tue, Dec \
14, 2021 at 6:23 AM Ron Economos &lt;w6rz@comcast.net&gt; \
wrote:<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; I've tried it on both Ubuntu \
18.04 and 20.04, so I don't think it's due<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; to the \
Python version.<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; You could try the \
latest pygccxml. Use pip or pip3 to \
install.<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; You could also try building \
CastXML from source. That's where some of<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; the \
compiler dirty work is being done. For example, you need the \
latest<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; CastXML for gcc \
11.<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
https://github.com/CastXML/CastXML<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
You'll need to install clang and libclang-xx-dev (where xx matches \
the<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; version of clang that was \
installed).<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
Ron<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; On 12/14/21 2:57 AM, Fabien \
PELLET wrote:<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; Is that could be an \
incompatibility between Python3.7 that is provide<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt; by RaspiOS repo and Pybind11 ?<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; \
Fabien.<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt; Le 14/12/2021 à 11:54, Marcus Müller a écrit \
:<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt; Uh, since bindtool is Python-only, \
this should really not be<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt; \
platform-dependent. Unless we've got a problem with pygccxml, that \
is...<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt; On 14/12/2021 11.51, Ron \
Economos wrote:<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt; I've never been able \
to get gr_modtool bind to work on 32-bit ARM<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;&gt; architecture (Ubuntu on a Beagleboard-X15). I get the same \
error<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt; \
message.<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt; \
Ron<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt; On 12/14/21 2:15 AM, \
Fabien PELLET wrote:<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; \
Hello,<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; I'm trying to \
write a simple OOT module. For exemple, I create \
a<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; module "test" (gr-modtool \
newmod test) and I create a general block<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;&gt;&gt; inside (gr-modtool add blablamodule) : everything fine up to \
this<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; \
point.<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; If now I modify \
the file "blablamodule.h" I have do a "gr_modtool<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;&gt;&gt; bind blablamodule" to update the file "blablamodule_python.cc" \
that<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; is in python/bindings" (if \
I do not do this, the cmake will<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; \
complain). I get in return after the parsing of my \
file<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; "blablamodule.h" the \
following error :<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; ERROR error \
occured, while parsing element with name "Field" \
and<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; attrs "['id', 'name', \
'type', 'context', 'access', 'offset']"<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;&gt;&gt; Error: 'file'.<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; \
'file'<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; After several \
try without any success, I delete all file and<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;&gt;&gt; recreate the module and the block using gr-modtool and then I \
try<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; just after creating it \
without modifying it to execute "gr_modtool<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;&gt;&gt; bind blablamodule" inside the fresh newly created \
module<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; directory.... Same error \
!<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; I read that I \
need to get pybind11 with a version &gt; 2.5 so I<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;&gt;&gt; install it from source the v2.8 (well recognized as a cmake \
command<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; tell that it detects the \
v2.8.1).<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; I'm on a \
raspberry PI4 with GNURADIO 3.9.4, PYTHON 3.7.3, \
PYBIND11<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; 2.8.1. What am I doing \
wrong ?<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; I try on a \
other computer with GNURADIO 3.9.3, PYTHON 3.8.10 and \
I<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; do not see the research of \
PYBIND11 but "gr_modtool bind<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; \
blablamodule" is working well....<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; Thanks for your \
help,<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; Best \
regards,<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt;&gt; Fabien, \
F4CTZ.<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; \
&gt;&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>&gt;&gt;<br>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic