Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 669152 - =net-libs/libwebsockets-2.0.2 fails compile ( error: ‘__builtin_snprintf’ output may be truncated before the last format character [-Werror=format-truncation=] )
Summary: =net-libs/libwebsockets-2.0.2 fails compile ( error: ‘__builtin_snprintf’ out...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jaco Kroon
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-20 22:58 UTC by Kent Fredric (IRC: kent\n)
Modified: 2018-10-20 22:58 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (libwebsockets-2.0.2:20181020-224934.log,24.88 KB, text/x-log)
2018-10-20 22:58 UTC, Kent Fredric (IRC: kent\n)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Fredric (IRC: kent\n) gentoo-dev 2018-10-20 22:58:12 UTC
Created attachment 552022 [details]
build.log

[ 44%] Building C object CMakeFiles/websockets_shared.dir/lib/extension.c.o                       
/usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc -Dwebsockets_shared_EXPORTS -I/var/tmp/portage/net-libs/libwebsockets-2.0.2/work/libwebsockets-2.0.2_build -I/var/tmp/portage/net-libs/libwebsockets-2.0.2/work/libwebsockets-2.0.2/lib   -DNDEBUG -Wall -Werror -fvisibility=hidden -mar
ch=native -mtune=native -O2 -pipe -pthread -fPIC   -o CMakeFiles/websockets_shared.dir/lib/extension.c.o -c /var/tmp/portage/net-libs/libwebsockets-2.0.2/work/libwebsockets-2.0.2/lib/extension.c
/var/tmp/portage/net-libs/libwebsockets-2.0.2/work/libwebsockets-2.0.2/lib/server.c: In function ‘lws_http_action’:                                                                                                    
/var/tmp/portage/net-libs/libwebsockets-2.0.2/work/libwebsockets-2.0.2/lib/server.c:293:40: error: ‘__builtin_snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]                        
    snprintf(path, sizeof(path) - 1, "%s", sym); 
                                        ^                                                                 
In file included from /usr/include/stdio.h:862,                                            
                 from /var/tmp/portage/net-libs/libwebsockets-2.0.2/work/libwebsockets-2.0.2/lib/private-libwebsockets.h:34,
                 from /var/tmp/portage/net-libs/libwebsockets-2.0.2/work/libwebsockets-2.0.2/lib/server.c:23:                                                                                                                                                                        
/usr/include/bits/stdio2.h:64:10: note: ‘__builtin_snprintf’ output between 1 and 256 bytes into a destination of size 255                                                                                                                                                           
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,                                                                                                                                                                                                               
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());                                                                                                                                                                                                                                       
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
cc1: all warnings being treated as errors        
make[2]: *** [CMakeFiles/websockets_shared.dir/build.make:471: CMakeFiles/websockets_shared.dir/lib/server.c.o] Error 1


 * Package:    net-libs/libwebsockets-2.0.2      
 * Repository: gentoo                            
 * Maintainer: jaco@uls.co.za yuchen.xie@live.com,proxy-maint@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc http2 ipv6 kernel_linux ssl userland_GNU
 * FEATURES:   ccache preserve-libs sandbox userpriv usersandbox


Installed Deps:

[ebuild  N    ~] net-libs/libwebsockets-2.0.2  USE="http2 ipv6 ssl -client -libev -libressl -libuv -static-libs" 0 KiB
[ebuild  N     ]  dev-util/cmake-3.9.6  USE="ncurses -doc -emacs -qt5 -server -system-jsoncpp {-test}" 0 KiB                                                                                                                                                                         
[ebuild  N     ]   app-crypt/rhash-1.3.6-r1  USE="nls ssl -debug -libressl -static-libs" 0 KiB                                                                                            
[ebuild  N     ]   app-arch/libarchive-3.3.1:0/13  USE="acl bzip2 e2fsprogs iconv lzma threads xattr zlib -expat -libressl -lz4 -lzo -nettle -static-libs" 0 KiB

Portage 2.3.40 (python 2.7.15-final-0, default/linux/amd64/17.1/no-multilib, gcc-8.2.0, glibc-2.26-r7, 4.9.6-gentoo-r1 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.9.6-gentoo-r1-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E6750_@_2.66GHz-with-gentoo-2.4.1
KiB Mem:     2042732 total,    238904 free
KiB Swap:   18588764 total,  18565520 free
Head commit of repository gentoo: e55cddaaeb3bb9f59b7297273452ad45e6a91a64

sh bash 4.4_p12
ld GNU ld (Gentoo 2.30 p5) 2.30.0
ccache version 3.3.4 [enabled]
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.28.0::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/ccache:          3.3.4-r1::gentoo
dev-util/cmake:           3.9.6::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.38.2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.15.1-r2::gentoo
sys-devel/binutils:       2.30-r4::gentoo
sys-devel/gcc:            8.2.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r7::gentoo