Bug 1061 - [dpdk v21.11.2-rc1] examples/performance-thread meson build error with gcc12.1 on fedora36
Summary: [dpdk v21.11.2-rc1] examples/performance-thread meson build error with gcc12....
Status: RESOLVED FIXED
Alias: None
Product: DPDK
Classification: Unclassified
Component: core (show other bugs)
Version: 21.11
Hardware: All All
: Normal major
Target Milestone: ---
Assignee: dev
URL:
Depends on:
Blocks:
 
Reported: 2022-08-01 03:08 CEST by gaodaxue
Modified: 2022-08-26 10:22 CEST (History)
2 users (show)



Attachments

Description gaodaxue 2022-08-01 03:08:15 CEST
[DPDK Version]
dpdk stable v21.11.2-rc1

[OS version]
OS: Fedora Linux 36 (Server Edition)/Linux 5.17.7-300.fc36.x86_64
gcc: version 12.1.1 20220507

[Bad commit]
This is a problem on a new os.

[Test setup]
CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib -Dexamples=all --default-library=static gcc-linux-app  
ninja -C gcc-linux-app

[Error log]
examples/performance-thread meson build error with gcc12.1 on fedora36
FAILED: examples/dpdk-pthread_shim.p/performance-thread_pthread_shim_pthread_shim.c.o
gcc -Iexamples/dpdk-pthread_shim.p -Iexamples -I../examples -Iexamples/performance-thread/pthread_shim -I../examples/performance-thread/pthread_shim -I../examples/performance-thread/common -I../examples/performance-thread/common/arch/x86 -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/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/net -I../lib/net -Ilib/mbuf -I../lib/mbuf -Ilib/ethdev -I../lib/ethdev -Ilib/meter -I../lib/meter -Ilib/cmdline -I../lib/cmdline -Ilib/timer -I../lib/timer -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -O3 -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 -march=native -Wno-format-truncation -DALLOW_EXPERIMENTAL_API -MD -MQ examples/dpdk-pthread_shim.p/performance-thread_pthread_shim_pthread_shim.c.o -MF examples/dpdk-pthread_shim.p/performance-thread_pthread_shim_pthread_shim.c.o.d -o examples/dpdk-pthread_shim.p/performance-thread_pthread_shim_pthread_shim.c.o -c ../examples/performance-thread/pthread_shim/pthread_shim.c
../examples/performance-thread/pthread_shim/pthread_shim.c: In function ‘pthread_setspecific’:
../examples/performance-thread/pthread_shim/pthread_shim.c:592:27: error: ‘data’ may be used uninitialized [-Werror=maybe-uninitialized]
  592 |                 int rv =  lthread_setspecific((unsigned int)key, data);
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../examples/performance-thread/pthread_shim/pthread_shim.c:589:56: note: accessing argument 2 of a function declared with attribute ‘access (none, 2)’
  589 | int pthread_setspecific(pthread_key_t key, const void *data)
      |                                            ~~~~~~~~~~~~^~~~
cc1: all warnings being treated as errors [3006/3142] Compiling C object examples/dpdk-l3fwd-thread.p/performance-thread_common_lthread_tls.c.o
[3007/3142] Compiling C object examples/dpdk-simple_mp.p/multi_process_simple_mp_main.c.o
[3008/3142] Compiling C object examples/dpdk-mp_client.p/multi_process_client_server_mp_mp_client_client.c.o
[3009/3142] Compiling C object examples/dpdk-link_status_interrupt.p/link_status_interrupt_main.c.o
[3010/3142] Compiling C object examples/dpdk-mp_server.p/multi_process_client_server_mp_mp_server_init.c.o
[3011/3142] Compiling C object examples/dpdk-mp_server.p/multi_process_client_server_mp_mp_server_args.c.o
[3012/3142] Compiling C object examples/dpdk-simple_mp.p/multi_process_simple_mp_mp_commands.c.o
[3013/3142] Compiling C object drivers/libtmp_rte_event_octeontx2.a.p/event_octeontx2_otx2_worker.c.o
[3014/3142] Compiling C object drivers/libtmp_rte_event_octeontx2.a.p/event_octeontx2_otx2_worker_dual.c.o
ninja: build stopped
Comment 1 gaodaxue 2022-08-01 04:04:59 CEST
Old OS fedora35 no found meson build error.
Comment 2 huang chenyu 2022-08-26 10:10:31 CEST
Verified patchset 125a65cb03f845d1b6d5f7078670aa1a49d62513 on baseline LTS21.11.

Tested pass
Comment 3 Kevin Traynor 2022-08-26 10:22:42 CEST
Thank you for reporting this and verifying the fix.

Note You need to log in before you can comment on or make changes to this bug.