Cannot compile using GCC 9.1.0
ClaymorePT opened this issue · 2 comments
ClaymorePT commented
Cannot compile branch 2.6.52 using gcc 9.1.0
I'm getting this compilation error
CC tncfg.c
In file included from /usr/include/string.h:494,
from /home/cmf/Desktop/pkgbuild/src/openswan-git/programs/tncfg/tncfg.c:19:
In function ‘strncpy’,
inlined from ‘main’ at /home/cmf/Desktop/pkgbuild/src/openswan-git/programs/tncfg/tncfg.c:233:4:
/usr/include/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 16 equals destination size [-Werror=stringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
inlined from ‘main’ at /home/cmf/Desktop/pkgbuild/src/openswan-git/programs/tncfg/tncfg.c:236:4:
/usr/include/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 12 equals destination size [-Werror=stringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Please advise.
letoams commented
You likely don’t need those tools, they are KLIPS only, not used for the native Linux IPsec stack. Try compiling without klips support enabled (with libreswan that’s USE_KLIPS=false)
Sent from mobile device
… On Aug 5, 2019, at 13:54, Carlos Miguel Ferreira ***@***.***> wrote:
Cannot compile branch 2.6.52 using gcc 9.1.0
I'm getting this compilation error
CC tncfg.c
In file included from /usr/include/string.h:494,
from /home/cmf/Desktop/pkgbuild/src/openswan-git/programs/tncfg/tncfg.c:19:
In function ‘strncpy’,
inlined from ‘main’ at /home/cmf/Desktop/pkgbuild/src/openswan-git/programs/tncfg/tncfg.c:233:4:
/usr/include/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 16 equals destination size [-Werror=stringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
inlined from ‘main’ at /home/cmf/Desktop/pkgbuild/src/openswan-git/programs/tncfg/tncfg.c:236:4:
/usr/include/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 12 equals destination size [-Werror=stringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Please advise.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
ClaymorePT commented
I have suppressed the error by making just a warning, by passing -Wno-stringop-truncation
to GCC.