Summary: | www/node 14.4.0 does not build in poudriere with FreeBSD 11.4 | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Miroslav Lachman <000.fbsd> |
Component: | Individual Port(s) | Assignee: | Bradley T. Hughes <bhughes> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | james, johan |
Priority: | --- | Flags: | bhughes:
maintainer-feedback+
|
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any | ||
Attachments: |
Description
Miroslav Lachman
2020-07-22 08:13:09 UTC
Created attachment 216652 [details]
poudriere build log failure
Probably caused by setting default version of Python to 2.7 which causes shebeng line /usr/local/bin/python27 in tools/genv8constants.py but the code in it is not compatible with Python 2.7. This should be markerd as "BROKEN with Python 2.7" or something like this. Building with Python 3.7 right now... I have a similar problem, but with DEFAULT_VERSIONS=python=3.6. The change introduced in https://svnweb.freebsd.org/ports?view=revision&revision=535334 only specifies python, but the patch introduces the 'text' argument to subprocess.Popen, which is only available from python 3.7: "Changed in version 3.7: Added the text parameter, as a more understandable alias of universal_newlines. Added the capture_output parameter." As 'text' is an alias to 'universal_newlines', a simple (tested & working) change is to just use that instead, to make it compatible with 3.6 as well. Created attachment 217379 [details]
Patch against 14.6.0 (Main) & 14.4.0 (Quarterly)
Can you please test the attached patch.
The issue is caused by a patch shipped with the port, I've moved it to EXTRA_PATCHES if the python version is 3.7 or higher.
This is against 14.6.0, but it should also apply cleanly against 14.4.0. If it works, It will need to be applied against both the quarterly & main ports trees as both are affected by this issue.
Build logs to follow.
Created attachment 217380 [details]
Poudriere Build Log 14.6.0 & Python 3.7
Created attachment 217385 [details] Patch against 14.6.0 (Main branch) & 14.4.0 (Quarterly) My previous patch just re-uncovered the build issue with Python 3 that the included patch was trying to fix in the first place. Johan hit the nail on the head in Comment 3, the attached patch addresses things all the way back to Python 2.7. I was a bit reluctant to apply the patch if it wasn't needed, but apparently it is for all but Python 2. Poudriere build log for Python 3.7 @ 14.6.0 to follow, but I have had successful runs against Python 2.7, Python 3.6 and the various combinations thereof with 14.4.0 Created attachment 217388 [details]
Poudriere Build Log 14.4.0, Python 3.6
Created attachment 217389 [details]
Poudriere Build Log 14.6.0, Python 3.7
A commit references this bug: Author: bhughes Date: Thu Aug 20 21:27:51 UTC 2020 New revision: 545565 URL: https://svnweb.freebsd.org/changeset/ports/545565 Log: www/node: build with python < 3.7 r535334 introduced a patch for tools/genv8constants.py that only worked with Python >= 3.7. The "text" argument added to Python's subprocess.Popen() is an alias for "universal_newlines", which works on all versions of Python, including 2.7. PR: 248167 Submitted by: James French <james@french.id.au> Reported by: Miroslav Lachman <000.fbsd@quip.cz> MFH: 2020Q3 Sponsored by: Miles AS Changes: head/www/node/files/patch-tools_genv8constants.py A commit references this bug: Author: bhughes Date: Thu Aug 20 21:37:05 UTC 2020 New revision: 545566 URL: https://svnweb.freebsd.org/changeset/ports/545566 Log: MFH: r545565 www/node: build with python < 3.7 r535334 introduced a patch for tools/genv8constants.py that only worked with Python >= 3.7. The "text" argument added to Python's subprocess.Popen() is an alias for "universal_newlines", which works on all versions of Python, including 2.7. PR: 248167 Submitted by: James French <james@french.id.au> Reported by: Miroslav Lachman <000.fbsd@quip.cz> Sponsored by: Miles AS Approved by: ports-secteam (joneum) Changes: _U branches/2020Q3/ branches/2020Q3/www/node/files/patch-tools_genv8constants.py Committed to head and quarterly, thanks for the patch! :) |