Skip to content

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

Description

@jcea
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']

    Activity

    1. jcea commented on Sep 27, 2019

      @jcea
      MemberAuthor

      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.

    2. self-assigned this
      on Sep 27, 2019
    3. added
      buildThe build process and cross-build
      on Sep 27, 2019
    4. 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[/+] on Sep 27, 2019
    5. jcea commented on Sep 28, 2019

      @jcea
      MemberAuthor

      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

    6. jcea commented on Sep 28, 2019

      @jcea
      MemberAuthor

      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

    7. jcea commented on Sep 28, 2019

      @jcea
      MemberAuthor

      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

    8. jcea commented on Sep 28, 2019

      @jcea
      MemberAuthor

      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

    9. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    3.7 (EOL)end of life3.8 (EOL)end of life3.9 (EOL)end of lifebuildThe build process and cross-build

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions