[lxc-devel] Building lxc with gcc7 fails (openSUSE Tumbleweed)

Johannes Kastl mail at ojkastl.de
Fri Jun 2 19:10:15 UTC 2017


Dear all,

openSUSE Tumbleweed made gcc7 the default compiler this week. This
lets the builds for lxc fail:

https://build.opensuse.org/package/live_build_log/openSUSE:Factory/lxc/standard/x86_64

The bug is tracked here.
https://bugzilla.opensuse.org/show_bug.cgi?id=1041291

I would suspect this is the issue (or one of them):

> [  132s] cgroups/cgfsng.c: In function 'cgfsng_create':
> [  132s] cgroups/cgfsng.c:1381:23: error: '__builtin___snprintf_chk' output may be truncated before the last format character [-Werror=format-truncation=]
> [  132s]    snprintf(offset, 5, "-%d", idx);
> [  132s]                        ^~~~~
> [  132s] In file included from /usr/include/stdio.h:939:0,
> [  132s]                  from cgroups/cgfsng.c:44:
> [  132s] /usr/include/bits/stdio2.h:64:10: note: '__builtin___snprintf_chk' output between 3 and 6 bytes into a destination of size 5
> [  132s]    return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
> [  132s]           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> [  132s]         __bos (__s), __fmt, __va_arg_pack ());
> [  132s]         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I'll try to figure this out, but I am not a programmer nor a gcc
specialist. Any help would be highly appreciated.

Kind Regards,
Johannes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 882 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170602/e9a88a6d/attachment.sig>


More information about the lxc-devel mailing list