drivers/net/cnxk/cnxk_ethdev_mtr meson build failed with cflag param optimization=1 on Ubuntu20.04 with GCC10.3
https://bugs.dpdk.org/show_bug.cgi?id=992
Bug ID: 992
Summary: [dpdk 21.11.1-rc1] drivers/net/cnxk/cnxk_ethdev_mtr
meson build failed with cflag param optimization=1 on
Ubuntu20.04 with GCC10.3
Product: DPDK
Version: 19.11
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: core
Assignee: [email protected]
Reporter: [email protected]Target Milestone: ---
[DPDK version]
dpdk 21.11.1-rc1
[Bad commit]:
commit 713a4bc48c52058172520805373103c79ef17a3a (HEAD)
Author: Bruce Richardson <[email protected]> Date: Wed Mar 16 13:45:43 2022 +0000
doc: replace characters for (R) symbol in Linux guide
[ upstream commit c265d58619e7fc0f72441faafec56a2a8633a15b ]
Some IDEs, such as eclipse, complained on save about the use of special characters in the (R) symbol in linux GSG doc. We can replace those with the equivalent "|reg|" text, and including isonum.txt.
[OS version]:
gcc version 10.3.0(Ubuntu 10.3.0-1ubuntu1~20.04)
UB20.04/5.8.0-48-generic
[Test Setup]:
CC=gcc meson --optimization=1 --werror -Denable_kmods=True -Dlibdir=lib --default-library=static x86_64-native-linuxapp-gcc
ninja -C x86_64-native-linuxapp-gcc -j 10
[Ubuntu20.04 log as below]
Found ninja-1.9.0.git.kitware.dyndep-1.jobserver-1 at /usr/local/bin/ninja
ninja: Entering directory `x86_64-native-linuxapp-gcc'
[1128/3000] Compiling C object drivers/libtmp_rte_net_cnxk.a.p/net_cnxk_cnxk_ethdev_mtr.c.o
FAILED: drivers/libtmp_rte_net_cnxk.a.p/net_cnxk_cnxk_ethdev_mtr.c.o gcc -Idrivers/libtmp_rte_net_cnxk.a.p -Idrivers -I../drivers -Idrivers/net/cnxk -I../drivers/net/cnxk -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/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 -Ilib/cryptodev -I../lib/cryptodev -Ilib/rcu -I../lib/rcu -Ilib/eventdev -I../lib/eventdev -Ilib/hash -I../lib/hash -Ilib/timer -I../lib/timer -Ilib/security -I../lib/security -Idrivers/common/cnxk -I../drivers/common/cnxk -Idrivers/mempool/cnxk -I../drivers/mempool/cnxk -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -O1 -include rte_config.h -Wextra -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 -Wno-zero-length-bounds -D_GNU_SOURCE -fPIC -march=native -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation -flax-vector-conversions -Wno-strict-aliasing -DRTE_LOG_DEFAULT_LOGTYPE=pmd.net.cnxk -MD -MQ drivers/libtmp_rte_net_cnxk.a.p/net_cnxk_cnxk_ethdev_mtr.c.o -MF drivers/libtmp_rte_net_cnxk.a.p/net_cnxk_cnxk_ethdev_mtr.c.o.d -o drivers/libtmp_rte_net_cnxk.a.p/net_cnxk_cnxk_ethdev_mtr.c.o -c ../drivers/net/cnxk/cnxk_ethdev_mtr.c
In file included from ../drivers/net/cnxk/cnxk_ethdev.h:16,
from ../drivers/net/cnxk/cnxk_ethdev_mtr.c:5:
../drivers/net/cnxk/cnxk_ethdev_mtr.c: In function ‘cnxk_nix_mtr_policy_validate’:../lib/ethdev/rte_mtr_driver.h:188:10: error: ‘str’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
188 | *error = (struct rte_mtr_error){
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
189 | .type = type,
| ~~~~~~~~~~~~~
190 | .cause = cause,
| ~~~~~~~~~~~~~~~
191 | .message = message,
| ~~~~~~~~~~~~~~~~~~~
192 | };
| ~../drivers/net/cnxk/cnxk_ethdev_mtr.c:283:14: note: ‘str’ was declared here
283 | const char *str;
| ^~~
In file included from ../drivers/net/cnxk/cnxk_ethdev.h:16,
from ../drivers/net/cnxk/cnxk_ethdev_mtr.c:5:
../lib/ethdev/rte_mtr_driver.h:188:10: error: ‘str’ may be used uninitialized
in this function [-Werror=maybe-uninitialized]
188 | *error = (struct rte_mtr_error){
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
189 | .type = type,
| ~~~~~~~~~~~~~
190 | .cause = cause,
| ~~~~~~~~~~~~~~~
191 | .message = message,
| ~~~~~~~~~~~~~~~~~~~
192 | };
| ~../drivers/net/cnxk/cnxk_ethdev_mtr.c:283:14: note: ‘str’ was declared here
283 | const char *str;
| ^~~
cc1: all warnings being treated as errors
[1197/3000] Generating rte_common_cnxk.sym_chk with a meson_exe.py custom command
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=992
Kevin Traynor ([email protected]) changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED--- Comment #4 from Kevin Traynor ([email protected]) --- Thanks for validating. I applied the patch to 21.11 stable branch.
https://git.dpdk.org/dpdk-stable/commit/?h=21.11&id=213001231857c9af72f8f0288c43773b1ac2d580
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
https://bugs.dpdk.org/show_bug.cgi?id=992
gaodaxue ([email protected]) changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|VERIFIED |UNCONFIRMED
Resolution|FIXED |------ Comment #5 from gaodaxue ([email protected]) --- In the latest dpdk-stable v21.11.1-rc1 code. commit id: 05aa560efc
[Error info]
[1283/3000] Compiling C object drivers/libtmp_rte_net_cnxk.a.p/net_cnxk_cnxk_ethdev_mtr.c.o
FAILED: drivers/libtmp_rte_net_cnxk.a.p/net_cnxk_cnxk_ethdev_mtr.c.o gcc -Idrivers/libtmp_rte_net_cnxk.a.p -Idrivers -I../drivers -Idrivers/net/cnxk -I../drivers/net/cnxk -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/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 -Ilib/cryptodev -I../lib/cryptodev -Ilib/rcu -I../lib/rcu -Ilib/eventdev -I../lib/eventdev -Ilib/hash -I../lib/hash -Ilib/timer -I../lib/timer -Ilib/security -I../lib/security -Idrivers/common/cnxk -I../drivers/common/cnxk -Idrivers/mempool/cnxk -I../drivers/mempool/cnxk -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -O1 -include rte_config.h -Wextra -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 -Wno-zero-length-bounds -D_GNU_SOURCE -fPIC -march=native -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation -flax-vector-conversions -Wno-strict-aliasing -DRTE_LOG_DEFAULT_LOGTYPE=pmd.net.cnxk -MD -MQ drivers/libtmp_rte_net_cnxk.a.p/net_cnxk_cnxk_ethdev_mtr.c.o -MF drivers/libtmp_rte_net_cnxk.a.p/net_cnxk_cnxk_ethdev_mtr.c.o.d -o drivers/libtmp_rte_net_cnxk.a.p/net_cnxk_cnxk_ethdev_mtr.c.o -c ../drivers/net/cnxk/cnxk_ethdev_mtr.c
In file included from ../drivers/net/cnxk/cnxk_ethdev.h:16,
from ../drivers/net/cnxk/cnxk_ethdev_mtr.c:5:
../drivers/net/cnxk/cnxk_ethdev_mtr.c: In function ‘cnxk_nix_mtr_policy_validate’:../lib/ethdev/rte_mtr_driver.h:188:10: error: ‘str’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
188 | *error = (struct rte_mtr_error){
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
189 | .type = type,
| ~~~~~~~~~~~~~
190 | .cause = cause,
| ~~~~~~~~~~~~~~~
191 | .message = message,
| ~~~~~~~~~~~~~~~~~~~
192 | };
| ~ ../drivers/net/cnxk/cnxk_ethdev_mtr.c:283:14: note: ‘str’ was declared here
283 | const char *str;
| ^~~
In file included from ../drivers/net/cnxk/cnxk_ethdev.h:16,
from ../drivers/net/cnxk/cnxk_ethdev_mtr.c:5:
../lib/ethdev/rte_mtr_driver.h:188:10: error: ‘str’ may be used uninitialized
in this function [-Werror=maybe-uninitialized]
188 | *error = (struct rte_mtr_error){
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
189 | .type = type,
| ~~~~~~~~~~~~~
190 | .cause = cause,
| ~~~~~~~~~~~~~~~
191 | .message = message,
| ~~~~~~~~~~~~~~~~~~~
192 | };
| ~ ../drivers/net/cnxk/cnxk_ethdev_mtr.c:283:14: note: ‘str’ was declared here
283 | const char *str;
| ^~~
cc1: all warnings being treated as errors
[1284/3000] Compiling C object drivers/libtmp_rte_net_cnxk.a.p/net_cnxk_cnxk_rte_flow.c.o [1285/3000] Compiling C object drivers/libtmp_rte_net_cnxk.a.p/net_cnxk_cnxk_ethdev.c.o [1286/3000] Compiling C object drivers/libtmp_rte_net_bond.a.p/net_bonding_rte_eth_bond_8023ad.c.o [1287/3000] Compiling C object drivers/libtmp_rte_net_cnxk.a.p/net_cnxk_cnxk_ptp.c.o [1288/3000] Compiling C object drivers/libtmp_rte_net_cnxk.a.p/net_cnxk_cnxk_stats.c.o [1289/3000] Generating rte_net_bnxt.pmd.c with a custom command [1290/3000] Compiling C object drivers/libtmp_rte_net_cnxk.a.p/net_cnxk_cn9k_ethdev.c.o [1291/3000] Compiling C object drivers/libtmp_rte_net_cnxk.a.p/net_cnxk_cnxk_tm.c.o [1292/3000] Compiling C object drivers/libtmp_rte_net_bond.a.p/net_bonding_rte_eth_bond_pmd.c.o
ninja: build stopped: subcommand failed.Removing buildtools/__pycache__/ Removing x86_64-native-linuxapp-gcc/
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
https://bugs.dpdk.org/show_bug.cgi?id=992
gaodaxue ([email protected]) changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED--- Comment #6 from gaodaxue ([email protected]) --- Verified based on 2130012318 PASSED.
OS: Ubuntu 20.04.3 LTS/Linux 5.8.0-48-generic
GCC: gcc version 10.3.0 (Ubuntu 10.3.0-1ubuntu1~20.04)
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.