Bug 223357 - sysutils/uefi-edk2-bhyve: build failure on python 3
Summary: sysutils/uefi-edk2-bhyve: build failure on python 3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Roman Bogorodskiy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-01 03:11 UTC by Charlie Li
Modified: 2017-11-06 16:03 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (fabian.freyer)


Attachments
patch to explicitly set python2 in USES (424 bytes, patch)
2017-11-01 03:11 UTC, Charlie Li
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Charlie Li freebsd_committer freebsd_triage 2017-11-01 03:11:42 UTC
Created attachment 187637 [details]
patch to explicitly set python2 in USES

On systems where DEFAULT_VERSIONS includes a python set to any version in the 3.x series, the build fails in the build-depends phase. This stems from the databases/py-sqlite3 dependency that explicitly builds (currently) for python2. This patch explicitly specifies python2 as a build dependency for those systems with a python3 DEFAULT_VERSIONS.
Comment 1 Charlie Li freebsd_committer freebsd_triage 2017-11-01 08:52:50 UTC
Additionally, this port actually fails to build when DEFAULT_VERSIONS contains python=3.x. Relevant snippet from build log:

gmake -C Tests
gmake[2]: Entering directory '/wrkdirs/usr/ports/sysutils/uefi-edk2-bhyve/work/uefi-edk2-a36132939e259df79b16699c03c6f1d63c7454b9/BaseTools/Tests'
Traceback (most recent call last):
  File "RunTests.py", line 22, in <module>
    import TestTools
  File "/wrkdirs/usr/ports/sysutils/uefi-edk2-bhyve/work/uefi-edk2-a36132939e259df79b16699c03c6f1d63c7454b9/BaseTools/Tests/TestTools.py", line 87
    print description, '(base64 encoded):'
                    ^
SyntaxError: invalid syntax
gmake[2]: *** [GNUmakefile:17: test] Error 1
gmake[2]: Leaving directory '/wrkdirs/usr/ports/sysutils/uefi-edk2-bhyve/work/uefi-edk2-a36132939e259df79b16699c03c6f1d63c7454b9/BaseTools/Tests'
gmake[1]: *** [GNUmakefile:25: Tests] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/sysutils/uefi-edk2-bhyve/work/uefi-edk2-a36132939e259df79b16699c03c6f1d63c7454b9/BaseTools'
*** Error code 2

Stop.
make: stopped in /usr/ports/sysutils/uefi-edk2-bhyve

I would patch this file, but there is no telling where else in the source tree contains python2-isms.
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-11-06 15:29:10 UTC
A commit references this bug:

Author: novel
Date: Mon Nov  6 15:28:52 UTC 2017
New revision: 453624
URL: https://svnweb.freebsd.org/changeset/ports/453624

Log:
  sysutils/uefi-edk2-bhyve: stick to python2.7

  Restrict python dependency to 2.7 as it fails to build with 3.x

  PR:		223357
  Submitted by:	Charlie Li
  Approved by:	just-fix-it-blanket

Changes:
  head/sysutils/uefi-edk2-bhyve/Makefile
Comment 3 Roman Bogorodskiy freebsd_committer freebsd_triage 2017-11-06 16:03:24 UTC
Committed, thanks!