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

blake2: compile error with -march=bdver2 #73690

Closed
floppym mannequin opened this issue Feb 8, 2017 · 8 comments
Closed

blake2: compile error with -march=bdver2 #73690

floppym mannequin opened this issue Feb 8, 2017 · 8 comments
Assignees
Labels
3.7 (EOL) end of life build The build process and cross-build extension-modules C modules in the Modules dir

Comments

@floppym
Copy link
Mannequin

floppym mannequin commented Feb 8, 2017

BPO 29504
Nosy @tiran, @ned-deily, @floppym
Files
  • build.log: build log
  • 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/tiran'
    closed_at = <Date 2017-12-27.19:25:19.367>
    created_at = <Date 2017-02-08.17:29:23.149>
    labels = ['extension-modules', 'build', '3.7']
    title = 'blake2: compile error with -march=bdver2'
    updated_at = <Date 2017-12-27.19:25:19.366>
    user = 'https://github.com/floppym'

    bugs.python.org fields:

    activity = <Date 2017-12-27.19:25:19.366>
    actor = 'christian.heimes'
    assignee = 'christian.heimes'
    closed = True
    closed_date = <Date 2017-12-27.19:25:19.367>
    closer = 'christian.heimes'
    components = ['Extension Modules']
    creation = <Date 2017-02-08.17:29:23.149>
    creator = 'floppymaster'
    dependencies = []
    files = ['46598']
    hgrepos = []
    issue_num = 29504
    keywords = []
    message_count = 8.0
    messages = ['287356', '287357', '287406', '287407', '289963', '295655', '309043', '309098']
    nosy_count = 5.0
    nosy_names = ['christian.heimes', 'ned.deily', 'devurandom', 'floppymaster', 'Joseph Mitzen']
    pr_nums = []
    priority = 'high'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue29504'
    versions = ['Python 3.6', 'Python 3.7']

    @floppym
    Copy link
    Mannequin Author

    floppym mannequin commented Feb 8, 2017

    When compiling python-3.6.0 with -march=bdver2, the blake2 module fails to build.

    In file included from /var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s-round.h:70:0,
    from /var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s.c:40,
    from /var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/blake2s_impl.c:32:
    /var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s-load-xop.h:29:4: error: expected identifier or '(' before 'return'
    return _mm_blendv_epi8(t0, s1, mask);
    ^
    /var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s-load-xop.h:30:1: error: expected identifier or '(' before '}' token
    }/
    ^
    /var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s-load-xop.h:30:3: error: expected identifier or '(' before '/' token
    }
    /
    ^
    In file included from /var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/blake2s_impl.c:32:0:
    /var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s.c: In function 'blake2s_init0':
    /var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s.c:167:38: error: 'blake2s_IV' undeclared (first use in this function)
    for( i = 0; i < 8; ++i ) S->h[i] = blake2s_IV[i];
    ^
    /var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s.c:167:38: note: each undeclared identifier is reported only once for each function it appears in
    /var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s.c: In function 'PyBlake2_blake2s_init_param':
    /var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s.c:176:44: error: 'blake2s_IV' undeclared (first use in this function)
    const uint8_t * v = ( const uint8_t * )( blake2s_IV );
    ^

    @floppym floppym mannequin added the extension-modules C modules in the Modules dir label Feb 8, 2017
    @floppym
    Copy link
    Mannequin Author

    floppym mannequin commented Feb 8, 2017

    Downstream bug report: https://bugs.gentoo.org/show_bug.cgi?id=608586

    @tiran
    Copy link
    Member

    tiran commented Feb 9, 2017

    It's a bug in Blake2's reference implementation with nested C++ comments (/* /* */ */). BLAKE2/BLAKE2@259e61d#diff-ac1a341ec0ed38dc5d219572f4282287 fixed the bug. For Python 3.6.1 I'm going to update Python's copy of blake2.

    @tiran
    Copy link
    Member

    tiran commented Feb 9, 2017

    I don't have time to fix the issue right away. Python's copy of blake2 needs some manual massaging and tweaking.

    @tiran tiran self-assigned this Feb 9, 2017
    @tiran tiran added the build The build process and cross-build label Feb 9, 2017
    @ned-deily
    Copy link
    Member

    This didn't make it in time for 3.6.1; deferred to 3.6.2.

    @ned-deily
    Copy link
    Member

    What's the status of this issue? If it's not going to be fixed prior to 3.6.2rc1, I'm going to downgrade it from "release blocker" as we've already released 3.6.1 without it.

    @JosephMitzen
    Copy link
    Mannequin

    JosephMitzen mannequin commented Dec 25, 2017

    Is this ever going to get merged? The gentoo bug report link includes a patch that simply removes the nested comments, which is all that is needed to get the code to compile properly on Bulldozer processors. There's no "manual massaging" or anything else necessary to fix the bug. I've tested it out and it works.

    @tiran
    Copy link
    Member

    tiran commented Dec 27, 2017

    The issue has been fixed on Nov 1st in PR #4173 (master) and #4214 (3.6.4).

    @tiran tiran closed this as completed Dec 27, 2017
    @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 build The build process and cross-build extension-modules C modules in the Modules dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants