https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: dev-python/cangjie-1.3-r1 fails to compile (PYTHON-3.12-SYSTEM). Discovered on: amd64 (internal ref: python-3.12_tinderbox) NOTE: (PYTHON-3.12-SYSTEM) in the summary means that the bug was found on a machine that runs python-3.12 but this bug MAY or MAY NOT BE related to the new python version
Created attachment 866446 [details] build.log build log and emerge --info
Created attachment 866447 [details] 1-config.log 1-config.log
Error(s) that match a know pattern in addition to what has been reported in the summary: SyntaxError: unterminated string literal (detected at line 1) configure: error: Please use cython >= 0.14
That's a weird one.. unsure if specifically has issues with cython3 but it seems there's issues with CYTHON_VERSION. CYTHON_VERSION=`$CYTHON --version 2>&1 | cut -d" " -f3` This may be already known, but here's the strange thing: cython-0.29.36: $ cython --version 2>&1 Cython version 0.29.36 $ cython --version 2>&1 | cut -d" " -f3 0.29.36 (all normal) cython-3.0.0: $ cython --version 2>&1 Cython version 3.0.0 $ cython --version 2>&1 | cut -d" " -f3 3.0.0 3.0.0 $ cython --version 2>&1 | cat Cython version 3.0.0 Cython version 3.0.0 $ cython --version 2>/dev/null | cat Cython version 3.0.0 (it's returning the version string to both stderr and stdin, but only when using pipes) Suspect it added some sort of auto-detection so that stdout can be used without 2>&1, but removing 2>&1 doesn't work when using cython0. Nothing that a head -n 1 wouldn't work around though.
Eli, didn't you have to change something in Meson for a problem like this?
``` $ set -x; $PYTHON -c "from packaging.version import Version as ver; import sys; sys.exit(0 if ver(\"$CYTHON_VERSION\") >= ver(\"$CYTHON_MIN_VERSION\") else 1)" + python -c 'from packaging.version import Version as ver; import sys; sys.exit(0 if ver("3.0.0 3.0.0") >= ver("") else 1)' File "<string>", line 1 from packaging.version import Version as ver; import sys; sys.exit(0 if ver("3.0.0 ^ SyntaxError: unterminated string literal (detected at line 1) ``` Of course homegrown systems for finding version numbers... IMO this project should simply migrate to meson instead. ;) > Eli, didn't you have to change something in Meson for a problem like this? Sort of. Meson doesn't need to do anything for the released version of cython, other than be "clean", since we used to only check stderr and discard stdout, and that works with both cython versions. The issue here is that stdout and stderr are merged together, and then the shell code takes the version number column from every line together. There is a way to make cython be compatible with this old code, though. https://github.com/cython/cython/pull/5572
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1e8c193a6ce07f105dc3767bed420b7010eefd9 commit e1e8c193a6ce07f105dc3767bed420b7010eefd9 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-07-28 11:07:23 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-07-28 11:07:23 +0000 dev-python/cython: backport --version fix Closes: https://bugs.gentoo.org/911333 Thanks-to: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> dev-python/cython/cython-3.0.0-r1.ebuild | 85 ++++++++++++++++++++++ .../files/cython-3.0.0-version-stderr-stdout.patch | 35 +++++++++ 2 files changed, 120 insertions(+)