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

Python 3.9.0a4 fails to build when configured with --with-dtrace #83942

Closed
Dormouse759 mannequin opened this issue Feb 26, 2020 · 13 comments
Closed

Python 3.9.0a4 fails to build when configured with --with-dtrace #83942

Dormouse759 mannequin opened this issue Feb 26, 2020 · 13 comments
Labels
3.9 only security fixes build The build process and cross-build

Comments

@Dormouse759
Copy link
Mannequin

Dormouse759 mannequin commented Feb 26, 2020

BPO 39761
Nosy @jcea, @encukou, @hroncok, @Dormouse759, @dcarlier-afilias, @devnexen
PRs
  • bpo-39761: dtrace build fix for Linux and non Linux systems. #18672
  • bpo-39761: Fix dtrace build with empty $DFLAGS #18766
  • 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 2020-03-12.11:29:28.469>
    created_at = <Date 2020-02-26.16:56:28.747>
    labels = ['build', '3.9']
    title = 'Python 3.9.0a4 fails to build when configured with --with-dtrace'
    updated_at = <Date 2020-03-12.11:29:28.469>
    user = 'https://github.com/Dormouse759'

    bugs.python.org fields:

    activity = <Date 2020-03-12.11:29:28.469>
    actor = 'petr.viktorin'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-03-12.11:29:28.469>
    closer = 'petr.viktorin'
    components = ['Build']
    creation = <Date 2020-02-26.16:56:28.747>
    creator = 'Dormouse759'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 39761
    keywords = ['patch']
    message_count = 13.0
    messages = ['362700', '362701', '362703', '362704', '362712', '362720', '362721', '362723', '362733', '362735', '362737', '362739', '363915']
    nosy_count = 6.0
    nosy_names = ['jcea', 'petr.viktorin', 'hroncok', 'Dormouse759', 'David Carlier', 'devnexen']
    pr_nums = ['18672', '18766']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue39761'
    versions = ['Python 3.9']

    @Dormouse759
    Copy link
    Mannequin Author

    Dormouse759 mannequin commented Feb 26, 2020

    Steps to reproduce:

    $ wget https://www.python.org/ftp/python/3.9.0/Python-3.9.0a4.tar.xz
    $ tar xvf Python-3.9.0a4.tar.xz
    $ cd Python-3.9.0a4
    $ ./configure --with-dtrace
    $ make -j12
    /usr/bin/ld: libpython3.9.a(ceval.o): in function `_PyEval_EvalFrameDefault':
    /home/mplch/Work/fedpkg/Python-3.9.0a4/Python/ceval.c:1117: undefined reference to `python_function__entry_semaphore'
    /usr/bin/ld: /home/mplch/Work/fedpkg/Python-3.9.0a4/Python/ceval.c:1254: undefined reference to `python_line_semaphore'
    /usr/bin/ld: /home/mplch/Work/fedpkg/Python-3.9.0a4/Python/ceval.c:3697: undefined reference to `python_function__return_semaphore'
    /usr/bin/ld: /home/mplch/Work/fedpkg/Python-3.9.0a4/Python/ceval.c:1445: undefined reference to `python_line_semaphore'

    ...

    /usr/bin/ld: libpython3.9.a(gcmodule.o):(.note.stapsdt+0x70): undefined reference to `python_gc__done_semaphore'
    collect2: error: ld returned 1 exit status
    make: *** [Makefile:709: Programs/_testembed] Error 1

    Additional info:
    $ gcc --version
    gcc (GCC) 9.2.1 20190827 (Red Hat 9.2.1-1)
    Copyright (C) 2019 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    @Dormouse759 Dormouse759 mannequin added 3.9 only security fixes build The build process and cross-build labels Feb 26, 2020
    @hroncok
    Copy link
    Mannequin

    hroncok mannequin commented Feb 26, 2020

    I can reproduce this from git and will try to bisect the introducer.

    @hroncok
    Copy link
    Mannequin

    hroncok mannequin commented Feb 26, 2020

    aabdeb7 is the first new commit
    commit aabdeb7
    Author: David Carlier <dcarlier@afilias.info>
    Date: Tue Jan 28 12:53:32 2020 +0000

    bpo-38960: DTrace build fix for FreeBSD. (GH-17451)
    
    DTrace build fix for FreeBSD.
    
    - allowing passing an extra flag as it need to define the arch size.
    - casting some probe's arguments.
    

    .../next/Core and Builtins/2019-12-03-16-41-22.bpo-38960.kvoFM0.rst | 1 +
    Python/ceval.c | 6 +++---
    Python/import.c | 4 ++--
    Python/sysmodule.c | 2 +-
    configure | 3 +--
    configure.ac | 3 +--
    6 files changed, 9 insertions(+), 10 deletions(-)
    create mode 100644 Misc/NEWS.d/next/Core and Builtins/2019-12-03-16-41-22.bpo-38960.kvoFM0.rst

    @dcarlier-afilias
    Copy link
    Mannequin

    dcarlier-afilias mannequin commented Feb 26, 2020

    Sorry for the inconveniences. I can reproduce on FreeBSD too if I do not set the DFLAGS env var (because FreeBSD needs architecture bits in addition). What happens when make distclean && export DFLAGS="" && ./configure --with-dtrace ?

    @hroncok
    Copy link
    Mannequin

    hroncok mannequin commented Feb 26, 2020

    export DFLAGS="" does not seem to workaround this.

    $ make distclean && export DFLAGS="" && ./configure --with-dtrace && make
    ...
    undefined reference to `python_line_semaphore'
    ...

    @dcarlier-afilias
    Copy link
    Mannequin

    dcarlier-afilias mannequin commented Feb 26, 2020

    What about DFFLAGS=" " ?

    @hroncok
    Copy link
    Mannequin

    hroncok mannequin commented Feb 26, 2020

    Nope.

    @dcarlier-afilias
    Copy link
    Mannequin

    dcarlier-afilias mannequin commented Feb 26, 2020

    Weird I just tried on ubuntu/systemtap...

    @hroncok
    Copy link
    Mannequin

    hroncok mannequin commented Feb 26, 2020

    $ make clean && make distclean
    $ git clean -x
    $ export DFLAGS=""
    $ export DFFLAGS=""
    $ ./configure --with-dtrace && make
    ...
    undefined reference to `python_audit_semaphore'
    ...

    @dcarlier-afilias
    Copy link
    Mannequin

    dcarlier-afilias mannequin commented Feb 26, 2020

    ah sorry I meant DFLAGS=" " (with a space).

    @dcarlier-afilias
    Copy link
    Mannequin

    dcarlier-afilias mannequin commented Feb 26, 2020

    If it works for you, it might mean making a specific case for Linux systems in configure.ac as a proper fix.

    @hroncok
    Copy link
    Mannequin

    hroncok mannequin commented Feb 26, 2020

    Oh, my bad.

    DFLAGS=" "

    ^ that indeed works.

    @encukou
    Copy link
    Member

    encukou commented Mar 11, 2020

    New changeset 3c97e1e by Petr Viktorin in branch 'master':
    bpo-39761: Fix dtrace build with empty $DFLAGS (GH-18766)
    3c97e1e

    @encukou encukou closed this as completed Mar 12, 2020
    @encukou encukou closed this as completed Mar 12, 2020
    @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
    3.9 only security fixes build The build process and cross-build
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant