Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 702364 - dev-lang/yasm-1.3.0 USE=python is incompatible with python3 - configure: error: Building Python bindings explicitly requested, but can't build Python bindings because either Cython, Python headers or a suitable Python version was not found
Summary: dev-lang/yasm-1.3.0 USE=python is incompatible with python3 - configure: erro...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: py3-tracker, python-3-incompatible
  Show dependency tree
 
Reported: 2019-12-09 16:17 UTC by Ulenrich
Modified: 2020-10-27 13:18 UTC (History)
8 users (show)

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


Attachments
build.log (yasm-1.3.0:20191209-155956.log,7.20 KB, text/plain)
2019-12-09 16:17 UTC, Ulenrich
Details
build-log from succesful build with python-3.7 (yasm-build.log.txt,29.31 KB, text/plain)
2020-06-27 14:56 UTC, Forza
Details
ebuild used in successful build with python-3.7 (yasm-1.3.0.ebuild,1.42 KB, text/plain)
2020-06-27 14:57 UTC, Forza
Details
emerge --info on machine with python-3.7 (file_702364.txt,7.41 KB, text/plain)
2020-06-27 14:59 UTC, Forza
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ulenrich 2019-12-09 16:17:07 UTC
Created attachment 598956 [details]
build.log

My try fails early:
---
dev-lang/yasm-1.3.0::pmaci [1.3.0::gentoo] USE="nls python*" PYTHON_TARGETS="(-python2_7%) python3_7%*" 0 KiB
...
...
hecking for Cython >= 0.11.3... no
checking for headers required to compile python extensions...   File "<string>", line 1
    import sys; print sys.prefix
                        ^
SyntaxError: invalid syntax
  File "<string>", line 1
    import sys; print sys.exec_prefix
                        ^
SyntaxError: invalid syntax
---
typical python3 error with print without brackets
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2019-12-09 16:28:03 UTC
Is this some local overlay or something?
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2019-12-09 16:29:05 UTC
~/git/gentoo/dev-lang/yasm $
grep -r PYTHON_COMPAT
yasm-1.3.0.ebuild:PYTHON_COMPAT=( python2_7 )
yasm-1.2.0-r1.ebuild:PYTHON_COMPAT=( python2_7 )
yasm-9999.ebuild:PYTHON_COMPAT=( python2_7 )

The problem appears to exist only in ebuilds that incorrectly add python3_* to PYTHON_COMPAT.
Comment 3 Ulenrich 2019-12-09 16:29:51 UTC
Yes - I just change PYTHON in the ebuild.
---
further:

https://bugs.gentoo.org/show_bug.cgi?id=643154
states python is wrongly exported using an old func

upstream the only python file genstring.py has a python3 patch:
https://github.com/yasm/yasm/commit/d3ea3ac89f48f0cc28c6c32507afeec6b594cbac
this indicates to me the configure phase indead could be better
Comment 4 Ulenrich 2019-12-09 16:33:50 UTC
@Jeroen I should not work to provide to 694800
Gentoo developers only?
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2019-12-09 16:42:48 UTC
(In reply to Ulenrich from comment #3)
> Yes - I just change PYTHON in the ebuild.

You failed to mention that initially.
Comment 6 Ulenrich 2019-12-09 16:59:15 UTC
(In reply to Jeroen Roovers from comment #5)
> (In reply to Ulenrich from comment #3)
> > Yes - I just change PYTHON in the ebuild.
> 
> You failed to mention that initially.
I am a 60y old man, I was still working  initially ... :/

And the patch is 6y old an in the Gentoo repo as source
I mentioned it for a hint that the initial configure phase might buggy. 
Sorry ...
Comment 7 Willard Dawson 2020-05-13 19:20:22 UTC
Inasmuch as python2_7 is imminently dead, and such things as p7zip and others require yasm, is there a version of yasm that does support python3?
Comment 8 Dmitry Grigoriev 2020-05-13 22:13:30 UTC
Looks like 1.3.0 already has python 3 support: https://github.com/yasm/yasm/commits/v1.3.0, top 2nd commit of Aug 10, 2014.

Also found this: https://github.com/yasm/yasm/issues/143
Comment 9 Mike Gilbert gentoo-dev 2020-05-13 22:56:22 UTC
The python3 support in yasm-1.3.0 is incomplete, as illustrated in comment 0.
Comment 10 Forza 2020-06-27 14:54:50 UTC
Hi,

I could compile yasm-1.3.0 with python-3.7. I will attach ebuild and build-log.

1) cp yasm-9999.ebuild yasm-1.3.0.ebuild
2) set "PYTHON_COMPAT=( python3_7 )"
3) set "KEYWORDS="amd64"
3) ebuild yasm-1.3.0.ebuild digest
4) emerge -va yasm

When I tried this on another machine that had python-3.6 it did not work. Exactly the same error as the first comment:

checking for /usr/bin/python3.6 version... 3.6
checking for /usr/bin/python3.6 platform... linux
checking for /usr/bin/python3.6 script directory... ${prefix}/lib64/python3.6/site-packages
checking for /usr/bin/python3.6 extension module directory... ${exec_prefix}/lib64/python3.6/site-packages
configure: Checking to see if we can build Python bindings
checking for Cython >= 0.11.3... no
checking for headers required to compile python extensions...   File "<string>", line 1
    import sys; print sys.prefix
                        ^
SyntaxError: invalid syntax
  File "<string>", line 1
    import sys; print sys.exec_prefix
                        ^
SyntaxError: invalid syntax
Comment 11 Forza 2020-06-27 14:56:12 UTC
Created attachment 646828 [details]
build-log from succesful build with python-3.7
Comment 12 Forza 2020-06-27 14:57:18 UTC
Created attachment 646830 [details]
ebuild used in successful build with python-3.7
Comment 13 Forza 2020-06-27 14:59:00 UTC
Created attachment 646832 [details]
emerge --info on machine with python-3.7

This is the emerge --info from the machine that I built yasm-1.3.0 with python-3.7.
Comment 14 Mike Gilbert gentoo-dev 2020-06-27 16:35:15 UTC
Your attempt to test python3.7 is flawed: you set USE="-python", which disables the python support entirely.

Please do not comment on this bug report unless it is to inform us that upstream has completed work on porting the software to support python3.
Comment 15 Forza 2020-06-27 17:38:46 UTC
I'm sorry. I'd missed that.
Comment 16 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-08-16 10:42:08 UTC
ping.
Comment 17 Larry the Git Cow gentoo-dev 2020-08-18 14:53:22 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0be5422b1aa70798c1856edb9b3a62ca5dda2b07

commit 0be5422b1aa70798c1856edb9b3a62ca5dda2b07
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2020-08-18 14:48:03 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2020-08-18 14:52:52 +0000

    dev-lang/yasm: drop python support
    
    Bug: https://bugs.gentoo.org/702364
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 dev-lang/yasm/yasm-1.3.0-r1.ebuild | 65 ++++++++++++++++++++++++++++++++++++++
 dev-lang/yasm/yasm-9999.ebuild     | 30 ++++++------------
 2 files changed, 74 insertions(+), 21 deletions(-)
Comment 18 Ulenrich 2020-10-27 13:13:24 UTC
seems to be resolved since 2020-08-18
"dev-lang/yasm: drop python supportdev-lang/yasm: drop python support"