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

Bogus usage of floatclock in timemodule #66814

Closed
LinkMauve mannequin opened this issue Oct 13, 2014 · 7 comments
Closed

Bogus usage of floatclock in timemodule #66814

LinkMauve mannequin opened this issue Oct 13, 2014 · 7 comments
Labels
build The build process and cross-build

Comments

@LinkMauve
Copy link
Mannequin

LinkMauve mannequin commented Oct 13, 2014

BPO 22624
Nosy @vstinner
Files
  • pyconfig.h
  • 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 2016-07-08.15:23:05.957>
    created_at = <Date 2014-10-13.18:34:55.777>
    labels = ['build']
    title = 'Bogus usage of floatclock in timemodule'
    updated_at = <Date 2016-07-08.15:55:55.755>
    user = 'https://bugs.python.org/LinkMauve'

    bugs.python.org fields:

    activity = <Date 2016-07-08.15:55:55.755>
    actor = 'python-dev'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-07-08.15:23:05.957>
    closer = 'vstinner'
    components = ['Build']
    creation = <Date 2014-10-13.18:34:55.777>
    creator = 'Link Mauve'
    dependencies = []
    files = ['36911']
    hgrepos = []
    issue_num = 22624
    keywords = []
    message_count = 7.0
    messages = ['229260', '229280', '229281', '229283', '229284', '269990', '269993']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'python-dev', 'Link Mauve']
    pr_nums = []
    priority = 'normal'
    resolution = 'wont fix'
    stage = None
    status = 'closed'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue22624'
    versions = ['Python 3.5']

    @LinkMauve
    Copy link
    Mannequin Author

    LinkMauve mannequin commented Oct 13, 2014

    In Modules/timemodule.c, py_process_time() still uses floatclock() even when HAVE_CLOCK isn’t defined.

    @LinkMauve LinkMauve mannequin added build The build process and cross-build labels Oct 13, 2014
    @vstinner
    Copy link
    Member

    What is your platform?

    time.process_time() supports many functions:

    • GetProcessTimes() (Windows only)
    • clock_gettime(CLOCK_PROF)
    • clock_gettime(CLOCK_PROCESS_CPUTIME_ID)
    • getrusage(RUSAGE_SELF)
    • times()
    • clock()

    On POSIX, clock() is always tried as a fallback. Does your platform support at least one of these functions?

    @vstinner
    Copy link
    Member

    @LinkMauve
    Copy link
    Mannequin Author

    LinkMauve mannequin commented Oct 14, 2014

    I’m building against the Newlib libc, for the Wii, and it seems the issue leading to all of those functions not working is:
    (.text.clock+0x18): undefined reference to `_times_r'

    Threading is disabled, and reentrant functions as well, which could explain that.

    But still, when pyconfig.h doesn’t define any HAVE_ macro to get the system time, I would expect py_process_time() to return None or something instead of failing to build.

    @vstinner
    Copy link
    Member

    Please attach your pyconfig.h file.

    @vstinner
    Copy link
    Member

    vstinner commented Jul 8, 2016

    Sorry but the Wii console is not supported. You have to maintain your fork/patch.

    Python 3 don't support platforms without clock().

    @vstinner vstinner closed this as completed Jul 8, 2016
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jul 8, 2016

    New changeset 1452520dfe7b by Victor Stinner in branch 'default':
    Issue bpo-22624: Python 3 requires clock() to build
    https://hg.python.org/cpython/rev/1452520dfe7b

    @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
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant