Date: Mon, 19 Oct 2015 09:22:40 +0000 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 Message-ID: <bug-197757-21822-wAwIKaX87a@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-197757-21822@https.bugs.freebsd.org/bugzilla/> References: <bug-197757-21822@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197757 --- Comment #11 from commit-hook@freebsd.org --- A commit references this bug: Author: koobs Date: Mon Oct 19 09:22:31 UTC 2015 New revision: 399653 URL: https://svnweb.freebsd.org/changeset/ports/399653 Log: MFH: r399611 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 Approved by: portmgr (erwin) Changes: _U branches/2015Q4/ branches/2015Q4/lang/python27/Makefile branches/2015Q4/lang/python27/files/patch-Misc_python-config.in branches/2015Q4/lang/python27/pkg-message branches/2015Q4/lang/python32/Makefile branches/2015Q4/lang/python32/files/patch-Misc_python-config.in branches/2015Q4/lang/python32/pkg-message branches/2015Q4/lang/python33/Makefile branches/2015Q4/lang/python33/files/patch-Misc_python-config.in branches/2015Q4/lang/python33/pkg-message -- You are receiving this mail because: You are on the CC list for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-197757-21822-wAwIKaX87a>