Phoenix
Phoenix copied to clipboard
--use_syswx stopped working in 4.1.1 because it targets an unreleased wxWidgets version
Operating system: Linux wxPython version & source: 4.1.1, self-built Python version & source: 2.7.18, distro
Description of the problem:
Build fails with a system wxWidgets-3.1.4, due to API changes in the unreleased 3.1.5 targeted by this released 4.1.1.
../../../../sip/cpp/sip_corewxTextEntryDialog.cpp:125:10: error: ‘void sipwxTextEntryDialog::EnableVisibleFocus(bool)’ marked ‘override’, but does not override
125 | void EnableVisibleFocus(bool) SIP_OVERRIDE;
| ^~~~~~~~~~~~~~~~~~
../../../../sip/cpp/sip_corewxTextEntryDialog.cpp: In member function ‘void sipwxTextEntryDialog::EnableVisibleFocus(bool)’:
../../../../sip/cpp/sip_corewxTextEntryDialog.cpp:681:31: error: ‘EnableVisibleFocus’ is not a member of ‘wxTextEntryDialog’
681 | ::wxTextEntryDialog::EnableVisibleFocus(enabled);
| ^~~~~~~~~~~~~~~~~~
../../../../sip/cpp/sip_corewxTextEntryDialog.cpp: In function ‘PyObject* meth_wxTextEntryDialog_EnableVisibleFocus(PyObject*, PyObject*, PyObject*)’:
../../../../sip/cpp/sip_corewxTextEntryDialog.cpp:1927:60: error: ‘class wxTextEntryDialog’ has no member named ‘EnableVisibleFocus’
1927 | (sipSelfWasArg ? sipCpp-> ::wxTextEntryDialog::EnableVisibleFocus(enabled) : sipCpp->EnableVisibleFocus(enabled));
| ^~~~~~~~~~~~~~~~~~
../../../../sip/cpp/sip_corewxTextEntryDialog.cpp:1927:98: error: ‘class wxTextEntryDialog’ has no member named ‘EnableVisibleFocus’
1927 | (sipSelfWasArg ? sipCpp-> ::wxTextEntryDialog::EnableVisibleFocus(enabled) : sipCpp->EnableVisibleFocus(enabled));
| ^~~~~~~~~~~~~~~~~~
https://docs.wxwidgets.org/trunk/classwx_window.html#ad0798adc95b19f956e7ac1e7fda6333d - also says "This method is only implemented on Mac." but it tries to compile it on Linux.
Full build log, after running DOXYGEN=/usr/bin/doxygen python build.py dox etg --nodoc
and python build.py build_py --use_syswx --no_magic --jobs=1 --verbose --release
: https://gist.github.com/stefantalpalaru/ad08cde162580e2aa09a2492f29cf916
wxWidgets-3.1.5 was released, but wxPython-4.1.1 still doesn't compile with it, due to a couple of protected wxGridEvent members no longer being virtual.
This patch fixes it:
--- wxPython-4.1.1.orig/sip/cpp/sip_gridwxGridEvent.cpp 2020-11-21 20:10:38.000000000 +0100
+++ wxPython-4.1.1/sip/cpp/sip_gridwxGridEvent.cpp 2021-05-16 03:21:55.031555889 +0200
@@ -32,8 +32,8 @@
* this class.
*/
protected:
- int GetRow() SIP_OVERRIDE;
- int GetCol() SIP_OVERRIDE;
+ int GetRow();
+ int GetCol();
::wxEvent* Clone() const SIP_OVERRIDE;
::wxEventCategory GetEventCategory() const SIP_OVERRIDE;
Can confirm this issue on arch linux, Python 3.9, wxPython 4.1.0, wxWidgets 3.1.5. The proposed patch seems to fix it, thanks @stefantalpalaru !
Thanks, also works for me on Cygwin, Windows 11, Python 3.6 (currently building 3.7 and 3.8), wxPython 4.1.1, wxWidgets 3.1.5.
Glad someone else figured this out, I wouldn't have known what changes to make.
Has someone succeeded to build wxPython 4.1.1 against official wxWidgets 3.1.6, yet? There seem to be many more changes needed than the simple 2 line patch which was needed to build against 3.1.5.
Has someone succeeded to build wxPython 4.1.1 against official wxWidgets 3.1.6, yet? There seem to be many more changes needed than the simple 2 line patch which was needed to build against 3.1.5.
I'm working on updating the master branch to use wxWidgets 3.1.6. But yes, there are quite a few changes required.
Thanks for the headsup.
I still haven't finished my new package version for Cygwin actually, couldn't get the test suite to work, but that's another issue to file. Cheers for the reminder though, I'd all but forgotten I was doing that.
Closing this because --use-syswx
works again with 4.2.0.