discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: Porting oot modules to gr 3.9 and pybind


From: Josh
Subject: Re: Porting oot modules to gr 3.9 and pybind
Date: Wed, 1 Jul 2020 12:45:29 -0400

In parseheader_generic.py, there is fpic defined, but I think it might need the __PIC__

            generator_path, generator_name = utils.find_xml_generator()
            xml_generator_config = parser.xml_generator_configuration_t(
                xml_generator_path=generator_path,
                xml_generator=generator_name,
                include_paths=self.include_paths,
                compiler='gcc',
                undefine_symbols=['__PIE__'],
                #define_symbols=['BOOST_ATOMIC_DETAIL_EXTRA_BACKEND_GENERIC', '__PIC__'],
                define_symbols=['BOOST_ATOMIC_DETAIL_EXTRA_BACKEND_GENERIC'],
                cflags='-std=c++11 -fPIC')

On Wed, Jul 1, 2020 at 11:38 AM Volker Schroer <dl1ksv@gmx.de> wrote:
Josh,

meanwhile I found the add_include parameter
in bindtool/core/generator.py and hardcoded there the qt includes.

That leads to

INFO Parsing source file
"/home/schroer/gnuradiocomponents/gr-display.orig/include/display/display_text_msg.h"
...
In file included from
/home/schroer/gnuradiocomponents/gr-display.orig/include/display/display_text_msg.h:33:
In file included from
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qapplication.h:43:
In file included from
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qtwidgetsglobal.h:43:
In file included from
/usr/include/x86_64-linux-gnu/qt5/QtGui/qtguiglobal.h:43:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:1187:4: error: "You
must build your code with position
       independent code if Qt was built with -reduce-relocations. "
    "Compile your code with -fPIC
       (-fPIE is not enough)."
#  error "You must build your code with position independent code if Qt
was built with -reduce-rel...
    ^
1 error generated.
Error occurred while running CASTXML:  status:1


So I think , some compiler flags are needed, too.

I'm going to find out how to come across.

In the long run the bind tool will need an additional include-directory
parameter.

-- Volker


Am 01.07.20 um 17:02 schrieb Josh:
> Volker,
>
> Glad that the first one worked.  I had to do a little bit of gymnastics
> to get the gr-qtgui files binded in-tree.  If you look at the notes in
> gr-utils/bindtool/scripts/bind_gr_module.py, QTGUI required passing as
> args the include directories to the QT installation.  This is because
> pygccxml does some sort of sandboxed compile of the target header file.
> So gr_modtool bind will need to have those arguments or some other
> script to get around it.  I can take a look at this, but there might be
> a workaround for getting the bindings generated now.
>
> Josh
>
>
>
>
>
>
> On Wed, Jul 1, 2020 at 5:50 AM Volker Schroer <dl1ksv@gmx.de
> <mailto:dl1ksv@gmx.de>> wrote:
>
>     Hi,
>
>     I'm just started to port some of my oot modules to gr 3.9 and pybind. I
>     followed
>     https://wiki.gnuradio.org/index.php/GNU_Radio_3.9_OOT_Module_Porting_Guide
>
>     and it worked flawless for my first module gr-funcube.
>
>     Now I'm trying to port gr-display , which requires qt5 to be built.
>     When I run
>
>     gr_modtool bind display_text_msg
>
>     I get:
>     GNU Radio module name identified: display
>     INFO Parsing source file
>     "/home/schroer/gnuradiocomponents/gr-display.orig/include/display/display_text_msg.h"
>     ...
>     /home/schroer/gnuradiocomponents/gr-display.orig/include/display/display_text_msg.h:33:10:
>     fatal error:
>             'qapplication.h' file not found
>     #include <qapplication.h>
>                ^~~~~~~~~~~~~~~~
>     1 error generated.
>     Error occurred while running CASTXML:  status:1
>
>
>     How can I come across this error ?
>
>     -- Volker
>
>
>


reply via email to

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