Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 766914 - dev-python/wxpython-4.2.0 version bump
Summary: dev-python/wxpython-4.2.0 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo wxWidgets project
URL:
Whiteboard:
Keywords: PullRequest
: 863494 881145 883061 (view as bug list)
Depends on: 577030
Blocks: py310, python3.10-compat 724540 858548 873124
  Show dependency tree
 
Reported: 2021-01-24 18:40 UTC by m.manico
Modified: 2023-02-17 08:40 UTC (History)
12 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description m.manico 2021-01-24 18:40:19 UTC
wxPython 4.1.1 is released
https://www.wxpython.org/news/2020-11-21-wxpython-411-release/index.html

Reproducible: Always
Comment 1 Mart Raudsepp gentoo-dev 2021-01-25 08:51:03 UTC
wxPython 4.1 tracks wxWidgets (wxGTK) 3.1.x, which is a development release without ABI stability. Does wxPython 4.1.1 build and work properly against wxGTK-3.0.x, do you know?
Comment 2 m.manico 2021-01-25 09:33:19 UTC
I don't know. I did not investigate requirements/context when filing this bump request.

I guess we wait for wxGTK 3.1.x to stabilize for it to enter the portage tree, which is tracked at https://bugs.gentoo.org/577030
Comment 3 Ștefan Talpalaru 2021-01-26 02:32:02 UTC
(In reply to Mart Raudsepp from comment #1)
> Does wxPython 4.1.1 build and work properly against
> wxGTK-3.0.x, do you know?

wxPython-4.1.1 depends on an unreleased wxWidgets-3.1.5, so it cannot be built with the system wxWidgets (wxGTK): https://github.com/wxWidgets/Phoenix/issues/1909

The best you can do right now is wxPython-4.1.0 and wxGTK-3.1.4.
Comment 4 Ștefan Talpalaru 2021-08-20 03:08:43 UTC
dev-python/wxpython-4.1.1-r1 and x11-libs/wxGTK-3.1.5-r300 are available in my overlay: https://github.com/stefantalpalaru/gentoo-overlay
Comment 5 Bernard Cafarelli gentoo-dev 2022-07-09 11:16:50 UTC
A displaycal fork supporting python 3 requires wxpython 4.1.1, so I added this bug as dependency. Good news is that wxwidgets stable 4.2 was also just released, so wxpython 4.1.1 could get in tree after that
Comment 6 Ștefan Talpalaru 2022-07-09 14:40:15 UTC
wxpython-4.2.0_p20220629 is available in my overlay.
Comment 7 jospezial 2022-09-26 15:13:40 UTC
(In reply to Ștefan Talpalaru from comment #6)
> wxpython-4.2.0_p20220629 is available in my overlay.

Please update the ebuild in your overlay to the wxpython-4.2.0 release.
The release version has a commit that could fix my build error.
https://github.com/wxWidgets/Phoenix/commit/90171ba21659c3d9c51a478188eb1099ec382645

../../../../sip/siplib/siplib.c: In function ‘sip_api_get_frame’:
../../../../sip/siplib/siplib.c:12751:22: error: invalid use of undefined type ‘struct _frame’
12751 |         frame = frame->f_back;
      |                      ^~

Waf: Leaving directory `/var/tmp/portage/dev-python/wxpython-4.2.0_p20220629-r1/work/wxPython-4.2.0a1.dev5439+9d4ed223-python3_11/build/waf/3.11/gtk3'
Build failed
 -> task in 'siplib' failed with exit status 1: 
        {task 139966288909984: c siplib.c -> siplib.c.1.o}
['x86_64-pc-linux-gnu-gcc', '-UNDEBUG', '-pthread', '-O3', '-pthread', '-fPIC', '-pthread', '-pthread', '-I/usr/include/gtk-3.0', '-I/usr/include/pango-1.0', '-I/usr/include/glib-2.0', '-I/usr/lib64/glib-2.0/include', '-I/usr/lib64/libffi/include', '-I/usr/include/harfbuzz', '-I/usr/include/freetype2', '-I/usr/include/libmount', '-I/usr/include/blkid', '-I/usr/include/fribidi', '-I/usr/include/cairo', '-I/usr/include/pixman-1', '-I/usr/include/libpng16', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/gio-unix-2.0', '-I/usr/include/atk-1.0', '-I/usr/include/at-spi2-atk/2.0', '-I/usr/include/dbus-1.0', '-I/usr/lib64/dbus-1.0/include', '-I/usr/include/at-spi-2.0', '-pthread', '-UNDEBUG', '-g', '-I/usr/lib64/wx/include/gtk3-unicode-3.2-gtk3', '-I/usr/include/wx-3.2-gtk3', '-Isip/siplib', '-I../../../../sip/siplib', '-Iwx/include', '-I../../../../wx/include', '-Isrc', '-I../../../../src', '-I/usr/include/python3.11', '-DPYTHONDIR="/usr/local/lib/python3.11/site-packages"', '-DPYTHONARCHDIR="/usr/local/lib/python3.11/site-packages"', '-DHAVE_PYEXT=1', '-DHAVE_PYTHON_H=1', '-DHAVE_WX=1', '-DHAVE_WXADV=1', '-DHAVE_WXSTC=1', '-DHAVE_WXHTML=1', '-DHAVE_WXGL=1', '-DHAVE_WXXML=1', '-DHAVE_WXXRC=1', '-DHAVE_WXRICHTEXT=1', '-DHAVE_WXMEDIA=1', '-DHAVE_WXRIBBON=1', '-DHAVE_WXPROPGRID=1', '-DHAVE_WXAUI=1', '-D_FILE_OFFSET_BITS=64', '-DWXUSINGDLL', '-D__WXGTK__', '../../../../sip/siplib/siplib.c', '-c', '-o/var/tmp/portage/dev-python/wxpython-4.2.0_p20220629-r1/work/wxPython-4.2.0a1.dev5439+9d4ed223-python3_11/build/waf/3.11/gtk3/sip/siplib/siplib.c.1.o', '-DNDEBUG']
Will build using: "/usr/bin/python3.11"
3.11.0rc2 (main, Sep 13 2022, 01:29:22) [GCC 12.2.1 20220910]
Python's architecture is 64bit
cfg.VERSION: 4.2.0a1

Running command: build_py
Checking for /var/tmp/portage/dev-python/wxpython-4.2.0_p20220629-r1/work/wxPython-4.2.0a1.dev5439+9d4ed223-python3_11/bin/waf-2.0.22...
"/usr/bin/python3.11" /var/tmp/portage/dev-python/wxpython-4.2.0_p20220629-r1/work/wxPython-4.2.0a1.dev5439+9d4ed223-python3_11/bin/waf-2.0.22 --verbose --wx_config=/usr/lib64/wx/config/gtk3-unicode-3.2-gtk3 --jobs=3 --gtk3 --python="/usr/bin/python3.11" --out=build/waf/3.11/gtk3 configure build 
Command '"/usr/bin/python3.11" /var/tmp/portage/dev-python/wxpython-4.2.0_p20220629-r1/work/wxPython-4.2.0a1.dev5439+9d4ed223-python3_11/bin/waf-2.0.22 --verbose --wx_config=/usr/lib64/wx/config/gtk3-unicode-3.2-gtk3 --jobs=3 --gtk3 --python="/usr/bin/python3.11" --out=build/waf/3.11/gtk3 configure build ' failed with exit code 1.
Finished command: build_py (0m8.646s)
 * ERROR: dev-python/wxpython-4.2.0_p20220629-r1::stefantalpalaru failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  122:  Called src_compile
 *   environment, line 3617:  Called distutils-r1_src_compile
 *   environment, line 1660:  Called _distutils-r1_run_foreach_impl 'python_compile'
 *   environment, line  513:  Called python_foreach_impl 'distutils-r1_run_phase' 'python_compile'
 *   environment, line 3195:  Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_compile'
 *   environment, line 2708:  Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_compile'
 *   environment, line 2706:  Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_compile'
 *   environment, line  940:  Called distutils-r1_run_phase 'python_compile'
 *   environment, line 1653:  Called python_compile
 *   environment, line 2962:  Called die
 * The specific snippet of code:
 *       ${PYTHON} build.py build_py --use_syswx --no_magic --jobs=$(makeopts_jobs) --verbose --release || die
Comment 8 Ștefan Talpalaru 2022-09-26 16:24:02 UTC
> Please update the ebuild in your overlay to the wxpython-4.2.0 release.

That would be a downgrade. Don't confuse "_p" with "_pre".

> The release version has a commit that could fix my build error.
> https://github.com/wxWidgets/Phoenix/commit/90171ba21659c3d9c51a478188eb1099ec382645

That commit is already there and it does not apply to your problem.

> ../../../../sip/siplib/siplib.c:12751:22: error: invalid use of undefined type ‘struct _frame’

This comes from Python 3.11 breaking backwards compatibility and Sip not knowing about it: https://bugzilla.redhat.com/show_bug.cgi?id=2062145

There is a Sip patch available: https://src.fedoraproject.org/rpms/sip/c/2aa40956d602c67cef14515a48344efaf40d943e?branch=main

Or you can go back to Python 3.10 and wait for an upstream Sip fix.
Comment 9 jospezial 2022-09-26 18:22:44 UTC
(In reply to Ștefan Talpalaru from comment #8)
> > Please update the ebuild in your overlay to the wxpython-4.2.0 release.
> 
> That would be a downgrade. Don't confuse "_p" with "_pre".
> 
> > The release version has a commit that could fix my build error.
> > https://github.com/wxWidgets/Phoenix/commit/90171ba21659c3d9c51a478188eb1099ec382645
> 
> That commit is already there and it does not apply to your problem.

You are wrong.
Your ebuild downloads https://wxpython.org/Phoenix/snapshot-builds/wxPython-4.2.0a1.dev5439+9d4ed223.tar.gz
Which is an alpha snapshot of 4.2.0 dated 2022-06-30 13:53
So your version an alpha or pre and not a patch version.

siplib.c from this archive contains:

/*
 * Return a frame from the execution stack.
 */
static struct _frame *sip_api_get_frame(int depth)
{
#if defined(PYPY_VERSION)
    /* PyPy only supports a depth of 0. */
    return NULL;
#else
    struct _frame *frame = PyEval_GetFrame();

    while (frame != NULL && depth > 0)
    {
        frame = frame->f_back;
        --depth;
    }

    return frame;
#endif
}

release date 14 Aug 2022
https://github.com/wxWidgets/Phoenix/releases/download/wxPython-4.2.0/wxPython-4.2.0.tar.gz
siplib.c from this archive contains:

/*
 * Return a frame from the execution stack.  Note that we use 'struct _frame'
 * rather than PyFrameObject because the latter wasn't exposed to the limited
 * API until Python v3.9.
 */
static struct _frame *sip_api_get_frame(int depth)
{
#if defined(PYPY_VERSION)
    /* PyPy only supports a depth of 0. */
    return NULL;
#else
    struct _frame *frame = PyEval_GetFrame();

    while (frame != NULL && depth > 0)
    {
#if PY_VERSION_HEX < 0x03090000
        frame = frame->f_back;
#else
        frame = PyFrame_GetBack(frame);

        /* Historically we return a borrowed reference. */
        Py_XDECREF(frame);
#endif
        --depth;
    }

    return frame;
#endif
}

And why don't we use dev-python/sip-6.6.2 instead of the bundled lib?
sip-6.6.2.tar.gz also has the same fix as the bundled lib from wxPython-4.2.0.tar.gz
Comment 10 Ștefan Talpalaru 2022-09-27 00:49:23 UTC
You're right. wxpython-4.2.0 is available in my overlay.

I'm recreating the Sip module from the system package, now, and I added the user's compiler flags to the build.
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-13 17:11:04 UTC
*** Bug 881145 has been marked as a duplicate of this bug. ***
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-13 17:11:15 UTC
*** Bug 863494 has been marked as a duplicate of this bug. ***
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-25 20:17:04 UTC
*** Bug 883061 has been marked as a duplicate of this bug. ***
Comment 14 Larry the Git Cow gentoo-dev 2023-02-17 08:40:46 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6abcc6cb062e9d7625c9a96a0adb6a8a0fb19ded

commit 6abcc6cb062e9d7625c9a96a0adb6a8a0fb19ded
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-02-03 14:40:26 +0000
Commit:     Arsen Arsenović <arsen@gentoo.org>
CommitDate: 2023-02-17 08:38:30 +0000

    dev-python/wxpython: add 4.2.0
    
    Thanks to Ștefan Talpalaru <stefantalpalaru@yahoo.com> for his notes in the
    bump bug.
    
    Closes: https://bugs.gentoo.org/542672
    Closes: https://bugs.gentoo.org/766914
    Closes: https://bugs.gentoo.org/890953
    Signed-off-by: Sam James <sam@gentoo.org>
    Closes: https://github.com/gentoo/gentoo/pull/29407
    Signed-off-by: Arsen Arsenović <arsen@gentoo.org>

 dev-python/wxpython/Manifest                       |   1 +
 .../wxpython/files/wxpython-4.2.0-flags.patch      |  16 +++
 .../files/wxpython-4.2.0-no-attrdict.patch         |  13 +++
 .../wxpython/files/wxpython-4.2.0-no-webkit.patch  |  27 +++++
 dev-python/wxpython/wxpython-4.2.0.ebuild          | 125 +++++++++++++++++++++
 5 files changed, 182 insertions(+)