Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad library order returned by python-config.in #62296

Closed
taylor mannequin opened this issue May 29, 2013 · 4 comments
Closed

bad library order returned by python-config.in #62296

taylor mannequin opened this issue May 29, 2013 · 4 comments
Labels
build The build process and cross-build stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@taylor
Copy link
Mannequin

taylor mannequin commented May 29, 2013

BPO 18096
Nosy @warsaw, @doko42, @ned-deily, @davidmalcolm
Files
  • xx: Patch (unified diff format) of Misc/python-config.in against 3.3.1
  • fix-undef-ref.patch: Revised patch file for python-config.
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2014-10-02.11:50:01.069>
    created_at = <Date 2013-05-29.16:45:24.129>
    labels = ['type-bug', 'library', 'build']
    title = 'bad library order returned by python-config.in'
    updated_at = <Date 2014-10-02.11:50:01.067>
    user = 'https://bugs.python.org/taylor'

    bugs.python.org fields:

    activity = <Date 2014-10-02.11:50:01.067>
    actor = 'doko'
    assignee = 'none'
    closed = True
    closed_date = <Date 2014-10-02.11:50:01.069>
    closer = 'doko'
    components = ['Build', 'Demos and Tools', 'Library (Lib)']
    creation = <Date 2013-05-29.16:45:24.129>
    creator = 'taylor'
    dependencies = []
    files = ['30414', '36767']
    hgrepos = []
    issue_num = 18096
    keywords = ['patch']
    message_count = 4.0
    messages = ['190319', '228107', '228141', '228221']
    nosy_count = 7.0
    nosy_names = ['barry', 'doko', 'ned.deily', 'dmalcolm', 'python-dev', 'taylor', 'logan']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'patch review'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue18096'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5']

    @taylor
    Copy link
    Mannequin Author

    taylor mannequin commented May 29, 2013

    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

    @taylor taylor mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels May 29, 2013
    @pitrou pitrou added the build The build process and cross-build label Oct 14, 2013
    @logan
    Copy link
    Mannequin

    logan mannequin commented Oct 1, 2014

    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.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Oct 2, 2014

    New changeset 6316475af62d by doko in branch '2.7':

    New changeset b826ba76d1ce by doko in branch '3.4':

    New changeset 8db7fcf6c67d by doko in branch 'default':

    @doko42
    Copy link
    Member

    doko42 commented Oct 2, 2014

    fixed in 2.7, 3.4 and 3.5

    @doko42 doko42 closed this as completed Oct 2, 2014
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    build The build process and cross-build stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants