Can't build wxPython 4.2.2 on SOME suse distributions

When building wxPython 4.2.2 (from the tarball on wxPython/wxPython-*.tar.gz with removed subdirectory packaging/) on some SUSE distributions (but surprisingly not on others, even some very similar ones). During the building of the binaries, I get error:

[   21s] + python3.11 build.py etg --nodoc --use_syswx --gtk3 -v
[   21s] /home/abuild/rpmbuild/BUILD/wxPython-4.2.2/build.py:44: DeprecationWarning: dep_util is Deprecated. Use functions from setuptools instead.
[   21s]   from distutils.dep_util import newer, newer_group
[   29s] WARNING: Method wxPenInfo::Cap already exists in C++ class API, can not create a property.
[   29s] WARNING: Method wxPenInfo::Colour already exists in C++ class API, can not create a property.
[   29s] WARNING: Method wxPenInfo::Join already exists in C++ class API, can not create a property.
[   29s] WARNING: Method wxPenInfo::Quality already exists in C++ class API, can not create a property.
[   29s] WARNING: Method wxPenInfo::Stipple already exists in C++ class API, can not create a property.
[   29s] WARNING: Method wxPenInfo::Style already exists in C++ class API, can not create a property.
[   29s] WARNING: Method wxPenInfo::Width already exists in C++ class API, can not create a property.
[   32s] WARNING: Method wxGraphicsPenInfo::Cap already exists in C++ class API, can not create a property.
[   32s] WARNING: Method wxGraphicsPenInfo::Colour already exists in C++ class API, can not create a property.
[   32s] WARNING: Method wxGraphicsPenInfo::Join already exists in C++ class API, can not create a property.
[   32s] WARNING: Method wxGraphicsPenInfo::Stipple already exists in C++ class API, can not create a property.
[   32s] WARNING: Method wxGraphicsPenInfo::Style already exists in C++ class API, can not create a property.
[   32s] WARNING: Method wxGraphicsPenInfo::Width already exists in C++ class API, can not create a property.
[   35s] WARNING: Method wxCloseEvent::Veto already exists in C++ class API, can not create a property.
[   35s] WARNING: Method wxHelpEvent::Origin already exists in C++ class API, can not create a property.
[   36s] WARNING: Method wxStandardPaths::FileLayout already exists in C++ class API, can not create a property.
[   37s] Traceback (most recent call last):
[   37s]   File "/home/abuild/rpmbuild/BUILD/wxPython-4.2.2/etg/window.py", line 520, in <module>
[   37s]     run()
[   37s]   File "/home/abuild/rpmbuild/BUILD/wxPython-4.2.2/etg/window.py", line 254, in run
[   37s]     c.find('GetOrCreateAccessible').setCppCode("""\
[   37s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[   37s]   File "/home/abuild/rpmbuild/BUILD/wxPython-4.2.2/etgtools/extractors.py", line 123, in find
[   37s]     raise ExtractorError("Unable to find item named '%s' within %s named '%s'" %
[   37s] etgtools.extractors.ExtractorError: Unable to find item named 'GetOrCreateAccessible' within ClassDef named 'wxWindow'

(full build log with all details of packages used and steps taken is on https://mcepl.fedorapeople.org/tmp/_log-python-wxPython-SUSE_SLFO_1.1.txt

I was looking at add CreateAccessible and GetOrCreateAccessible by DietmarSchwertberger · Pull Request #2515 · wxWidgets/Phoenix · GitHub and related tickets, but it seems that everything which is discussed there has been already included in the tarball.

Anybody any idea, what’s going on, please?

Thank you for any response,

Matěj

Hello Matěj,

You specify: -use_syswx which will attempt to use the version of wxWidgets already installed in your system. Each wxPython version depends closely on a particular version of wxWidgets I wonder if this could be the problem.

You are trying to build wxPython 4.2.2. Which version of wxWidgets do you have in your system? Does the build succeed if you don’t specify that flag and build wxWidgets together with wxPython?

Please don’t comment on closed GitHub issues that are unrelated to this issue.

It appears you are attempting to build against system wxWidgets. You need to ensure whatever wxWidgets interface files you’re building against has this commit included:

You are right, upgrade of wxWidgets helped me. I feel like an idiot for spending so much time on this without realizing I am not using vendored wxWidgets at all. Oh, darn!

Thank you!