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

selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c #78600

Closed
michael-o mannequin opened this issue Aug 17, 2018 · 5 comments
Closed

selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c #78600

michael-o mannequin opened this issue Aug 17, 2018 · 5 comments
Labels
3.8 only security fixes build The build process and cross-build easy stdlib Python modules in the Lib dir

Comments

@michael-o
Copy link
Mannequin

michael-o mannequin commented Aug 17, 2018

BPO 34419
Nosy @taleinat, @michael-o
PRs
  • bpo-34419: selectmodule.c does not compile on HP-UX due to bpo-31938 #8796
  • 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 2018-08-17.11:45:01.727>
    created_at = <Date 2018-08-17.09:28:09.872>
    labels = ['easy', '3.8', 'build', 'library']
    title = 'selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c'
    updated_at = <Date 2018-08-17.12:01:36.817>
    user = 'https://github.com/michael-o'

    bugs.python.org fields:

    activity = <Date 2018-08-17.12:01:36.817>
    actor = 'michael-o'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-08-17.11:45:01.727>
    closer = 'taleinat'
    components = ['Build', 'Library (Lib)']
    creation = <Date 2018-08-17.09:28:09.872>
    creator = 'michael-o'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 34419
    keywords = ['patch', 'easy (C)']
    message_count = 5.0
    messages = ['323640', '323642', '323650', '323652', '323653']
    nosy_count = 2.0
    nosy_names = ['taleinat', 'michael-o']
    pr_nums = ['8796']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue34419'
    versions = ['Python 3.8']

    @michael-o
    Copy link
    Mannequin Author

    michael-o mannequin commented Aug 17, 2018

    It seems like an oversight of the author, though it is not clear why this happily compiles with clang 3.4.1 on FreeBSD 10.4-STABLE and GCC on RHEL6.

    The error is (HP-UX 11.31 and HP C/aC++ B3910B A.06.28.03 [Dec 13 2016]):

    /opt/aCC/bin/cc -Ae +z -O -I./Include -I. -I/usr/local/include -I/var/osipovmi/cpython/Include -I/var/osipovmi/cpython -c /var/osipovmi/cpython/Modules/selectmodule.c -o build/temp.hp-ux-B.11.31-ia64-3.8-pydebug/var/osipovmi/cpython/Modules/selectmodule.o
    "/var/osipovmi/cpython/Modules/selectmodule.c", line 412: warning bpo-4232-D:
    conversion from "PyObject *" to a more strictly aligned type
    "PyDictObject *" may cause misaligned access
    self->ufd_len = PyDict_GET_SIZE(self->dict);
    ^

    "/var/osipovmi/cpython/Modules/selectmodule.c", line 849: error bpo-2130:
    expected a "{"
    static PyObject *
    ^

    "/var/osipovmi/cpython/Modules/selectmodule.c", line 898: error bpo-2101:
    "timeout_obj" has already been declared in the current scope
    PyObject *result_list = NULL, *timeout_obj = NULL;
    ^

    2 errors detected in the compilation of "/var/osipovmi/cpython/Modules/selectmodule.c".

    caused by:

    +static PyObject *
    +select_devpoll_modify_impl(devpollObject *self, int fd,

    •                       unsigned short eventmask)
      

    +/[clinic end generated code: output=bc2e6d23aaff98b4 input=f0d7de3889cc55fb]/
    static PyObject *
    devpoll_modify(devpollObject *self, PyObject *args)
    {

    • return internal_devpoll_register(self, args, 1);
    • return internal_devpoll_register(self, fd, eventmask, 1);
      }

    Signature change, but prototype has not been changed.

    static PyObject *
    -poll_poll(pollObject *self, PyObject *args)
    +select_poll_poll_impl(pollObject *self, PyObject *timeout_obj)
    +/[clinic end generated code: output=876e837d193ed7e4 input=7a446ed45189e894]/
    {

    • PyObject *result_list = NULL, *timeout_obj = NULL;
    • PyObject *result_list = NULL;
      int poll_result, i, j;
      PyObject *value = NULL, *num = NULL;
      _PyTime_t timeout = -1, ms = -1, deadline = 0;
      int async_err = 0;
    • if (!PyArg_ParseTuple(args, "|O:poll", &timeout_obj)) {
    •    return NULL;
      
    • }
    • if (timeout_obj != NULL && timeout_obj != Py_None) {
    • if (timeout_obj != Py_None) {

    timeout_obj has been added to the function signature, but the internal NULL assignment has not been removed.

    @michael-o michael-o mannequin added 3.8 only security fixes build The build process and cross-build stdlib Python modules in the Lib dir labels Aug 17, 2018
    @michael-o michael-o mannequin changed the title selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c5beb99e8bf5eb04cc836d53fa9aee selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c Aug 17, 2018
    @michael-o
    Copy link
    Mannequin Author

    michael-o mannequin commented Aug 17, 2018

    A PR is in preparation.

    @taleinat
    Copy link
    Contributor

    New changeset 0e6e7a1 by Tal Einat (Michael Osipov) in branch 'master':
    bpo-34419: selectmodule.c does not compile on HP-UX due to bpo-31938 (GH-8796)
    0e6e7a1

    @taleinat
    Copy link
    Contributor

    Michael, thanks for catching this and supplying a PR!

    @michael-o
    Copy link
    Mannequin Author

    michael-o mannequin commented Aug 17, 2018

    Bevakasha!

    @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.8 only security fixes build The build process and cross-build easy stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants