Date: Thu, 1 Mar 2018 13:47:10 +0000 (UTC) From: Kubilay Kocak <koobs@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r463321 - head/lang/python27 Message-ID: <201803011347.w21DlBer076921@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: koobs Date: Thu Mar 1 13:47:10 2018 New Revision: 463321 URL: https://svnweb.freebsd.org/changeset/ports/463321 Log: lang/python27: Fix build regression r462630 added OpenSSL include/library paths to CFLAGS/LIBS which caused the _elementtree and pyexpat modules to fail to build. Adding paths to CFLAGS is known to cause issues [1]. Accordingly: - Switch to using CPPFLAGS for OpenSSL include/library paths (like NLS). - Move the comment describing why this is necessary to the top of the port with reasonable warning about what can happen and why. [1] https://svnweb.freebsd.org/ports?view=revision&revision=326729 PR: 226135, 222795) Reported by: many Reviewed by: sunpoet (python) Approved by: koobs (python) Modified: head/lang/python27/Makefile Modified: head/lang/python27/Makefile ============================================================================== --- head/lang/python27/Makefile Thu Mar 1 13:36:09 2018 (r463320) +++ head/lang/python27/Makefile Thu Mar 1 13:47:10 2018 (r463321) @@ -14,12 +14,21 @@ COMMENT= Interpreted object-oriented programming langu LICENSE= PSFL +# lang/python* ports use CPPFLAGS over CFLAGS due to multiple complex +# *FLAGS and include ordering bugs/issues in the Python build, that cause +# modules such as elementtree and pyexpat to fail to build, among other +# difficult to isolate issues. Do not add to or modify global variables +# unless the implications and pitfalls are completely understood. +# See: https://bugs.python.org/issue6299#msg210189 + USES= cpe ncurses pathfix pkgconfig readline:port shebangfix ssl tar:xz PATHFIX_MAKEFILEIN= Makefile.pre.in USE_LDCONFIG= yes -CFLAGS+= -I${OPENSSLINC} GNU_CONFIGURE= yes -LIBS+= -L${OPENSSLLIB} + +CPPFLAGS+= -I${OPENSSLINC} +LDFLAGS+= -L${OPENSSLLIB} + python_CMD= ${PREFIX}/bin/python${PYTHON_PORTVERSION:R} SHEBANG_FILES= Lib/lib2to3/pgen2/*.py Lib/lib2to3/tests/*.py Lib/lib2to3/tests/data/*.py \ Lib/idlelib/*.py Lib/encodings/*.py Lib/test/*.py Lib/UserString.py \ @@ -60,9 +69,6 @@ IPV6_CONFIGURE_ENABLE= ipv6 LIBFFI_CONFIGURE_ON= --with-system-ffi LIBFFI_LIB_DEPENDS= libffi.so:devel/libffi -# Use CPPFLAGS over CFLAGS due to -I ordering, causing elementtree and pyexpat -# to break in Python 2.7, or preprocessor complaints in Python >= 3.3 -# Upstream Issue: https://bugs.python.org/issue6299 NLS_USES= gettext NLS_CPPFLAGS= -I${LOCALBASE}/include NLS_LIBS= -L${LOCALBASE}/lib -lintl
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803011347.w21DlBer076921>