Bug 203093 - lang/python35: PORTVERSION causes PYTHON_REL to contain non integer values, causing make errors
Summary: lang/python35: PORTVERSION causes PYTHON_REL to contain non integer values, c...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kubilay Kocak
URL:
Keywords: easy, needs-qa
Depends on:
Blocks:
 
Reported: 2015-09-14 03:53 UTC by Andrew Berg
Modified: 2015-09-29 03:33 UTC (History)
4 users (show)

See Also:
koobs: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Berg 2015-09-14 03:53:40 UTC
In a Poudriere run with DEFAULT_VERSIONS=python=3.5, Poudriere is unable to calculate dependencies for ports that use Python, apparently because of syntax errors in Mk/Uses/python.mk. Some ports fail for another reason: there is no setuptools35.

[00:00:00] ====>> Creating the reference jail... done
[00:00:00] ====>> Mounting system devices for 102x64-default
[00:00:00] ====>> Mounting ports/packages/distfiles
[00:00:00] ====>> Using packages from previously failed build
[00:00:00] ====>> Mounting ccache from: /var/cache/ccache
[00:00:00] ====>> Mounting packages from: /usr/local/poudriere/data/packages/102x64-default
[00:00:00] ====>> Copying /var/db/ports from: /usr/local/etc/poudriere.d/102x64-options
[00:00:00] ====>> Appending to make.conf: /usr/local/etc/poudriere.d/102x64-make.conf
/etc/resolv.conf -> /usr/local/poudriere/data/.m/102x64-default/ref/etc/resolv.conf
[00:00:00] ====>> Starting jail 102x64-default
[00:00:00] ====>> Logs: /usr/local/poudriere/data/logs/bulk/102x64-default/2015.09.13_18:51:01
[00:00:00] ====>> WWW: https://candace.robotsondrugs.com/poudriere/build.html?mastername=102x64-default&build=2015.09.13_18:51:01
[00:00:00] ====>> Loading MOVED
[00:00:01] ====>> Calculating ports order and dependencies
make: "/usr/ports/Mk/Uses/python.mk" line 503: warning: String comparison operator should be either == or !=
make: "/usr/ports/Mk/Uses/python.mk" line 503: Malformed conditional (${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST))
make: Fatal errors encountered -- cannot continue/usr/local/share/poudriere/bulk.sh: cannot create /usr/local/poudriere/data/.m/102x64-default/ref/.p/var/cache/pkgname-origin/
make: stopped in /usr/ports/devel/git: No such file or directory
make: "/usr/ports/Mk/Uses/python.mk" line 503: warning: String comparison operator should be either == or !=
make: "/usr/ports/Mk/Uses/python.mk" line 503: Malformed conditional (${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST))
make: Fatal errors encountered -- cannot continue/usr/local/share/poudriere/bulk.sh: cannot create /usr/local/poudriere/data/.m/102x64-default/ref/.p/var/cache/pkgname-origin/
make: stopped in /usr/ports/devel/glib20: No such file or directory
/usr/local/share/poudriere/bulk.sh: cannot create /usr/local/poudriere/data/.m/102x64-default/ref/.p/deps/librsvg2-2.40.10/
make: stopped in /usr/ports/devel/glib20: No such file or directory
make: "/usr/ports/Mk/Uses/python.mk" line 503: warning: String comparison operator should be either == or !=
make: "/usr/ports/Mk/Uses/python.mk" line 503: Malformed conditional (${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST))
make: Fatal errors encountered -- cannot continue/usr/local/share/poudriere/bulk.sh: cannot create /usr/local/poudriere/data/.m/102x64-default/ref/.p/var/cache/pkgname-origin/
make: stopped in /usr/ports/devel/glib20: No such file or directory
/usr/local/share/poudriere/bulk.sh: cannot create /usr/local/poudriere/data/.m/102x64-default/ref/.p/deps/irssi-0.8.17_1/
make: stopped in /usr/ports/devel/glib20: No such file or directory
make: "/usr/ports/Mk/Uses/python.mk" line 503: warning: String comparison operator should be either == or !=
make: "/usr/ports/Mk/Uses/python.mk" line 503: Malformed conditional (${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST))
make: Fatal errors encountered -- cannot continue/usr/local/share/poudriere/bulk.sh: cannot create /usr/local/poudriere/data/.m/102x64-default/ref/.p/var/cache/pkgname-origin/
make: stopped in /usr/ports/lang/clang35: No such file or directory
make: "/usr/ports/devel/py-Jinja2/Makefile" line 61: warning: String comparison operator should be either == or !=
make: "/usr/ports/devel/py-Jinja2/Makefile" line 61: Malformed conditional (${PYTHON_REL} >= 3000)
make: Fatal errors encountered -- cannot continue/usr/local/share/poudriere/bulk.sh: cannot create /usr/local/poudriere/data/.m/102x64-default/ref/.p/var/cache/pkgname-origin/
make: stopped in /usr/ports/devel/py-Jinja2: No such file or directory
/usr/local/share/poudriere/bulk.sh: cannot create /usr/local/poudriere/data/.m/102x64-default/ref/.p/deps/py35-sphinx-1.3.1_2/
make: stopped in /usr/ports/devel/py-Jinja2: No such file or directory
make: "/usr/ports/Mk/Uses/python.mk" line 503: warning: String comparison operator should be either == or !=
make: "/usr/ports/Mk/Uses/python.mk" line 503: Malformed conditional (${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST))
make: Fatal errors encountered -- cannot continue/usr/local/share/poudriere/bulk.sh: cannot create /usr/local/poudriere/data/.m/102x64-default/ref/.p/var/cache/pkgname-origin/
make: stopped in /usr/ports/x11/libxcb: No such file or directory
/usr/local/share/poudriere/bulk.sh: cannot create /usr/local/poudriere/data/.m/102x64-default/ref/.p/deps/libX11-1.6.2_3,1/
make: stopped in /usr/ports/x11/libxcb: No such file or directory                                                                                                                                                                                                        [78/1953]make: "/usr/ports/Mk/Uses/python.mk" line 503: warning: String comparison operator should be either == or !=
make: "/usr/ports/Mk/Uses/python.mk" line 503: Malformed conditional (${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST))
make: Fatal errors encountered -- cannot continue/usr/local/share/poudriere/bulk.sh: cannot create /usr/local/poudriere/data/.m/102x64-default/ref/.p/var/cache/pkgname-origin/
make: stopped in /usr/ports/lang/python3: No such file or directory
/usr/local/share/poudriere/bulk.sh: cannot create /usr/local/poudriere/data/.m/102x64-default/ref/.p/deps/mplayer2-2.0.20130428_16/
make: stopped in /usr/ports/lang/python3: No such file or directory
make: "/usr/ports/Mk/Uses/python.mk" line 503: warning: String comparison operator should be either == or !=
make: "/usr/ports/Mk/Uses/python.mk" line 503: Malformed conditional (${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST))
make: Fatal errors encountered -- cannot continue/usr/local/share/poudriere/bulk.sh: cannot create /usr/local/poudriere/data/.m/102x64-default/ref/.p/var/cache/pkgname-origin/
make: stopped in /usr/ports/devel/glib20: No such file or directory
/usr/local/share/poudriere/bulk.sh: cannot create /usr/local/poudriere/data/.m/102x64-default/ref/.p/deps/jnettop-0.13.0/
make: stopped in /usr/ports/devel/glib20: No such file or directory
make: "/usr/ports/Mk/Uses/python.mk" line 503: warning: String comparison operator should be either == or !=
make: "/usr/ports/Mk/Uses/python.mk" line 503: Malformed conditional (${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST))
make: Fatal errors encountered -- cannot continue/usr/local/share/poudriere/bulk.sh: cannot create /usr/local/poudriere/data/.m/102x64-default/ref/.p/var/cache/pkgname-origin/
make: stopped in /usr/ports/devel/glib20: No such file or directory
/usr/local/share/poudriere/bulk.sh: cannot create /usr/local/poudriere/data/.m/102x64-default/ref/.p/deps/rrdtool-1.4.8_9/
make: stopped in /usr/ports/devel/glib20: No such file or directory
make: "/usr/ports/Mk/Uses/python.mk" line 503: warning: String comparison operator should be either == or !=
make: "/usr/ports/Mk/Uses/python.mk" line 503: Malformed conditional (${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST))
make: Fatal errors encountered -- cannot continue/usr/local/share/poudriere/bulk.sh: cannot create /usr/local/poudriere/data/.m/102x64-default/ref/.p/var/cache/pkgname-origin/
make: stopped in /usr/ports/x11/libxcb: No such file or directory
/usr/local/share/poudriere/bulk.sh: cannot create /usr/local/poudriere/data/.m/102x64-default/ref/.p/deps/libglapi-10.4.6/
make: stopped in /usr/ports/x11/libxcb: No such file or directory
make: "/usr/ports/Mk/Uses/python.mk" line 503: warning: String comparison operator should be either == or !=
make: "/usr/ports/Mk/Uses/python.mk" line 503: Malformed conditional (${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST))
make: Fatal errors encountered -- cannot continue/usr/local/share/poudriere/bulk.sh: cannot create /usr/local/poudriere/data/.m/102x64-default/ref/.p/var/cache/pkgname-origin/
make: stopped in /usr/ports/devel/glib20: No such file or directory
/usr/local/share/poudriere/bulk.sh: cannot create /usr/local/poudriere/data/.m/102x64-default/ref/.p/deps/goaccess-0.8.5/
make: stopped in /usr/ports/devel/glib20: No such file or directory
[00:00:05] ====>> Error: textproc/py-sphinx_rtd_theme depends on nonexistent origin 'devel/py-setuptools35'; Please contact maintainer of the port to fix this.
[00:00:05] ====>> Error: www/httpie depends on nonexistent origin 'devel/py-setuptools35'; Please contact maintainer of the port to fix this.
[00:00:05] ====>> Error: www/py-beautifulsoup depends on nonexistent origin 'devel/py-setuptools35'; Please contact maintainer of the port to fix this.
[00:00:06] ====>> Error: devel/py-lxml depends on nonexistent origin 'devel/py-setuptools35'; Please contact maintainer of the port to fix this.
make: "/usr/ports/Mk/Uses/python.mk" line 503: warning: String comparison operator should be either == or !=
make: "/usr/ports/Mk/Uses/python.mk" line 503: Malformed conditional (${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST))
make: Fatal errors encountered -- cannot continue/usr/local/share/poudriere/bulk.sh: cannot create /usr/local/poudriere/data/.m/102x64-default/ref/.p/var/cache/pkgname-origin/
make: stopped in /usr/ports/devel/glib20: No such file or directory
/usr/local/share/poudriere/bulk.sh: cannot create /usr/local/poudriere/data/.m/102x64-default/ref/.p/deps/liblqr-1-0.4.1_8/
make: stopped in /usr/ports/devel/glib20: No such file or directory
[00:00:09] ====>> Error: Fatal errors encountered calculating dependencies
[00:00:09] ====>> Cleaning up
[00:00:09] ====>> Umounting file systems
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2015-09-14 04:40:45 UTC
It appears PYTHON_REL assignment in python.mk doesn't like/support PORTVERSION's that have non integer suffixes like the new python35 port (PORTVERSION currently 3.5.0.r3)
 
This results in a PYTHON_REL value that contains non integer characters, causing the errors.

I'm testing a fix at the moment
Comment 2 commit-hook freebsd_committer 2015-09-14 08:29:04 UTC
A commit references this bug:

Author: koobs
Date: Mon Sep 14 08:28:58 UTC 2015
New revision: 396885
URL: https://svnweb.freebsd.org/changeset/ports/396885

Log:
  Uses/python.mk: Fix PYTHON_REL for pre-release Python versions

  Modify the PYTHON_REL variable assignment in python.mk so that it
  can support PORTVERSION's that have non-integer suffixes such as
  the current lang/python35 version (PORTVERSION currently 3.5.0.r3).

  Currently, ports that use PYTHON_REL while DEFAULT_VERSIONS is set to
  3.5, fail to build with the following make error:

  make: "/usr/ports/Mk/Uses/python.mk" line 503:
  warning: String comparison operator should be either == or !=
  make: "/usr/ports/Mk/Uses/python.mk" line 503:
  Malformed conditional (${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST))

  This is caused by a non-integer value ("r3") in PYTHON_REL.

  While I'm here, add a comment block to be clear on what we
  (currently) want to achieve.

  PR:			203093
  Reported by:		Andrew Berg (aberg010 my.hennepintech.edu)
  Reviewed by:		antoine
  MFH:			2015Q3
  Differential Revision:	https://reviews.freebsd.org/D3662

Changes:
  head/Mk/Uses/python.mk
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2015-09-14 09:02:58 UTC
Committed, thank you for the report Andrew.

Note: There is an outstanding issue related to Python ports that utilise USE_PYTHON=py3kplist (including glib20) and the Python 3.5 port, which causes pkg-plist(pkg-static) errors about missing files.
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2015-09-14 12:33:01 UTC
The issue outlined in comment #3 has been resolved, thank you antoine!

Author: antoine
Date: Mon Sep 14 12:26:28 2015
New Revision: 396897
URL: https://svnweb.freebsd.org/changeset/ports/396897

Log:
  Since PEP 0488 and python 3.5, pyo files are eliminated and bytecode files
  for level 1 optimization have opt-1.pyc extension
  Adjust USE_PYTHON=py3kplist to handle this
Comment 5 commit-hook freebsd_committer 2015-09-29 03:33:14 UTC
A commit references this bug:

Author: koobs
Date: Tue Sep 29 03:32:27 UTC 2015
New revision: 398153
URL: https://svnweb.freebsd.org/changeset/ports/398153

Log:
  MFH: r396885

  Uses/python.mk: Fix PYTHON_REL for pre-release Python versions

  Modify the PYTHON_REL variable assignment in python.mk so that it
  can support PORTVERSION's that have non-integer suffixes such as
  the current lang/python35 version (PORTVERSION currently 3.5.0.r3).

  Currently, ports that use PYTHON_REL while DEFAULT_VERSIONS is set to
  3.5, fail to build with the following make error:

  make: "/usr/ports/Mk/Uses/python.mk" line 503:
  warning: String comparison operator should be either == or !=
  make: "/usr/ports/Mk/Uses/python.mk" line 503:
  Malformed conditional (${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST))

  This is caused by a non-integer value ("r3") in PYTHON_REL.

  While I'm here, add a comment block to be clear on what we
  (currently) want to achieve.

  PR:			203093
  Reported by:		Andrew Berg (aberg010 my.hennepintech.edu)
  Reviewed by:		antoine
  Differential Revision:	https://reviews.freebsd.org/D3662

  Approved by:	portmgr (feld)

Changes:
_U  branches/2015Q3/
  branches/2015Q3/Mk/Uses/python.mk