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

If "_REENTRANT" is defined in the header file, we should use "-D_REENTRANT" when compiling #82482

Closed
jcea opened this issue Sep 27, 2019 · 5 comments
Assignees
Labels
3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes build The build process and cross-build

Comments

@jcea
Copy link
Member

jcea commented Sep 27, 2019

BPO 38301
Nosy @jcea
PRs
  • bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' #16446
  • [3.8] bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446) #16449
  • [3.7] bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446) #16450
  • [3.6] bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446). #16452
  • [2.7] bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446) #16454
  • 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 = 'https://github.com/jcea'
    closed_at = <Date 2019-09-28.04:39:57.003>
    created_at = <Date 2019-09-27.21:35:16.099>
    labels = ['3.8', 'build', '3.7', '3.9']
    title = 'If "_REENTRANT" is defined in the header file, we should use "-D_REENTRANT" when compiling'
    updated_at = <Date 2019-09-28.06:31:34.512>
    user = 'https://github.com/jcea'

    bugs.python.org fields:

    activity = <Date 2019-09-28.06:31:34.512>
    actor = 'ned.deily'
    assignee = 'jcea'
    closed = True
    closed_date = <Date 2019-09-28.04:39:57.003>
    closer = 'jcea'
    components = ['Build']
    creation = <Date 2019-09-27.21:35:16.099>
    creator = 'jcea'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38301
    keywords = ['patch']
    message_count = 5.0
    messages = ['353416', '353431', '353433', '353434', '353438']
    nosy_count = 1.0
    nosy_names = ['jcea']
    pr_nums = ['16446', '16449', '16450', '16452', '16454']
    priority = 'high'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue38301'
    versions = ['Python 2.7', 'Python 3.7', 'Python 3.8', 'Python 3.9']

    @jcea
    Copy link
    Member Author

    jcea commented Sep 27, 2019

    When compiling on Solaris family, we define "_REENTRANT" in "Pyconfig.h". That file is included when compiling C extensions, but if the extension is made of several C files, it could be included only in the file that interfaces with python runtime.

    Unfortunately, "_REENTRANT" modifies the way C code is compiled, so compiling a C extension with some source files with "_REENTRANT" and some other without that "define" can produce bizarre errors and crashes.

    One example: TritonDataCenter/pkgsrc#207

    In particular, "include" order can make a big difference: jnwatson/py-lmdb#213

    I suggest that when "_REENTRANT" is defined in "Pyconfig.h", Python C extensions compilation machinery adds "-D_REENTRANT" to the compilation flags.

    The patch is trivial.

    @jcea jcea added 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes labels Sep 27, 2019
    @jcea jcea self-assigned this Sep 27, 2019
    @jcea jcea added the build The build process and cross-build label Sep 27, 2019
    @jcea jcea changed the title If "_REENTARNT" is defined in the header file, we should use "-D_REENTRANT" when compiling If "_REENTRANT" is defined in the header file, we should use "-D_REENTRANT" when compiling Sep 27, 2019
    @jcea
    Copy link
    Member Author

    jcea commented Sep 28, 2019

    New changeset 52d1b86 by Jesús Cea in branch 'master':
    bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (bpo-16446)
    52d1b86

    @jcea
    Copy link
    Member Author

    jcea commented Sep 28, 2019

    New changeset 8750bce by Jesús Cea (Miss Islington (bot)) in branch '3.8':
    bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446) (bpo-16449)
    8750bce

    @jcea
    Copy link
    Member Author

    jcea commented Sep 28, 2019

    New changeset 6112b91 by Jesús Cea (Miss Islington (bot)) in branch '3.7':
    bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446) (bpo-16450)
    6112b91

    @jcea
    Copy link
    Member Author

    jcea commented Sep 28, 2019

    New changeset 598f676 by Jesús Cea in branch '2.7':
    [2.7] bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446). (bpo-16454)
    598f676

    @jcea jcea closed this as completed Sep 28, 2019
    @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.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes build The build process and cross-build
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant