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

Build issue Ubuntu 21.10 GCC11.2 #125

Open
micron10 opened this issue Feb 22, 2022 · 0 comments
Open

Build issue Ubuntu 21.10 GCC11.2 #125

micron10 opened this issue Feb 22, 2022 · 0 comments
Labels

Comments

@micron10
Copy link

micron10 commented Feb 22, 2022

Hi
Try to build on ubuntu 21.10 with GCC 11.2 but get this error:

In file included from /usr/include/string.h:519,
from stand/npf_stand.h:26,
from npf.h:21,
from npf_impl.h:37,
from npf_rproc.c:25:
In function ‘stpncpy’,
inlined from ‘strlcpy’ at stand/npf_stand.h:236:8,
inlined from ‘npf_ext_register’ at npf_rproc.c:113:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:103:10: error: ‘__builtin_strncpy’ specified bound 32 equals destination size [-Werror=stringop-truncation]
103 | return __builtin___stpncpy_chk (__dest, __src, __n,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
104 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/string.h:519,
from stand/npf_stand.h:26,
from npf.h:21,
from npf_impl.h:37,
from npf_if.c:45:
In function ‘stpncpy’,
inlined from ‘strlcpy’ at stand/npf_stand.h:236:8,
inlined from ‘npf_ifmap_copylogname’ at npf_if.c:189:3:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:103:10: error: ‘__builtin_strncpy’ output may be truncated copying between 0 and 16 bytes from a string of length 16 [-Werror=stringop-truncation]
103 | return __builtin___stpncpy_chk (__dest, __src, __n,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
104 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘stpncpy’,
inlined from ‘strlcpy’ at stand/npf_stand.h:236:8,
inlined from ‘npf_rproc_create’ at npf_rproc.c:279:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:103:10: error: ‘__builtin_strncpy’ specified bound 32 equals destination size [-Werror=stringop-truncation]
103 | return __builtin___stpncpy_chk (__dest, __src, __n,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
104 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
npf_if.c: At top level:
cc1: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
cc1: all warnings being treated as errors
In file included from /usr/include/string.h:519,
from stand/npf_stand.h:26,
from npf.h:21,
from npf_impl.h:37,
from npf_tableset.c:43:
In function ‘stpncpy’,
inlined from ‘strlcpy’ at stand/npf_stand.h:236:8,
inlined from ‘npf_table_create’ at npf_tableset.c:350:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:103:10: error: ‘__builtin_strncpy’ specified bound 32 equals destination size [-Werror=stringop-truncation]
103 | return __builtin___stpncpy_chk (__dest, __src, __n,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
104 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
npf_rproc.c: At top level:
cc1: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
cc1: all warnings being treated as errors
make[1]: *** [Makefile:90: build/npf_if.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:90: build/npf_rproc.lo] Error 1
In file included from /usr/include/string.h:519,
from stand/npf_stand.h:26,
from npf.h:21,
from npf_impl.h:37,
from npf_ruleset.c:32:
In function ‘stpncpy’,
inlined from ‘strlcpy’ at stand/npf_stand.h:236:8,
inlined from ‘npf_rule_alloc’ at npf_ruleset.c:601:3:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:103:10: error: ‘__builtin_strncpy’ specified bound 64 equals destination size [-Werror=stringop-truncation]
103 | return __builtin___stpncpy_chk (__dest, __src, __n,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
104 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
npf_tableset.c: At top level:
cc1: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
cc1: all warnings being treated as errors
make[1]: *** [Makefile:90: build/npf_tableset.lo] Error 1
npf_ruleset.c: At top level:
cc1: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
cc1: all warnings being treated as errors
make[1]: *** [Makefile:90: build/npf_ruleset.lo] Error 1
make[1]: Leaving directory '/build/npf/npf-master/pkg/SOURCES/kern'
make: *** [Makefile:11: all] Error 2

And second :

npf.c: In function ‘_npf_table_build_const.part.0’:
npf.c:1198:13: error: ‘cdbw_output’ reading 16 bytes from a region of size 14 [-Werror=stringop-overread]
1198 | if (cdbw_output(cdbw, fd, "npf-table-cdb", NULL) == -1) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npf.c:1198:13: note: referencing argument 3 of type ‘const char *’
In file included from npf.c:53:
/usr/include/cdbw.h:53:18: note: in a call to function ‘cdbw_output’
53 | int cdbw_output(struct cdbw *, int, const char[16],
| ^~~~~~~~~~~
npf.c: At top level:
cc1: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
cc1: all warnings being treated as errors
make[1]: *** [Makefile:70: npf.lo] Error 1

And app build have problem with dpdk 20.11

arp.c: In function ‘arp_input’:
arp.c:215:24: error: taking address of packed member of ‘struct rte_arp_ipv4’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
215 | arp_cache(ifp, &arp->arp_sip, &arp->arp_sha, targeted);
| ^~~~~~~~~~~~~
arp.c: At top level:
cc1: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
cc1: all warnings being treated as errors
make: *** [: arp.o] Error 1

m.

@micron10 micron10 added the bug label Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant