Bug 270715 - devel/pyside2 Build fails complaining about DragMove
Summary: devel/pyside2 Build fails complaining about DragMove
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-09 07:13 UTC by mhambley
Modified: 2024-02-28 01:08 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (kde)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mhambley 2023-04-09 07:13:12 UTC
Ports built by Poudriere on FreeBSD 13.1-RELEASE-p6 GENERIC (amd64)

For a while now pyside2 has been failing to build with the following error:

[ 14% 236/1649] /usr/bin/c++ -DNDEBUG -DPYSIDE_QML_SUPPORT=1 -DQT_CORE_LIB -DQT_
GUI_LIB -DQT_NO_DEBUG -DQtGui_EXPORTS -I/wrkdirs/usr/ports/devel/pyside2/work-py
39/pyside-setup-opensource-src-5.15.2/sources/pyside2/PySide2/QtGui/QtGui -I/wrk
dirs/usr/ports/devel/pyside2/work-py39/pyside-setup-opensource-src-5.15.2/source
s/pyside2/PySide2/QtGui -I/wrkdirs/usr/ports/devel/pyside2/work-py39/.build/PySi
de2/QtGui -I/wrkdirs/usr/ports/devel/pyside2/work-py39/pyside-setup-opensource-s
rc-5.15.2/sources/pyside2/PySide2 -I/wrkdirs/usr/ports/devel/pyside2/work-py39/p
yside-setup-opensource-src-5.15.2/sources/pyside2/libpyside -I/wrkdirs/usr/ports
/devel/pyside2/work-py39/.build/PySide2/QtCore/PySide2/QtCore -isystem /usr/loca
l/include/qt5 -isystem /usr/local/include/qt5/QtCore -isystem /usr/local/lib/qt5
/mkspecs/freebsd-clang -isystem /usr/local/include/qt5/QtGui -isystem /usr/local
/include -isystem /usr/local/include/shiboken2 -isystem /usr/local/include/python3.9 -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wall -fvisibility=hidden -Wno-strict-aliasing -O2 -pipe -fstack-protector-strong -fno-strict-aliasing   -DNDEBUG -fPIC   -fPIC -fPIC -std=gnu++11 -MD -MT PySide2/QtGui/CMakeFiles/QtGui.dir/PySide2/QtGui/qdragmoveevent_wrapper.cpp.o -MF PySide2/QtGui/CMakeFiles/QtGui.dir/PySide2/QtGui/qdragmoveevent_wrapper.cpp.o.d -o PySide2/QtGui/CMakeFiles/QtGui.dir/PySide2/QtGui/qdragmoveevent_wrapper.cpp.o -c /wrkdirs/usr/ports/devel/pyside2/work-py39/.build/PySide2/QtGui/PySide2/QtGui/qdragmoveevent_wrapper.cpp
FAILED: PySide2/QtGui/CMakeFiles/QtGui.dir/PySide2/QtGui/qdragmoveevent_wrapper.cpp.o 
/usr/bin/c++ -DNDEBUG -DPYSIDE_QML_SUPPORT=1 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQtGui_EXPORTS -I/wrkdirs/usr/ports/devel/pyside2/work-py39/pyside-setup-opensource-src-5.15.2/sources/pyside2/PySide2/QtGui/QtGui -I/wrkdirs/usr/ports/devel/pyside2/work-py39/pyside-setup-opensource-src-5.15.2/sources/pyside2/PySide2/QtGui -I/wrkdirs/usr/ports/devel/pyside2/work-py39/.build/PySide2/QtGui -I/wrkdirs/usr/ports/devel/pyside2/work-py39/pyside-setup-opensource-src-5.15.2/sources/pyside2/PySide2 -I/wrkdirs/usr/ports/devel/pyside2/work-py39/pyside-setup-opensource-src-5.15.2/sources/pyside2/libpyside -I/wrkdirs/usr/ports/devel/pyside2/work-py39/.build/PySide2/QtCore/PySide2/QtCore -isystem /usr/local/include/qt5 -isystem /usr/local/include/qt5/QtCore -isystem /usr/local/lib/qt5/mkspecs/freebsd-clang -isystem /usr/local/include/qt5/QtGui -isystem /usr/local/include -isystem /usr/local/include/shiboken2 -isystem /usr/local/include/python3.9 -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wall -fvisibility=hidden -Wno-strict-aliasing -O2 -pipe -fstack-protector-strong -fno-strict-aliasing   -DNDEBUG -fPIC   -fPIC -fPIC -std=gnu++11 -MD -MT PySide2/QtGui/CMakeFiles/QtGui.dir/PySide2/QtGui/qdragmoveevent_wrapper.cpp.o -MF PySide2/QtGui/CMakeFiles/QtGui.dir/PySide2/QtGui/qdragmoveevent_wrapper.cpp.o.d -o PySide2/QtGui/CMakeFiles/QtGui.dir/PySide2/QtGui/qdragmoveevent_wrapper.cpp.o -c /wrkdirs/usr/ports/devel/pyside2/work-py39/.build/PySide2/QtGui/PySide2/QtGui/qdragmoveevent_wrapper.cpp
In file included from /wrkdirs/usr/ports/devel/pyside2/work-py39/.build/PySide2/QtGui/PySide2/QtGui/qdragmoveevent_wrapper.cpp:65:
/wrkdirs/usr/ports/devel/pyside2/work-py39/.build/PySide2/QtGui/PySide2/QtGui/qdragmoveevent_wrapper.h:55:220: error: no member named 'DragMove' in 'QOpenGLShader'; did you mean simply 'DragMove'?
    QDragMoveEventWrapper(const QPoint & pos, QFlags<Qt::DropAction> actions, const QMimeData * data, QFlags<Qt::MouseButton> buttons, QFlags<Qt::KeyboardModifier> modifiers, QFlags<QOpenGLShader::ShaderTypeBit> type = QOpenGLShader::DragMove);
                                                                                                                                                                                                                           ^~~~~~~~~~~~~~~~~~~~~~~
                                                                                                                                                                                                                           DragMove
/usr/local/include/qt5/QtCore/qcoreevent.h:107:9: note: 'DragMove' declared here
        DragMove = 61,                          // drag moves in widget
        ^
In file included from /wrkdirs/usr/ports/devel/pyside2/work-py39/.build/PySide2/QtGui/PySide2/QtGui/qdragmoveevent_wrapper.cpp:65:
/wrkdirs/usr/ports/devel/pyside2/work-py39/.build/PySide2/QtGui/PySide2/QtGui/qdragmoveevent_wrapper.h:55:213: error: no viable conversion from 'QEvent::Type' to 'QFlags<QOpenGLShader::ShaderTypeBit>'
    QDragMoveEventWrapper(const QPoint & pos, QFlags<Qt::DropAction> actions, const QMimeData * data, QFlags<Qt::MouseButton> buttons, QFlags<Qt::KeyboardModifier> modifiers, QFlags<QOpenGLShader::ShaderTypeBit> type = QOpenGLShader::DragMove);
                                                                                                                                                                                                                    ^                     ~~~~~~~~
/usr/local/include/qt5/QtCore/qflags.h:89:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'QEvent::Type' to 'const QFlags<QOpenGLShader::ShaderTypeBit> &' for 1st argument
class QFlags
      ^
/usr/local/include/qt5/QtCore/qflags.h:89:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'QEvent::Type' to 'QFlags<QOpenGLShader::ShaderTypeBit> &&' for 1st argument
/usr/local/include/qt5/QtCore/qflags.h:121:29: note: candidate constructor not viable: no known conversion from 'QEvent::Type' to 'QOpenGLShader::ShaderTypeBit' for 1st argument
    Q_DECL_CONSTEXPR inline QFlags(Enum flags) noexcept : i(Int(flags)) {}
                            ^
/usr/local/include/qt5/QtCore/qflags.h:123:80: note: candidate constructor not viable: no known conversion from 'QEvent::Type' to 'QFlags<QOpenGLShader::ShaderTypeBit>::Zero' (aka 'int (QFlags<QOpenGLShader::ShaderTypeBit>::Private::*)') for 1st argument
    QT_DEPRECATED_X("Use default constructor instead") Q_DECL_CONSTEXPR inline QFlags(Zero) noexcept : i(0) {}
                                                                               ^
/usr/local/include/qt5/QtCore/qflags.h:125:29: note: candidate constructor not viable: no known conversion from 'QEvent::Type' to 'QFlag' for 1st argument
    Q_DECL_CONSTEXPR inline QFlags(QFlag flag) noexcept : i(flag) {}
                            ^
/usr/local/include/qt5/QtCore/qflags.h:127:29: note: candidate constructor not viable: no known conversion from 'QEvent::Type' to 'std::initializer_list<ShaderTypeBit>' for 1st argument
    Q_DECL_CONSTEXPR inline QFlags(std::initializer_list<Enum> flags) noexcept
                            ^
/wrkdirs/usr/ports/devel/pyside2/work-py39/.build/PySide2/QtGui/PySide2/QtGui/qdragmoveevent_wrapper.h:55:213: note: passing argument to parameter 'type' here
    QDragMoveEventWrapper(const QPoint & pos, QFlags<Qt::DropAction> actions, const QMimeData * data, QFlags<Qt::MouseButton> buttons, QFlags<Qt::KeyboardModifier> modifiers, QFlags<QOpenGLShader::ShaderTypeBit> type = QOpenGLShader::DragMove);
                                                                                                                                                                                                                    ^
/wrkdirs/usr/ports/devel/pyside2/work-py39/.build/PySide2/QtGui/PySide2/QtGui/qdragmoveevent_wrapper.cpp:105:240: error: no matching constructor for initialization of 'QDragMoveEvent'
QDragMoveEventWrapper::QDragMoveEventWrapper(const QPoint & pos, QFlags<Qt::DropAction> actions, const QMimeData * data, QFlags<Qt::MouseButton> buttons, QFlags<Qt::KeyboardModifier> modifiers, QFlags<QOpenGLShader::ShaderTypeBit> type) : QDragMoveEvent(pos, actions, data, buttons, modifiers, type)
                                                                                                                                                                                                                                               ^              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/qt5/QtGui/qevent.h:684:5: note: candidate constructor not viable: no known conversion from 'QFlags<QOpenGLShader::ShaderTypeBit>' to 'QEvent::Type' for 6th argument
    QDragMoveEvent(const QPoint &pos, Qt::DropActions actions, const QMimeData *data,
    ^
/usr/local/include/qt5/QtGui/qevent.h:681:20: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 6 were provided
class Q_GUI_EXPORT QDragMoveEvent : public QDropEvent
                   ^
/wrkdirs/usr/ports/devel/pyside2/work-py39/.build/PySide2/QtGui/PySide2/QtGui/qdragmoveevent_wrapper.cpp:205:73: error: no member named 'DragMove' in 'QOpenGLShader'
        ::QFlags<QOpenGLShader::ShaderTypeBit> cppArg5 = QOpenGLShader::DragMove;
                                                         ~~~~~~~~~~~~~~~^
4 errors generated.
ninja: build stopped: subcommand failed.
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/pyside2
Comment 1 Adriaan de Groot freebsd_committer freebsd_triage 2023-05-19 20:31:02 UTC
Can't reproduce in a local poudriere with up-to-date ports. Do you have any unusual flags -- options unset or so? I assume your Qt version is 5.15.8 (with various pXXX because of the KDE patch collection).



Based on your error message here, I looked at /wrkdirs/usr/ports/devel/pyside2/work-py39/.build/PySide2/QtGui/PySide2/QtGui/qdragmoveevent_wrapper.h locally, which is different source from what your error message shows:

public:
    QDragMoveEventWrapper(const QPoint & pos, QFlags<Qt::DropAction> actions, con
st QMimeData * data, QFlags<Qt::MouseButton> buttons, QFlags<Qt::KeyboardModifier
> modifiers, QEvent::Type type = DragMove);
    ~QDragMoveEventWrapper();

Now, this is a generated file (as part of the build) so where your differently-generated source comes from is a bit of a mystery to me.
Comment 2 mhambley 2023-05-23 10:01:51 UTC
My Python is python39-3.9.16_2, QT is qt5-core-5.15.8p157_1.

Pyside port options are to disable WEBENGINE.

My /usr/local/etc/poudriere.d/make.conf adds to DEFAULT_VERSIONS llvm=16 java=19 ssl=libressl

Anything else I can help with?
Comment 3 mhambley 2023-05-25 09:20:26 UTC
This might be relevant but it doesn't fill me with joy: https://forum.qt.io/topic/144731/pyside2-missing-qopenglshader/2
Comment 5 mhambley 2023-09-24 08:02:12 UTC
I tried the Open Mandriva patch but it seems to be tackling a different problem. In particular it doesn't mention DragMove which is mentioned in the error message. When implemented I get the same error message.

It looks like this problem is OpenGL related.

Of course once FreeCAD has migrated to QT6 and PySide6 hopefully this will all go away for me. But that doesn't seem to be coming in the short term and there is other software which depends on pyside2.
Comment 6 Charlie Li freebsd_committer freebsd_triage 2024-02-28 01:08:24 UTC
I just got bit by this on -CURRENT whilst testing changes elsewhere. According to the rest of OpenMandriva's commit adding their patch https://github.com/OpenMandrivaAssociation/qt5-qtbase/commit/20f97a4bfb95658bc35c3292ac11e52c335cc1e9 , this is caused by clang 16 (and later) exposing buggy/broken behaviour in pyside2 generated code.

(In reply to mhambley from comment #5)
See https://github.com/OpenMandrivaAssociation/qt5-qtbase/blob/master/qtbase-5.15.9-work-around-pyside2-brokenness.patch#L73