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

resolve sinpi() name clash with libm #80287

Closed
dimpase mannequin opened this issue Feb 25, 2019 · 11 comments
Closed

resolve sinpi() name clash with libm #80287

dimpase mannequin opened this issue Feb 25, 2019 · 11 comments
Labels
3.7 (EOL) end of life 3.8 only security fixes build The build process and cross-build extension-modules C modules in the Modules dir

Comments

@dimpase
Copy link
Mannequin

dimpase mannequin commented Feb 25, 2019

BPO 36106
Nosy @mdickinson, @ned-deily, @serhiy-storchaka, @koobs, @eamanu, @csabella, @miss-islington, @dimpase
PRs
  • bpo-36106: resolve sinpi name clash with libm (IEEE-754 violation) #12027
  • [3.7] bpo-36106: Resolve sinpi name clash with libm (IEEE-754 violation). (GH-12027) #12046
  • [2.7] bpo-36106: resolve sinpi name clash with libm (IEEE-754 violation) (GH-12027) #12050
  • 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 2019-02-26.10:42:10.200>
    created_at = <Date 2019-02-25.13:47:03.173>
    labels = ['extension-modules', '3.8', 'build', '3.7']
    title = 'resolve sinpi() name clash with libm'
    updated_at = <Date 2019-04-12.20:33:52.553>
    user = 'https://github.com/dimpase'

    bugs.python.org fields:

    activity = <Date 2019-04-12.20:33:52.553>
    actor = 'cheryl.sabella'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-02-26.10:42:10.200>
    closer = 'serhiy.storchaka'
    components = ['Extension Modules']
    creation = <Date 2019-02-25.13:47:03.173>
    creator = 'dimpase'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 36106
    keywords = ['patch']
    message_count = 11.0
    messages = ['336519', '336525', '336528', '336529', '336618', '336622', '336633', '336641', '336692', '340099', '340110']
    nosy_count = 8.0
    nosy_names = ['mark.dickinson', 'ned.deily', 'serhiy.storchaka', 'koobs', 'eamanu', 'cheryl.sabella', 'miss-islington', 'dimpase']
    pr_nums = ['12027', '12046', '12050']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue36106'
    versions = ['Python 2.7', 'Python 3.7', 'Python 3.8']

    @dimpase
    Copy link
    Mannequin Author

    dimpase mannequin commented Feb 25, 2019

    The standard math library (libm) may follow IEEE-754 recommendation to
    include an implementation of sinPi(), i.e. sinPi(x):=sin(pi*x).
    And this triggers a name clash, found by FreeBSD developer
    Steve Kargl, who worken on putting sinpi into libm used on FreeBSD
    (it has to be named "sinpi", not "sinPi", cf. e.g.
    https://en.cppreference.com/w/c/experimental/fpext4)

    @dimpase dimpase mannequin added 3.7 (EOL) end of life extension-modules C modules in the Modules dir build The build process and cross-build labels Feb 25, 2019
    @eamanu
    Copy link
    Mannequin

    eamanu mannequin commented Feb 25, 2019

    Hi!,

    It seem a good improve to resolve a potential problem. But I am not convinced if that problem could appear because sinpi() is definded locally.

    @dimpase
    Copy link
    Mannequin Author

    dimpase mannequin commented Feb 25, 2019

    This has a potential header conflict. For the same reason functions like
    lgamma, etc. are prefixed with m_ in Modules/mathmodule.c

    @dimpase
    Copy link
    Mannequin Author

    dimpase mannequin commented Feb 25, 2019

    e.g. if I rename m_lgamma to lgamma I get

    mathmodule.c:389:1: error: static declaration of ‘lgamma’ follows non-static declaration
     lgamma(double x)
    

    @serhiy-storchaka
    Copy link
    Member

    New changeset f57cd82 by Serhiy Storchaka (Dima Pasechnik) in branch 'master':
    bpo-36106: Resolve sinpi name clash with libm (IEEE-754 violation). (GH-12027)
    f57cd82

    @miss-islington
    Copy link
    Contributor

    New changeset 4e6646f by Miss Islington (bot) in branch '3.7':
    bpo-36106: Resolve sinpi name clash with libm (IEEE-754 violation). (GH-12027)
    4e6646f

    @koobs
    Copy link

    koobs commented Feb 26, 2019

    @koobs koobs added the 3.8 only security fixes label Feb 26, 2019
    @serhiy-storchaka
    Copy link
    Member

    New changeset b545ba0 by Serhiy Storchaka (Dima Pasechnik) in branch '2.7':
    [2.7] bpo-36106: resolve sinpi name clash with libm (IEEE-754 violation). (GH-12027) (GH-12050)
    b545ba0

    @mdickinson
    Copy link
    Member

    This one was my fault. Thanks for the fix!

    @dimpase
    Copy link
    Mannequin Author

    dimpase mannequin commented Apr 12, 2019

    Can this also be backported to 3.5. and 3.6, as requested by FreeBSD maintainers?

    @csabella
    Copy link
    Contributor

    I'll nosy Ned as the release manager about the request to 3.6.

    @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 build The build process and cross-build extension-modules C modules in the Modules dir
    Projects
    None yet
    Development

    No branches or pull requests

    5 participants