diff mbox series

[meta-python] python3-posix-ipc: switch to PEP-517 build backend

Message ID 20250425002624.1552609-1-raj.khem@gmail.com
State Accepted
Headers show
Series [meta-python] python3-posix-ipc: switch to PEP-517 build backend | expand

Commit Message

Khem Raj April 25, 2025, 12:26 a.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-python/recipes-devtools/python/python3-posix-ipc_1.2.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Martin Jansa April 30, 2025, 1:10 p.m. UTC | #1
Did anyone see build failure with this like:

DEBUG: Executing shell function do_compile
* Getting build dependencies for wheel...
/usr/lib/ld-linux-aarch64.so.1: No such file or directory
Traceback (most recent call last):
  File "TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-posix-ipc/1.2.0/recipe-sysroot-native/usr/lib/python3.13/site-packages/pyproject_hooks/_in_process/_in_process.py",
line 389, in <module>
    main()
    ~~~~^^
  File "TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-posix-ipc/1.2.0/recipe-sysroot-native/usr/lib/python3.13/site-packages/pyproject_hooks/_in_process/_in_process.py",
line 373, in main
    json_out["return_val"] = hook(**hook_input["kwargs"])
                             ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-posix-ipc/1.2.0/recipe-sysroot-native/usr/lib/python3.13/site-packages/pyproject_hooks/_in_process/_in_process.py",
line 143, in get_requires_for_build_wheel
    return hook(config_settings)
  File "TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-posix-ipc/1.2.0/recipe-sysroot-native/usr/lib/python3.13/site-packages/setuptools/build_meta.py",
line 334, in get_requires_for_build_wheel
    return self._get_build_requires(config_settings, requirements=[])
           ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-posix-ipc/1.2.0/recipe-sysroot-native/usr/lib/python3.13/site-packages/setuptools/build_meta.py",
line 304, in _get_build_requires
    self.run_setup()
    ~~~~~~~~~~~~~~^^
  File "TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-posix-ipc/1.2.0/recipe-sysroot-native/usr/lib/python3.13/site-packages/setuptools/build_meta.py",
line 320, in run_setup
    exec(code, locals())
    ~~~~^^^^^^^^^^^^^^^^
  File "<string>", line 23, in <module>
  File "TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-posix-ipc/1.2.0/posix_ipc-1.2.0/build_support/discover_system_info.py",
line 409, in discover
    d["QUEUE_PRIORITY_MAX"] = sniff_mq_prio_max()
                              ~~~~~~~~~~~~~~~~~^^
  File "TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-posix-ipc/1.2.0/posix_ipc-1.2.0/build_support/discover_system_info.py",
line 238, in sniff_mq_prio_max
    if max_priority < 0:
       ^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'str' and 'int'

ERROR Backend subprocess exited when trying to invoke
get_requires_for_build_wheel
WARNING: TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-posix-ipc/1.2.0/temp/run.do_compile.2736023:168
exit 1 from 'nativepython3 -m build --no-isolation --wheel --outdir
TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-posix-ipc/1.2.0/dist
TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-posix-ipc/1.2.0/posix_ipc-1.2.0'
WARNING: Backtrace (BB generated script):

I get it reliably on ubuntu-22.04 jenkins builders, but cannot
reproduce it locally (with ubuntu 25.04, 22.04 nor gentoo), so I'm
wondering what's going on before this gets backported to walnascar,
styhead, scarthgap as requested by Gudni.

I'll try to get access to jenkins workspace to see what was trying to
use /usr/lib/ld-linux-aarch64.so.1 there.

Regards,




On Fri, Apr 25, 2025 at 2:26 AM Khem Raj via lists.openembedded.org
<raj.khem=gmail.com@lists.openembedded.org> wrote:
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta-python/recipes-devtools/python/python3-posix-ipc_1.2.0.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta-python/recipes-devtools/python/python3-posix-ipc_1.2.0.bb b/meta-python/recipes-devtools/python/python3-posix-ipc_1.2.0.bb
> index 29e1b35122..b3da09c35b 100644
> --- a/meta-python/recipes-devtools/python/python3-posix-ipc_1.2.0.bb
> +++ b/meta-python/recipes-devtools/python/python3-posix-ipc_1.2.0.bb
> @@ -9,4 +9,4 @@ UPSTREAM_CHECK_PYPI_PACKAGE = "${PYPI_PACKAGE}"
>
>  SRC_URI[sha256sum] = "b7444e2703c156b3cb9fcb568e85d716232f3e78f04529ebc881cfb2aedb3838"
>
> -inherit setuptools3 pypi
> +inherit pypi python_setuptools_build_meta
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#117120): https://lists.openembedded.org/g/openembedded-devel/message/117120
> Mute This Topic: https://lists.openembedded.org/mt/112443744/3617156
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [martin.jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Khem Raj April 30, 2025, 3 p.m. UTC | #2
I have 22.04 builders where it worked ok on 4 different combinations
also on ubuntu 20.04+buildtools

On Wed, Apr 30, 2025 at 6:11 AM Martin Jansa <martin.jansa@gmail.com> wrote:
>
> Did anyone see build failure with this like:
>
> DEBUG: Executing shell function do_compile
> * Getting build dependencies for wheel...
> /usr/lib/ld-linux-aarch64.so.1: No such file or directory
> Traceback (most recent call last):
>   File "TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-posix-ipc/1.2.0/recipe-sysroot-native/usr/lib/python3.13/site-packages/pyproject_hooks/_in_process/_in_process.py",
> line 389, in <module>
>     main()
>     ~~~~^^
>   File "TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-posix-ipc/1.2.0/recipe-sysroot-native/usr/lib/python3.13/site-packages/pyproject_hooks/_in_process/_in_process.py",
> line 373, in main
>     json_out["return_val"] = hook(**hook_input["kwargs"])
>                              ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
>   File "TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-posix-ipc/1.2.0/recipe-sysroot-native/usr/lib/python3.13/site-packages/pyproject_hooks/_in_process/_in_process.py",
> line 143, in get_requires_for_build_wheel
>     return hook(config_settings)
>   File "TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-posix-ipc/1.2.0/recipe-sysroot-native/usr/lib/python3.13/site-packages/setuptools/build_meta.py",
> line 334, in get_requires_for_build_wheel
>     return self._get_build_requires(config_settings, requirements=[])
>            ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-posix-ipc/1.2.0/recipe-sysroot-native/usr/lib/python3.13/site-packages/setuptools/build_meta.py",
> line 304, in _get_build_requires
>     self.run_setup()
>     ~~~~~~~~~~~~~~^^
>   File "TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-posix-ipc/1.2.0/recipe-sysroot-native/usr/lib/python3.13/site-packages/setuptools/build_meta.py",
> line 320, in run_setup
>     exec(code, locals())
>     ~~~~^^^^^^^^^^^^^^^^
>   File "<string>", line 23, in <module>
>   File "TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-posix-ipc/1.2.0/posix_ipc-1.2.0/build_support/discover_system_info.py",
> line 409, in discover
>     d["QUEUE_PRIORITY_MAX"] = sniff_mq_prio_max()
>                               ~~~~~~~~~~~~~~~~~^^
>   File "TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-posix-ipc/1.2.0/posix_ipc-1.2.0/build_support/discover_system_info.py",
> line 238, in sniff_mq_prio_max
>     if max_priority < 0:
>        ^^^^^^^^^^^^^^^^
> TypeError: '<' not supported between instances of 'str' and 'int'
>
> ERROR Backend subprocess exited when trying to invoke
> get_requires_for_build_wheel
> WARNING: TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-posix-ipc/1.2.0/temp/run.do_compile.2736023:168
> exit 1 from 'nativepython3 -m build --no-isolation --wheel --outdir
> TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-posix-ipc/1.2.0/dist
> TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-posix-ipc/1.2.0/posix_ipc-1.2.0'
> WARNING: Backtrace (BB generated script):
>
> I get it reliably on ubuntu-22.04 jenkins builders, but cannot
> reproduce it locally (with ubuntu 25.04, 22.04 nor gentoo), so I'm
> wondering what's going on before this gets backported to walnascar,
> styhead, scarthgap as requested by Gudni.
>
> I'll try to get access to jenkins workspace to see what was trying to
> use /usr/lib/ld-linux-aarch64.so.1 there.
>
> Regards,
>
>
>
>
> On Fri, Apr 25, 2025 at 2:26 AM Khem Raj via lists.openembedded.org
> <raj.khem=gmail.com@lists.openembedded.org> wrote:
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---
> >  meta-python/recipes-devtools/python/python3-posix-ipc_1.2.0.bb | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta-python/recipes-devtools/python/python3-posix-ipc_1.2.0.bb b/meta-python/recipes-devtools/python/python3-posix-ipc_1.2.0.bb
> > index 29e1b35122..b3da09c35b 100644
> > --- a/meta-python/recipes-devtools/python/python3-posix-ipc_1.2.0.bb
> > +++ b/meta-python/recipes-devtools/python/python3-posix-ipc_1.2.0.bb
> > @@ -9,4 +9,4 @@ UPSTREAM_CHECK_PYPI_PACKAGE = "${PYPI_PACKAGE}"
> >
> >  SRC_URI[sha256sum] = "b7444e2703c156b3cb9fcb568e85d716232f3e78f04529ebc881cfb2aedb3838"
> >
> > -inherit setuptools3 pypi
> > +inherit pypi python_setuptools_build_meta
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#117120): https://lists.openembedded.org/g/openembedded-devel/message/117120
> > Mute This Topic: https://lists.openembedded.org/mt/112443744/3617156
> > Group Owner: openembedded-devel+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [martin.jansa@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
Guðni Már Gilbert April 30, 2025, 3:06 p.m. UTC | #3
Interesting. I did my testing on scarthgap with Ubuntu 24.04 via Docker. I can try changing it to 22.04 and re-check on my end.
Martin Jansa May 5, 2025, 7:06 a.m. UTC | #4
Hi,

thanks for trying to reproduce.

I got access to those jenkins nodes and have more details

The issue are the tests from compile_and_run
https://github.com/osvenskan/posix_ipc/blob/develop/build_support/discover_system_info.py#L72

It builds multiple tests like:
aarch64-webos-linux-gcc  -mbranch-protection=standard
-fstack-protector-all  -O2 -D_FORTIFY_SOURCE=2 -Wformat
-Wformat-security -Werror=format-security -Werror=return-type
-funwind-tables --sysroot=python3-posix-ipc/1.2.0/recipe-sysroot -Wall
-o ./build_support/src/foo ./build_support/src/sniff_mq_existence.c
-lpthread
aarch64-webos-linux-gcc  -mbranch-protection=standard
-fstack-protector-all  -O2 -D_FORTIFY_SOURCE=2 -Wformat
-Wformat-security -Werror=format-security -Werror=return-type
-funwind-tables --sysroot=python3-posix-ipc/1.2.0/recipe-sysroot -Wall
-o ./build_support/src/foo ./build_support/src/sniff_mq_prio_max.c
-lpthread

And then tries to run them while on my local 22.04 docker container
running build_support/src/foo from the last tests results in:
posix_ipc-1.2.0 $ ./build_support/src/foo
bash: ./build_support/src/foo: cannot execute binary file: Exec format error
which triggers the Exception in compile_and_run and returns None

while on jenkins it fails with:
posix_ipc-1.2.0$ ./build_support/src/foo
/usr/lib/ld-linux-aarch64.so.1: No such file or directory

and the compile_and_run returns
b''
which then causes
python3-posix-ipc/1.2.0/posix_ipc-1.2.0/build_support/discover_system_info.py",
line 244, in sniff_mq_prio_max
    if max_priority < 0:
       ^^^^^^^^^^^^^^^^

in https://github.com/osvenskan/posix_ipc/blob/develop/build_support/discover_system_info.py#L220

I'll report it upstream and lets see in
https://github.com/osvenskan/posix_ipc/pull/77
and I'll send patch with the same shortly.

But please hold backporting this change to stable releases for a while
unless it fixes some important issue.

Cheers,


On Wed, Apr 30, 2025 at 5:06 PM Guðni Már Gilbert via
lists.openembedded.org <gudni.m.g=gmail.com@lists.openembedded.org>
wrote:
>
> Interesting. I did my testing on scarthgap with Ubuntu 24.04 via Docker. I can try changing it to 22.04 and re-check on my end.
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#117260): https://lists.openembedded.org/g/openembedded-devel/message/117260
> Mute This Topic: https://lists.openembedded.org/mt/112443744/3617156
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [martin.jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-posix-ipc_1.2.0.bb b/meta-python/recipes-devtools/python/python3-posix-ipc_1.2.0.bb
index 29e1b35122..b3da09c35b 100644
--- a/meta-python/recipes-devtools/python/python3-posix-ipc_1.2.0.bb
+++ b/meta-python/recipes-devtools/python/python3-posix-ipc_1.2.0.bb
@@ -9,4 +9,4 @@  UPSTREAM_CHECK_PYPI_PACKAGE = "${PYPI_PACKAGE}"
 
 SRC_URI[sha256sum] = "b7444e2703c156b3cb9fcb568e85d716232f3e78f04529ebc881cfb2aedb3838"
 
-inherit setuptools3 pypi
+inherit pypi python_setuptools_build_meta