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

List:       pykde
Subject:    [PyQt] =?utf-8?q?Compiler_error_using_mingw_=3A_invalid_new-expr?= =?utf-8?q?ession_of_abstract_clas
From:       Erik Janssens <erik.janssens () conceptive ! be>
Date:       2018-12-02 19:37:18
Message-ID: 2bb7023a-2072-81b1-33a7-4cddb8100f24 () conceptive ! be
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

I'm trying to cross compile PyQt using mingw 32bit.

- Using Qt 5.11.2 cross compiled with mingw
- Using sip 4.19.13 cross compiled and native compiled to have sip on 
the path
- Using PyQt 5.11.3

I've built sip using the qmake chain, with these options :

    python configure.py --use-qmake --target-py-version=3.4.4
    --sysroot=/home/tw55413/workspaces/qt/sip/ -p win32-g++
    --configuration config.txt --sip-module PyQt5.sip --no-tools
    LIBS=-lpython34 -d /home/tw55413/workspaces/qt/sip-install/
    --no-stubs --no-dist-info


And configured PyQt with :

    python3 configure.py
    --destdir=/home/tw55413/workspaces/qt/sip-install/
    --no-designer-plugin --no-dist-info --no-docstrings --no-python-dbus
    --no-sip-files --no-stubs --no-tools --qmake
    /home/tw55413/workspaces/qt/mingw_64/bin/qmake --sip-incdir
    /home/tw55413/workspaces/qt/sip/sip-4.19.13/siplib/ --configuration
    config.txt --target-py-version 3.4.4 --verbose LIBS+=-lpython34
    LIBS+=-L/home/tw55413/workspaces/qt/python/libs
    INCLUDEPATH+=/home/tw55413/workspaces/qt/sip/sip-4.19.13/siplib/
    --sip
    /home/tw55413/workspaces/qt/sip/sip_native/sip-4.19.13/sipgen/sip
    QMAKE_CXXFLAGS+=-D_hypot=hypot

    Detection of the Qt libraries looks good

    After running 'make' the first few files compile, but then I get a
    compile error :

    /home/tw55413/workspaces/qt/pyqt/PyQt5_gpl-5.11.3/QtCore/sipQtCoreQAbstractEventDispatcher.cpp:
  In function ‘void*
    init_type_QAbstractEventDispatcher(sipSimpleWrapper*, PyObject*,
    PyObject*, PyObject**, PyObject**, PyObject**)’:
    /home/tw55413/workspaces/qt/pyqt/PyQt5_gpl-5.11.3/QtCore/sipQtCoreQAbstractEventDispatcher.cpp:1137:56:
  error: invalid new-expression of abstract class type
    ‘sipQAbstractEventDispatcher’
                  sipCpp = new sipQAbstractEventDispatcher(a0);
                                                             ^
    /home/tw55413/workspaces/qt/pyqt/PyQt5_gpl-5.11.3/QtCore/sipQtCoreQAbstractEventDispatcher.cpp:97:7:
  note:   because the following virtual functions are pure within
    ‘sipQAbstractEventDispatcher’:
      class sipQAbstractEventDispatcher : public ::QAbstractEventDispatcher
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from
    /home/tw55413/workspaces/qt/pyqt/PyQt5_gpl-5.11.3/sip/QtCore/qabstracteventdispatcher.sip:26:0:
                
    ../../../mingw_64/include/QtCore/qabstracteventdispatcher.h:100:18:
    note:       virtual bool
    QAbstractEventDispatcher::registerEventNotifier(QWinEventNotifier*)
          virtual bool registerEventNotifier(QWinEventNotifier
    *notifier) = 0;
                       ^~~~~~~~~~~~~~~~~~~~~
    ../../../mingw_64/include/QtCore/qabstracteventdispatcher.h:101:18:
    note:       virtual void
    QAbstractEventDispatcher::unregisterEventNotifier(QWinEventNotifier*)
          virtual void unregisterEventNotifier(QWinEventNotifier
    *notifier) = 0;
                       ^~~~~~~~~~~~~~~~~~~~~~~
    make[2]: *** [Makefile.Release:1563:
    release/sipQtCoreQAbstractEventDispatcher.o] Error 1
    make[2]: Leaving directory
    '/home/tw55413/workspaces/qt/pyqt/PyQt5_gpl-5.11.3/QtCore'
    make[1]: *** [Makefile:36: release] Error 2
    make[1]: Leaving directory
    '/home/tw55413/workspaces/qt/pyqt/PyQt5_gpl-5.11.3/QtCore'
    make: *** [Makefile:42: sub-QtCore-make_first-ordered] Error 2


Any ideas ?

Thanks,

Erik


[Attachment #5 (text/html)]

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi,<br>
    <br>
    I'm trying to cross compile PyQt using mingw 32bit.<br>
    <br>
    - Using Qt 5.11.2 cross compiled with mingw<br>
    - Using sip 4.19.13 cross compiled and native compiled to have sip
    on the path<br>
    - Using PyQt 5.11.3<br>
    <br>
    I've built sip using the qmake chain, with these options :<br>
    <br>
    <blockquote>python configure.py --use-qmake
      --target-py-version=3.4.4
      --sysroot=/home/tw55413/workspaces/qt/sip/ -p win32-g++
      --configuration config.txt --sip-module PyQt5.sip --no-tools
      LIBS=-lpython34 -d /home/tw55413/workspaces/qt/sip-install/
      --no-stubs --no-dist-info<br>
    </blockquote>
    <br>
    And configured PyQt with :<br>
    <br>
    <blockquote>python3 configure.py
      --destdir=/home/tw55413/workspaces/qt/sip-install/
      --no-designer-plugin --no-dist-info --no-docstrings
      --no-python-dbus --no-sip-files --no-stubs --no-tools --qmake
      /home/tw55413/workspaces/qt/mingw_64/bin/qmake --sip-incdir
      /home/tw55413/workspaces/qt/sip/sip-4.19.13/siplib/
      --configuration config.txt --target-py-version 3.4.4 --verbose
      LIBS+=-lpython34 LIBS+=-L/home/tw55413/workspaces/qt/python/libs
      INCLUDEPATH+=/home/tw55413/workspaces/qt/sip/sip-4.19.13/siplib/
      --sip
      /home/tw55413/workspaces/qt/sip/sip_native/sip-4.19.13/sipgen/sip
      QMAKE_CXXFLAGS+=-D_hypot=hypot<br>
      <br>
      Detection of the Qt libraries looks good<br>
      <br>
      After running 'make' the first few files compile, but then I get 
      a compile error :<br>
      <br>
/home/tw55413/workspaces/qt/pyqt/PyQt5_gpl-5.11.3/QtCore/sipQtCoreQAbstractEventDispatcher.cpp:
      In function ‘void*
      init_type_QAbstractEventDispatcher(sipSimpleWrapper*, PyObject*,
      PyObject*, PyObject**, PyObject**, PyObject**)’:<br>
/home/tw55413/workspaces/qt/pyqt/PyQt5_gpl-5.11.3/QtCore/sipQtCoreQAbstractEventDispatcher.cpp:1137:56:
      error: invalid new-expression of abstract class type
      ‘sipQAbstractEventDispatcher’<br>
                   sipCpp = new sipQAbstractEventDispatcher(a0);<br>
                                                              ^<br>
/home/tw55413/workspaces/qt/pyqt/PyQt5_gpl-5.11.3/QtCore/sipQtCoreQAbstractEventDispatcher.cpp:97:7:
      note:   because the following virtual functions are pure within
      ‘sipQAbstractEventDispatcher’:<br>
       class sipQAbstractEventDispatcher : public 
      ::QAbstractEventDispatcher<br>
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
      In file included from
/home/tw55413/workspaces/qt/pyqt/PyQt5_gpl-5.11.3/sip/QtCore/qabstracteventdispatcher.sip:26:0:<br>
../../../mingw_64/include/QtCore/qabstracteventdispatcher.h:100:18:
      note:       virtual bool
      QAbstractEventDispatcher::registerEventNotifier(QWinEventNotifier*)<br>
           virtual bool registerEventNotifier(QWinEventNotifier
      *notifier) = 0;<br>
                        ^~~~~~~~~~~~~~~~~~~~~<br>
../../../mingw_64/include/QtCore/qabstracteventdispatcher.h:101:18:
      note:       virtual void
      QAbstractEventDispatcher::unregisterEventNotifier(QWinEventNotifier*)<br>
           virtual void unregisterEventNotifier(QWinEventNotifier
      *notifier) = 0;<br>
                        ^~~~~~~~~~~~~~~~~~~~~~~<br>
      make[2]: *** [Makefile.Release:1563:
      release/sipQtCoreQAbstractEventDispatcher.o] Error 1<br>
      make[2]: Leaving directory
      '/home/tw55413/workspaces/qt/pyqt/PyQt5_gpl-5.11.3/QtCore'<br>
      make[1]: *** [Makefile:36: release] Error 2<br>
      make[1]: Leaving directory
      '/home/tw55413/workspaces/qt/pyqt/PyQt5_gpl-5.11.3/QtCore'<br>
      make: *** [Makefile:42: sub-QtCore-make_first-ordered] Error 2<br>
    </blockquote>
    <br>
    Any ideas ?<br>
    <br>
    Thanks,<br>
    <br>
    Erik<br>
  </body>
</html>

[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt


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

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