drivers/net/cxgbe meson build failed on Fedora42 with gcc15.0.1
https://bugs.dpdk.org/show_bug.cgi?id=1771
Bug ID: 1771
Summary: [dpdk 23.11.5-rc1] drivers/net/cxgbe meson build
failed on Fedora42 with gcc15.0.1
Product: DPDK
Version: 23.11
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: core
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
The issue occurs on the new Fedora 42 OS, while there is no problem on the old Fedora 41 OS.
[DPDK version]
commit 96ae1d570472620165484776205fe957294b9597 (HEAD, tag: v23.11.5-rc1, origin/23.11)
Author: Xueming Li <[email protected]>
Date: Mon Aug 11 21:33:43 2025 +0800
version: 23.11.5-rc1
[OS version]
OS: Fedora Linux 42 (Server Edition)/Linux 6.14.0-63.fc42.x86_64
Compiler: gcc (GCC) 15.0.1 20250329 (Red Hat 15.0.1-0)
[Test Setup]
# CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib -Dexamples=all --default-library=static x86_64-native-linuxapp-gcc
# ninja -j 10 -C x86_64-native-linuxapp-gcc
[Log]
Found ninja-1.10.2.git.kitware.jobserver-1 at /usr/local/bin/ninja Cleaning... 0 files.
[1242/3040] Compiling C object drivers/libtmp_rte_net_cxgbe.a.p/net_cxgbe_cxgbe_flow.c.o
FAILED: drivers/libtmp_rte_net_cxgbe.a.p/net_cxgbe_cxgbe_flow.c.o cc -Idrivers/libtmp_rte_net_cxgbe.a.p -Idrivers -I../drivers -Idrivers/net/cxgbe -I../drivers/net/cxgbe -I../drivers/net/cxgbe/base -Ilib/ethdev -I../lib/ethdev -I. -I.. -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/include -I../lib/eal/x86/include -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/log -I../lib/log -Ilib/metrics -I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/net -I../lib/net -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/meter -I../lib/meter -Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/linux -Ilib/pci -I../lib/pci -Idrivers/bus/vdev -I../drivers/bus/vdev -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O3 -include rte_config.h -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-address-of-packed-member -Wno-packed-not-aligned -Wno-missing-field-initializers -fzero-init-padding-bits=all -Wno-zero-length-bounds -D_GNU_SOURCE -fPIC -march=native -mrtm -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation -DRTE_LOG_DEFAULT_LOGTYPE=pmd.net.cxgbe -MD -MQ drivers/libtmp_rte_net_cxgbe.a.p/net_cxgbe_cxgbe_flow.c.o -MF drivers/libtmp_rte_net_cxgbe.a.p/net_cxgbe_cxgbe_flow.c.o.d -o drivers/libtmp_rte_net_cxgbe.a.p/net_cxgbe_cxgbe_flow.c.o -c ../drivers/net/cxgbe/cxgbe_flow.c ../drivers/net/cxgbe/cxgbe_flow.c:892:52: error: initializer-string for array of ‘unsigned char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (7 chars into 6 available) [-Werror=unterminated-string-initialization]
892 | .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
|
^~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/cxgbe/cxgbe_flow.c:893:52: error: initializer-string for array of ‘unsigned char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (7 chars into 6 available) [-Werror=unterminated-string-initialization]
893 | .hdr.src_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
|
^~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/cxgbe/cxgbe_flow.c:922:41: error: initializer-string for array of ‘unsigned char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (17 chars into 16 available) [-Werror=unterminated-string-initialization]
922 |
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/cxgbe/cxgbe_flow.c:925:41: error: initializer-string for array of ‘unsigned char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (17 chars into 16 available) [-Werror=unterminated-string-initialization]
925 |
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
[1259/3040] Compiling C object drivers/libtmp_rte_net_dpaa.a.p/net_dpaa_dpaa_rxtx.c.o
ninja: build stopped: subcommand failed.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
https://bugs.dpdk.org/show_bug.cgi?id=1771
Stephen Hemminger ([email protected]) changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |WONTFIX
Status|UNCONFIRMED |RESOLVED
CC| |[email protected]--- Comment #1 from Stephen Hemminger ([email protected]) --- That is an old release. GCC 15 support was addressed in commit in main which was not backported. Since version 23.11 pre-dates the release of that OS release, it is unreasonable to expect backport.
Use a later DPDK release please.
commit e0d947a1e6c2f80aa039a4f7082a8aa16797d8b9
Author: Ferruh Yigit <[email protected]> Date: Thu Oct 3 21:13:34 2024 -0700
ethdev: convert string initialization
gcc 15 experimental [1], with -Wextra flag, gives warning in variable initialization as string [2].
The warning has a point when initialized variable is intended to use as string, since assignment is missing the required null terminator for this case. But warning is useless for our usecase.
In this patch only updated a few instance to show the issue, there are many instances to fix, if we prefer to go this way.
Other option is to disable warning but it can be useful for actual string usecases, so I prefer to keep it.
Converted string initialization to array initialization.
[1]
gcc (GCC) 15.0.0 20241003 (experimental)
[2]
../lib/ethdev/rte_flow.h:906:36:
error: initializer-string for array of ‘unsigned char’ is too long
[-Werror=unterminated-string-initialization]
906 | .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/ethdev/rte_flow.h:907:36:
error: initializer-string for array of ‘unsigned char’ is too long
[-Werror=unterminated-string-initialization]
907 | .hdr.src_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/ethdev/rte_flow.h:1009:25:
error: initializer-string for array of ‘unsigned char’ is too long
[-Werror=unterminated-string-initialization]
1009 | "\xff\xff\xff\xff\xff\xff\xff\xff"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/ethdev/rte_flow.h:1012:25:
error: initializer-string for array of ‘unsigned char’ is too long
[-Werror=unterminated-string-initialization]
1012 | "\xff\xff\xff\xff\xff\xff\xff\xff"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/ethdev/rte_flow.h:1135:20:
error: initializer-string for array of ‘unsigned char’ is too long
[-Werror=unterminated-string-initialization]
1135 | .hdr.vni = "\xff\xff\xff",
| ^~~~~~~~~~~~~~
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.