From owner-freebsd-python@freebsd.org Sun Oct 18 09:50:56 2015 Return-Path: Delivered-To: freebsd-python@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44D38A164EE for ; Sun, 18 Oct 2015 09:50:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 2938F8E5 for ; Sun, 18 Oct 2015 09:50:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 261CCA164E8; Sun, 18 Oct 2015 09:50:56 +0000 (UTC) Delivered-To: python@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BD18A164E6 for ; Sun, 18 Oct 2015 09:50:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E66B98E1 for ; Sun, 18 Oct 2015 09:50:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id t9I9otbJ038126 for ; Sun, 18 Oct 2015 09:50:55 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: python@FreeBSD.org Subject: [Bug 197757] lang/python{27,32,33}: pythonX.Y-config --ldflags missing -L/usr/local/lib for shared library path Date: Sun, 18 Oct 2015 09:50:55 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: In Progress X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: koobs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: maintainer-feedback+ X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 09:50:56 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197757 --- Comment #9 from commit-hook@freebsd.org --- A commit references this bug: Author: koobs Date: Sun Oct 18 09:50:41 UTC 2015 New revision: 399611 URL: https://svnweb.freebsd.org/changeset/ports/399611 Log: lang/python{27,32,33}: Fix missing shlib path in python-config In Python 3.4+, upstream added and switched to using a shell implementation of the python-config script [1]. The Python implementation (python-config.py) remained used by all versions < 3.4. While the shell implementation returns the path to the Python shared library when using the --ldflags script argument, the Python implementation of the script does not. The bug has been reported, but has not yet been merged [2]. The Python ports currently default to including ${LOCALBASE}/lib in LIBS when the NLS option is enabled (which it is by default). When built *with* NLS (gettext) support, the flags added to LIBS are returned in `pythonX.Y-config --ldflags` output, which happens to match the path to the Python shared library. If the NLS option is disabled, ${LOCALBASE}/lib is not added to LIBS, and are therefore not returned in --ldflags output. This results in potential linking errors for software that uses python-config to obtain the correct library path, when the NLS option is disabled: $ make WITH=PYTHON -C audio/alsa-lib [...] --- smixer-python.la --- CCLD smixer-python.la /usr/bin/ld: cannot find -lpython2.7 This change modifies the python-config.in script to match the shell implementation, outputting the library path in --ldflags output. While I'm here: for Python 3.2 and Python 3.3 ports, backport a library order change [3]. This could affect linking with static libraries. Use standard length lines and reduce diffs in pkg-message [1] https://bugs.python.org/issue16235 [2] https://bugs.python.org/issue7352 [2] https://bugs.python.org/issue18096 PR: 197757 Submitted by: jbeich MFH: 2015Q4 Changes: head/lang/python27/Makefile head/lang/python27/files/patch-Misc_python-config.in head/lang/python27/pkg-message head/lang/python32/Makefile head/lang/python32/files/patch-Misc_python-config.in head/lang/python32/pkg-message head/lang/python33/Makefile head/lang/python33/files/patch-Misc_python-config.in head/lang/python33/pkg-message -- You are receiving this mail because: You are on the CC list for the bug.