Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error #38

Open
fabaff opened this issue Jun 18, 2018 · 3 comments
Open

Compile error #38

fabaff opened this issue Jun 18, 2018 · 3 comments

Comments

@fabaff
Copy link

fabaff commented Jun 18, 2018

Currently the building of the package 1.10.0 fails on Fedora 29 with:

gcc -DHAVE_CONFIG_H -I.   -DUSE_NCURSES=1 -D_GNU_SOURCE -D_DEFAULT_SOURCE   -Wall -Werror -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c -o noping-oping.o `test -f 'oping.c' || echo './'`oping.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -Wall -Werror -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c liboping.c  -fPIC -DPIC -o .libs/liboping_la-liboping.o
liboping.c: In function 'ping_host_add':
liboping.c:207:9: error: '%s' directive output may be truncated writing up to 255 bytes into a region of size 243 [-Werror=format-truncation=]
    "%s: %s", function, message);
         ^~
liboping.c:1644:40:
    ping_set_error (obj, "getaddrinfo", errmsg);
                                        ~~~~~~
In file included from /usr/include/stdio.h:861,
                 from liboping.c:30:
/usr/include/bits/stdio2.h:67:10: note: '__builtin___snprintf_chk' output between 14 and 269 bytes into a destination of size 256
   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]: *** [Makefile:582: liboping_la-liboping.lo] Error 1
$ rpm -q gcc
gcc-8.1.1-1.fc29.x86_64
@xtaran
Copy link

xtaran commented Jul 28, 2018

Same issue on Debian Unstable: https://bugs.debian.org/897790

Seems to happen if liboping is compiled with GCC 8.

@xtaran
Copy link

xtaran commented Jul 31, 2018

Hi Florian,

thanks for the fix! Mind doing a new release with that fix?

@androniychuk
Copy link

Please do a release on this fix :) thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants