NetBSD Problem Report #46459

From  Thu May 17 17:10:42 2012
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id 14DA763B89C
	for <>; Thu, 17 May 2012 17:10:42 +0000 (UTC)
Message-Id: <>
Date: Thu, 17 May 2012 17:10:41 +0000 (UTC)
Subject: lang/python27: don't pass OPT to Python configure
X-Send-Pr-Version: www-1.0

>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
NetBSD build 6.0_BETA NetBSD 6.0_BETA (GENERIC) amd64
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/ 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.
Try to build an extension that has a custom version of a header already present in /usr/include or /usr/pkg/include.
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+=       --with-system-ffi
 CONFIGURE_ARGS+=       --with-dbmliborder=ndbm:bdb

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.