pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/46459: lang/python27: don't pass OPT to Python configure



>Number:         46459
>Category:       pkg
>Synopsis:       lang/python27: don't pass OPT to Python configure
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 17 17:15:00 +0000 2012
>Originator:     Roger Pau Monne
>Release:        amd64 6.0BETA
>Organization:
Citrix
>Environment:
NetBSD build 6.0_BETA NetBSD 6.0_BETA (GENERIC) amd64
>Description:
pkgsrc is passing "OPT" to Python27 configure script, which is saved in 
/usr/pkg/lib/python2.7/config/Makefile after the package compilation finishes.

This file is then parsed by distutils when building extensions (see 
/usr/pkg/lib/python2.7/sysconfig.py:283). The main problem with this variables 
is that it gets appended to gcc CFLAGS before the ones that the user sets 
manually. Since OPT contained -I/usr/include and -I/usr/pkg/include, if the 
user wanted to use custom headers already present in /usr/include or 
/usr/pkg/include instead of the system ones it would get a compilation error, 
because system headers were always read before user supplied ones.
>How-To-Repeat:
Try to build an extension that has a custom version of a header already present 
in /usr/include or /usr/pkg/include.
>Fix:
The following patch removes this option. I've checked that the package compiles 
fine (under NetBSD 6.0BETA), and extensions also build ok when this is removed.

diff --git a/lang/python27/Makefile b/lang/python27/Makefile
index d5e7116..5e0bdc6 100644
--- a/lang/python27/Makefile
+++ b/lang/python27/Makefile
@@ -17,7 +17,6 @@ CONFLICTS+=   python-[0-9]*
 GNU_CONFIGURE=         yes
 CONFIGURE_ARGS+=       --with-threads
 CONFIGURE_ARGS+=       --enable-shared
-CONFIGURE_ARGS+=       OPT=${CFLAGS:Q}
 CONFIGURE_ARGS+=       --with-system-ffi
 CONFIGURE_ARGS+=       --with-dbmliborder=ndbm:bdb



Home | Main Index | Thread Index | Old Index