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

Python 3.7.0b3 fails to build with clang 6.0 #77363

Closed
berolinux mannequin opened this issue Mar 29, 2018 · 5 comments
Closed

Python 3.7.0b3 fails to build with clang 6.0 #77363

berolinux mannequin opened this issue Mar 29, 2018 · 5 comments
Assignees
Labels
3.7 (EOL) end of life build The build process and cross-build tests Tests in the Lib/test dir

Comments

@berolinux
Copy link
Mannequin

berolinux mannequin commented Mar 29, 2018

BPO 33182
Nosy @ncoghlan, @berolinux, @ned-deily
PRs
  • bpo-33182: Fix pointer types in _testembed #6310
  • [3.7] bpo-33182: Fix pointer types in _testembed (GH-6310) #6311
  • Files
  • python-3.7.0b3-clang-6.0.patch: Fix
  • 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/ncoghlan'
    closed_at = <Date 2018-03-30.06:26:32.427>
    created_at = <Date 2018-03-29.18:43:37.889>
    labels = ['3.7', 'build', 'tests']
    title = 'Python 3.7.0b3 fails to build with clang 6.0'
    updated_at = <Date 2018-03-30.06:26:32.426>
    user = 'https://github.com/berolinux'

    bugs.python.org fields:

    activity = <Date 2018-03-30.06:26:32.426>
    actor = 'ncoghlan'
    assignee = 'ncoghlan'
    closed = True
    closed_date = <Date 2018-03-30.06:26:32.427>
    closer = 'ncoghlan'
    components = ['Tests']
    creation = <Date 2018-03-29.18:43:37.889>
    creator = 'bero'
    dependencies = []
    files = ['47505']
    hgrepos = []
    issue_num = 33182
    keywords = ['patch']
    message_count = 5.0
    messages = ['314666', '314676', '314678', '314679', '314680']
    nosy_count = 3.0
    nosy_names = ['ncoghlan', 'bero', 'ned.deily']
    pr_nums = ['6310', '6311']
    priority = 'critical'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue33182'
    versions = ['Python 3.7']

    @berolinux
    Copy link
    Mannequin Author

    berolinux mannequin commented Mar 29, 2018

    Python 3.7.0b3 fails to build with clang 6.0 (implicit cast from void* to a different pointer type is an error now):

    /usr/bin/clang++ -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -Os -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fPIC -flto -O3 -g -Os -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fPIC -flto -O3 -D_GNU_SOURCE -fPIC -fwrapv -I/usr/include/ncursesw -flto -Os -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fPIC -flto -O3 -D_GNU_SOURCE -fPIC -fwrapv -I/usr/include/ncursesw -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -Os -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fPIC -flto -O3 -D_GNU_SOURCE -fPIC -fwrapv -I/usr/include/ncursesw -fprofile-instr-generate -I. -I./Include -Os -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fPIC -flto -O3 -D_GNU_SOURCE -fPIC -fwrapv -I/usr/include/ncursesw -Os -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fPIC -flto -O3 -D_GNU_SOURCE -fPIC -fwrapv -I/usr/include/ncursesw -fPIC -DPy_BUILD_CORE -o Programs/_testembed.o ./Programs/_testembed.c
    clang-6.0: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
    ./Programs/_testembed.c:173:34: warning: ISO C++11 does not allow conversion from string literal to 'wchar_t *' [-Wwritable-strings]
    wchar_t *static_warnoption = L"once";
    ^
    ./Programs/_testembed.c:174:31: warning: ISO C++11 does not allow conversion from string literal to 'wchar_t *' [-Wwritable-strings]
    wchar_t *static_xoption = L"also_not_an_option=2";
    ^
    ./Programs/_testembed.c:177:14: error: cannot initialize a variable of type 'wchar_t *' with an rvalue of type 'void *'
    wchar_t *dynamic_once_warnoption = calloc(warnoption_len+1, sizeof(wchar_t));
    ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ./Programs/_testembed.c:178:14: error: cannot initialize a variable of type 'wchar_t *' with an rvalue of type 'void *'
    wchar_t *dynamic_xoption = calloc(xoption_len+1, sizeof(wchar_t));
    ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    2 warnings and 2 errors generated.
    make[3]: *** [Makefile:777: Programs/_testembed.o] Error 1

    @berolinux berolinux mannequin added 3.7 (EOL) end of life tests Tests in the Lib/test dir build The build process and cross-build labels Mar 29, 2018
    @ncoghlan
    Copy link
    Contributor

    Huh, I thought we had a clang builder in the pre-merge CI. Is that running an older version of clang, perhaps?

    @ncoghlan ncoghlan self-assigned this Mar 30, 2018
    @ncoghlan
    Copy link
    Contributor

    New changeset 69f5c73 by Nick Coghlan in branch 'master':
    bpo-33182: Fix pointer types in _testembed (GH-6310)
    69f5c73

    @ncoghlan
    Copy link
    Contributor

    New changeset 2961717 by Nick Coghlan (Miss Islington (bot)) in branch '3.7':
    bpo-33182: Fix pointer types in _testembed (GH-6310) (GH-6311)
    2961717

    @ncoghlan
    Copy link
    Contributor

    Thanks for the bug report - the 3.7 branch should be buildable again now.

    My assumption would be that Travis are still running clang 5, since 6 was only released very recently.

    @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 tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant