Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 911333 - dev-python/cangjie-1.3-r1 fails to compile (PYTHON-3.12-SYSTEM): configure: error: Please use cython >= 0.14
Summary: dev-python/cangjie-1.3-r1 fails to compile (PYTHON-3.12-SYSTEM): configure: e...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: CJK Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: cython3-tracker
  Show dependency tree
 
Reported: 2023-07-27 19:47 UTC by Agostino Sarubbo
Modified: 2023-07-28 11:08 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,55.37 KB, text/plain)
2023-07-27 19:47 UTC, Agostino Sarubbo
Details
1-config.log (1-config.log,30.93 KB, text/plain)
2023-07-27 19:47 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-07-27 19:47:36 UTC
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
Comment 1 Agostino Sarubbo gentoo-dev 2023-07-27 19:47:38 UTC
Created attachment 866446 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2023-07-27 19:47:39 UTC
Created attachment 866447 [details]
1-config.log

1-config.log
Comment 3 Agostino Sarubbo gentoo-dev 2023-07-27 19:47:40 UTC
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
Comment 4 Ionen Wolkens gentoo-dev 2023-07-27 20:44:06 UTC
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.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-27 22:09:16 UTC
Eli, didn't you have to change something in Meson for a problem like this?
Comment 6 Eli Schwartz gentoo-dev 2023-07-28 03:21:42 UTC
```
$ 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
Comment 7 Larry the Git Cow gentoo-dev 2023-07-28 11:07:48 UTC
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(+)