Build failed with python 3.12 and python 3.13 Reproducible: Always Steps to Reproduce: 1. enable python targets python3_12 and python3_13 */* PYTHON_TARGETS: python3_12 2. sudo emerge -1v =dev-libs/json-parser-1.1.0_p20211208 3. build failed Actual Results: Key output: 2025-05-06 16:41:36,074 root INFO x86_64-pc-linux-gnu-g++ -march=znver4 -mtune=znver4 -O2 -pipe -DNDEBUG -fPIC -I/usr/include/python3.12 -c ./jsonparser.cpp -o /var/tmp/portage/dev-libs/json-parser-1.1.0_p20211208/work/json-parser-531a49062975d6d2cd5d69b75ad5481a8c0e18c5-python3_12/build0/temp.linux-x86_64-cpython-312/jsonparser.o In file included from ./jsonparser.cpp:1141: ./wrap_json.c: In function ‘PyObject* convert_value(json_value*)’: ./wrap_json.c:61:21: error: ‘PyInt_FromLong’ was not declared in this scope; did you mean ‘PyLong_FromLong’? 61 | value = PyInt_FromLong(data->u.integer); | ^~~~~~~~~~~~~~ | PyLong_FromLong error: command '/usr/bin/x86_64-pc-linux-gnu-g++' failed with exit code 1 * ERROR: dev-libs/json-parser-1.1.0_p20211208::gentoo failed (compile phase): * Wheel build failed Expected Results: Build success
Please always include the full build.log and emerge --info.
Created attachment 927831 [details] build.log
commit 51a6ba6c18e4cd0cbb928bf4a1d5ad6704e600a5 Author: Petr Vaněk <arkamar@gentoo.org> Date: Wed May 22 10:44:28 2024 +0200 dev-libs/json-parser: enable py3.13 Signed-off-by: Petr Vaněk <arkamar@gentoo.org>
Created attachment 927832 [details] emerge --info
I have sent a pull request to fix this bug.
It is not py3.13 only, some change triggered this in all supported python versions. It is funny, I noticed this bug today morning as well :) @vowstart: I will look to your PR soon, thanks!
This issue was introduced in commit 85b95309d93c ("dev-python/lxml: Fix building with cython-3.1*") which makes cython-3.1.0_rc1 available in my system. I think cython is to blame here.
Ah, I'm sorry then - I went off memory and thought it got removed in py3.13.
For completeness, it was this change https://github.com/cython/cython/commit/9af421163cb8081414be347038dee7a82b29e8dd
(In reply to Petr Vaněk from comment #7) > This issue was introduced in commit 85b95309d93c ("dev-python/lxml: Fix > building with cython-3.1*") which makes cython-3.1.0_rc1 available in my > system. I think cython is to blame here. No. The package is to blame for relying on Cython providing these functions that were never part of the public API.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb89b4e2acc3c63b7b118c168dd5d779b60f7a72 commit fb89b4e2acc3c63b7b118c168dd5d779b60f7a72 Author: Huang Rui <vowstar@gmail.com> AuthorDate: 2025-05-06 09:00:00 +0000 Commit: Petr Vaněk <arkamar@gentoo.org> CommitDate: 2025-05-08 11:40:38 +0000 dev-libs/json-parser: fix bug 954840 and 955499 Closes: https://bugs.gentoo.org/954840 Closes: https://bugs.gentoo.org/955499 Signed-off-by: Huang Rui <vowstar@gmail.com> Upstream-PR: https://github.com/json-parser/json-parser/pull/182 Closes: https://github.com/gentoo/gentoo/pull/41956 Signed-off-by: Petr Vaněk <arkamar@gentoo.org> .../json-parser-1.1.0-fix-suspicious-version.patch | 31 +++++++++++++++++ .../files/json-parser-1.1.0-python3-pylong.patch | 40 ++++++++++++++++++++++ .../json-parser/json-parser-1.1.0_p20211208.ebuild | 10 ++++-- 3 files changed, 78 insertions(+), 3 deletions(-)