| Summary: | lang/python3*: Remove LIBFFI option for python* versions which unbundled libffi (Fails to install without LIBFFI) | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Ports & Packages | Reporter: | Marián Černý <majo-bugs.freebsd.org> | ||||
| Component: | Individual Port(s) | Assignee: | Dmitry Marakasov <amdmi3> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Some People | CC: | amdmi3, jcfyecrayz, python, wen | ||||
| Priority: | --- | Keywords: | easy | ||||
| Version: | Latest | Flags: | koobs:
maintainer-feedback+
koobs: merge-quarterly+ |
||||
| Hardware: | amd64 | ||||||
| OS: | Any | ||||||
| See Also: | https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244782 | ||||||
| Attachments: |
|
||||||
Had a couple of reports of this issue. Python unbundled libffi, necessitating depending on libffi for those versions onward. The LIBFFI option should be removed across all lang/python* ports where this is the case, as it is no longer optional Created attachment 225547 [details]
Patch
Proposed patch
Thank you Dmitry Comment on attachment 225547 [details]
Patch
Reviewed by: koobs (python)
Approved by: koobs (python)
MFH: 2020Q2 (bugfix)
Historical note: see bug 244782. The LIBFFI option should probably have been removed from python38 when the change from that bug was committed. (In reply to John Hein from comment #5) Yep. I suggest we shall commit the patch for python39 first, then ask for a exp-run for a full test of python38. (In reply to Wen Heping from comment #7) This doesn't need an exp-run, the builds fail when disabling the LIBFFI option, because its not longer bundled. The only possible successful build is with system (ports) libffi, which is what it defaults to now. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=64be746e535b0ca620460c95a819b81ac2159d01 commit 64be746e535b0ca620460c95a819b81ac2159d01 Author: Dmitry Marakasov <amdmi3@FreeBSD.org> AuthorDate: 2021-06-04 14:18:37 +0000 Commit: Dmitry Marakasov <amdmi3@FreeBSD.org> CommitDate: 2021-06-10 17:09:54 +0000 lang/python3[89]: remove LIBFFI option Python now requires libffi from ports and does not build with LIBFFI disabled, so remove the option. PR: 256141 Reported by: majo-bugs.freebsd.org@cerny.sk Reviewed by: koobs (python) Approved by: koobs (python) MFH: 2020Q2 (bugfix) lang/python38/Makefile | 19 ++++++------------- lang/python39/Makefile | 19 ++++++------------- 2 files changed, 12 insertions(+), 26 deletions(-) A commit in branch 2021Q2 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=712927d32f8c753ba4e4ff250d9b795bf7391383 commit 712927d32f8c753ba4e4ff250d9b795bf7391383 Author: Dmitry Marakasov <amdmi3@FreeBSD.org> AuthorDate: 2021-06-04 14:18:37 +0000 Commit: Dmitry Marakasov <amdmi3@FreeBSD.org> CommitDate: 2021-06-10 17:12:30 +0000 lang/python3[89]: remove LIBFFI option Python now requires libffi from ports and does not build with LIBFFI disabled, so remove the option. PR: 256141 Reported by: majo-bugs.freebsd.org@cerny.sk Reviewed by: koobs (python) Approved by: koobs (python) MFH: 2020Q2 (bugfix) (cherry picked from commit 64be746e535b0ca620460c95a819b81ac2159d01) lang/python38/Makefile | 17 +++++------------ lang/python39/Makefile | 17 +++++------------ 2 files changed, 10 insertions(+), 24 deletions(-) |
When building lang/python38 without LIBFFI option (Use libffi from ports instead of bundled version) it fails to install: ===> Installing for python38-3.8.10 ===> Checking if python38 is already installed ===> Registering installation for python38-3.8.10 pkg-static: Unable to access file /tmp/portbuild/usr/ports/lang/python38/work/stage/usr/local/lib/python3.8/lib-dynload/_ctypes.cpython-38.so:No such file or directory *** Error code 1 The error is probably a result of the previous build error (fatal error: 'ffi.h' file not found): building '_ctypes' extension cc -fPIC -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -march=sandybridge -fstack-protector-strong -fno-strict-aliasing -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -I./Include/internal -I./Include -I. -I/usr/local/include -I/tmp/portbuild/usr/ports/lang/python38/work/Python-3.8.10/Include -I/tmp/portbuild/usr/ports/lang/python38/work/Python-3.8.10 -c /tmp/portbuild/usr/ports/lang/python38/work/Python-3.8.10/Modules/_ctypes/_ctypes.c -o build/temp.freebsd-12.2-RELEASE-p6-amd64-3.8/tmp/portbuild/usr/ports/lang/python38/work/Python-3.8.10/Modules/_ctypes/_ctypes.o /tmp/portbuild/usr/ports/lang/python38/work/Python-3.8.10/Modules/_ctypes/_ctypes.c:107:10: fatal error: 'ffi.h' file not found #include <ffi.h> ^~~~~~~ 1 error generated. Python build finished successfully! I am using FreeBSD 12.2 on amd64: # uname -a FreeBSD portbuild 12.2-RELEASE-p6 FreeBSD 12.2-RELEASE-p6 GENERIC amd64