FTBFS with gcc7
Closed this issue · 2 comments
bigon commented
Hi,
Apparently setools 4.2 FTBFS with the following erro:
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wno-sign-compare -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c setools/policyrep/libpolicyrep.c -o build/temp.linux-amd64-3.7/setools/policyrep/libpolicyrep.o -Werror -Wextra -Waggregate-return -Wfloat-equal -Wformat -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-include-dirs -Wnested-externs -Wold-style-definition -Wpointer-arith -Wstrict-prototypes -Wunknown-pragmas -Wwrite-strings -Wno-unused-parameter -Wno-suggest-attribute=format -Wno-sign-compare -Wno-cast-qual -Wno-unreachable-code -fno-exceptions
setools/policyrep/libpolicyrep.c: In function '__pyx_f_7setools_9policyrep_12libpolicyrep_13SELinuxPolicy__synthesize_attrs':
setools/policyrep/libpolicyrep.c:86388:62: error: '%04zd' directive output may be truncated writing between 4 and 10 bytes into a region of size 5 [-Werror=format-truncation=]
(void)(snprintf(__pyx_v_tmp_name, 9, ((char const *)"@ttr%04zd"), (__pyx_v_i + 1)));
^~~~~
setools/policyrep/libpolicyrep.c:86388:57: note: directive argument in the range [1, 4294967295]
(void)(snprintf(__pyx_v_tmp_name, 9, ((char const *)"@ttr%04zd"), (__pyx_v_i + 1)));
^~~~~~~~~~~
In file included from /usr/include/stdio.h:862:0,
from /usr/include/python3.7m/Python.h:25,
from setools/policyrep/libpolicyrep.c:56:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: '__builtin___snprintf_chk' output between 9 and 15 bytes into a destination of size 9
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setools/policyrep/libpolicyrep.c: In function '__pyx_f_7setools_9policyrep_12libpolicyrep_13SELinuxPolicy__rebuild_attrs_from_map':
setools/policyrep/libpolicyrep.c:85981:64: error: '%04zd' directive output may be truncated writing between 4 and 10 bytes into a region of size 5 [-Werror=format-truncation=]
(void)(snprintf(__pyx_v_tmp_name, 9, ((char const *)"@ttr%04zd"), (__pyx_v_i + 1)));
^~~~~
setools/policyrep/libpolicyrep.c:85981:59: note: directive argument in the range [1, 4294967295]
(void)(snprintf(__pyx_v_tmp_name, 9, ((char const *)"@ttr%04zd"), (__pyx_v_i + 1)));
^~~~~~~~~~~
In file included from /usr/include/stdio.h:862:0,
from /usr/include/python3.7m/Python.h:25,
from setools/policyrep/libpolicyrep.c:56:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: '__builtin___snprintf_chk' output between 9 and 15 bytes into a destination of size 9
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
/usr/lib/python3/dist-packages/setuptools/dist.py:398: UserWarning: Normalizing '4.2.0-beta' to '4.2.0b0'
normalized_version,
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
E: pybuild pybuild:336: build: plugin distutils failed with: exit code=1: /usr/bin/python3.7 setup.py build
Is it possible that the equivalent of e41adf0 has not been applied?
bigon commented
Oups, yes indeed