classification
Title: Python 3.7.0b3 fails to build with clang 6.0
Type: compile error Stage: resolved
Components: Tests Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ncoghlan Nosy List: bero, ncoghlan, ned.deily
Priority: critical Keywords: patch

Created on 2018-03-29 18:43 by bero, last changed 2018-03-30 06:26 by ncoghlan. This issue is now closed.

Files
File name Uploaded Description Edit
python-3.7.0b3-clang-6.0.patch bero, 2018-03-29 18:43 Fix
Pull Requests
URL Status Linked Edit
PR 6310 merged ncoghlan, 2018-03-30 04:50
PR 6311 merged miss-islington, 2018-03-30 05:37
Messages (5)
msg314666 - (view) Author: Bernhard Rosenkraenzer (bero) Date: 2018-03-29 18:43
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
msg314676 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2018-03-30 04:39
Huh, I thought we had a clang builder in the pre-merge CI. Is that running an older version of clang, perhaps?
msg314678 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2018-03-30 05:36
New changeset 69f5c73311a61b05485b19626935bf240ad31c5b by Nick Coghlan in branch 'master':
bpo-33182: Fix pointer types in _testembed (GH-6310)
https://github.com/python/cpython/commit/69f5c73311a61b05485b19626935bf240ad31c5b
msg314679 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2018-03-30 06:24
New changeset 2961717986201d639b60de51e5f2e9aa2573856c by Nick Coghlan (Miss Islington (bot)) in branch '3.7':
bpo-33182: Fix pointer types in _testembed (GH-6310) (GH-6311)
https://github.com/python/cpython/commit/2961717986201d639b60de51e5f2e9aa2573856c
msg314680 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2018-03-30 06:26
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.
History
Date User Action Args
2018-03-30 06:26:32ncoghlansetstatus: open -> closed
resolution: fixed
messages: + msg314680

stage: patch review -> resolved
2018-03-30 06:24:08ncoghlansetmessages: + msg314679
2018-03-30 05:37:20miss-islingtonsetpull_requests: + pull_request6029
2018-03-30 05:36:51ncoghlansetmessages: + msg314678
2018-03-30 04:50:25ncoghlansetstage: patch review
pull_requests: + pull_request6028
2018-03-30 04:39:04ncoghlansetassignee: ncoghlan
messages: + msg314676
2018-03-29 18:49:57ned.deilysetpriority: normal -> critical
nosy: + ncoghlan, ned.deily
2018-03-29 18:43:37berocreate