Issue 18096: bad library order returned by python-config.in (original) (raw)

Issue18096

Created on 2013-05-29 16:45 by taylor, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
xx taylor,2013-05-29 16:45 Patch (unified diff format) of Misc/python-config.in against 3.3.1
fix-undef-ref.patch logan,2014-10-01 19:21 Revised patch file for python-config. review
Messages (4)
msg190319 - (view) Author: David Taylor (taylor) Date: 2013-05-29 16:45
Misc/python-config.in returns a bad library order when given the --ldflags or --libs arguments. A library should be listed *BEFORE* those libraries that it depends upon. The python library depends upon all the other libraries listed, but it is listed last -- it should be first. When linking with shared libraries, you can generally get away with the current behaviour. When linking with static libraries, it fails
msg228107 - (view) Author: logan (logan) * Date: 2014-10-01 19:21
It seems that this is still reproducible with Python 3.5 (dev) by running: $ gcc test.c `python3-config --includes --ldflags` cpython-install/lib/python3.5/config-3.5m/libpython3.5m.a(pytime.o): In function `_PyTime_ObjectToTime_t': cpython-build/../cpython/Python/pytime.c:371: undefined reference to `ceil' cpython-build/../cpython/Python/pytime.c:373: undefined reference to `floor' ... skipped ... I have slightly revised the patch to include Misc/python-config.sh.in as well. Please have a look. Thanks.
msg228141 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-10-02 00:03
New changeset 6316475af62d by doko in branch '2.7': - Issue #18096: Fix library order returned by python-config. https://hg.python.org/cpython/rev/6316475af62d New changeset b826ba76d1ce by doko in branch '3.4': - Issue #18096: Fix library order returned by python-config. https://hg.python.org/cpython/rev/b826ba76d1ce New changeset 8db7fcf6c67d by doko in branch 'default': - Issue #18096: Fix library order returned by python-config. https://hg.python.org/cpython/rev/8db7fcf6c67d
msg228221 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2014-10-02 11:50
fixed in 2.7, 3.4 and 3.5
History
Date User Action Args
2022-04-11 14:57:46 admin set github: 62296
2014-10-02 11:50:01 doko set status: open -> closedresolution: fixedmessages: + versions: + Python 2.7, - Python 3.3
2014-10-02 00:03:15 python-dev set nosy: + python-devmessages: +
2014-10-01 19:21:43 logan set files: + fix-undef-ref.patchversions: + Python 3.5nosy: + loganmessages: + keywords: + patch
2013-10-14 19:06:00 pitrou set nosy: + doko, dmalcolmstage: patch reviewcomponents: + Build, Demos and Toolsversions: + Python 3.4
2013-10-14 14:26:09 georg.brandl set nosy: + barry, ned.deily
2013-05-29 16:45:24 taylor create