From owner-freebsd-python@FreeBSD.ORG Sat Jan 21 12:23:59 2012 Return-Path: Delivered-To: python@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D54E1065674; Sat, 21 Jan 2012 12:23:59 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id B8E6B8FC18; Sat, 21 Jan 2012 12:23:58 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA13763; Sat, 21 Jan 2012 14:07:20 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1RoZj5-000JOd-Ry; Sat, 21 Jan 2012 14:07:19 +0200 Message-ID: <4F1AAA75.5050500@FreeBSD.org> Date: Sat, 21 Jan 2012 14:07:17 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: python@FreeBSD.org X-Enigmail-Version: undefined Content-Type: text/plain; charset=X-VIET-VPS Content-Transfer-Encoding: 7bit Cc: freebsd-standards@FreeBSD.org, gogo@cs.uni-sb.de Subject: pyconfig.h and freebsd10: _POSIX_C_SOURCE and _XOPEN_SOURCE X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jan 2012 12:23:59 -0000 It seems that python27's pyconfig.h (artificially?) limits visibility of system APIs by setting _POSIX_C_SOURCE to 200112L and _XOPEN_SOURCE to 600. This might not actually change much for earlier FreeBSD versions. But in FreeBSD 10 we now have interfaces from POSIX 200809, specifically some things that are then used by xlocale.h. Now take an example of py-lxml port. It depends on both libxslt and python (obviously). libxslt doesn't have any limitations in POSIX interfaces that it uses, so it detects xlocale.h and uses it. xlocale.h depends on definition of locale_t in locale.h. But since locale_t has been introduced in POSIX 2008 its declaration is under __POSIX_VISIBLE >= 200809. And because of pyconfig.h, py-lxml build doesn't see locale_t and so the build fails. This is probably an issue that the upstream should also consider. Having briefly looked at python27's configure script I wonder if we should set define_xopen_source=no for FreeBSD 10 (like it has been done for FreeBSD/4.*). But in general I am not sure why python has to limit itself to those levels of interfaces (_POSIX_C_SOURCE 200112L and _XOPEN_SOURCE 600). Thoughts, ideas, suggestions? Thank you! -- Andriy Gapon