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

Stéphane Graber stgraber at ubuntu.com
Fri Jun 2 19:38:03 UTC 2017


On Fri, Jun 02, 2017 at 09:10:15PM +0200, Johannes Kastl wrote:
> 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

Hi,

It's a gcc bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78969


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170602/cae70d78/attachment.sig>


More information about the lxc-devel mailing list