Bug ID 1466
Summary [dpdk-24.07] clang failed to compile DPDK when using parameter "-Db_sanitize=address"
Product DPDK
Version 24.07
Hardware x86
OS Linux
Status UNCONFIRMED
Severity normal
Priority Normal
Component meson
Assignee dev@dpdk.org
Reporter songx.jiale@intel.com
Target Milestone ---

[Environment]
DPDK version: 
dodk-24.07.0-rc0: 01527d7fd83568476432355da1acd36fb8edc384
Other software versions: N/A.
OS: Ubuntu 24.04 LTS/6.8.0-31-generic
Compiler: clang version 18.1.3
Hardware platform: Intel(R) Xeon(R) Platinum 8380 CPU @ 2.30GHz
NIC hardware: Intel(R) Xeon(R) Platinum 8380 CPU @ 2.30GHz
NIC driver: N/A
NIC firmware: N/A

[Test Setup]
1. CC=clang meson --werror -Denable_kmods=True -Dbuildtype=debug
-Db_lundef=false -Db_sanitize=address x86_64-native-linuxapp-clang
2. ninja -C x86_64-native-linuxapp-clang

[Show the output from the previous commands.]

[676/2844] Compiling C object
drivers/librte_bus_fslmc.a.p/meson-generated_.._rte_bus_fslmc.pmd.c.o
FAILED: drivers/librte_bus_fslmc.a.p/meson-generated_.._rte_bus_fslmc.pmd.c.o
clang -Idrivers/librte_bus_fslmc.a.p -Idrivers -I../drivers -Idrivers/bus/fslmc
-I../drivers/bus/fslmc -I../drivers/bus/fslmc/mc
-I../drivers/bus/fslmc/qbman/include -I../drivers/bus/fslmc/portal -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 -Idrivers/common/dpaax
-I../drivers/common/dpaax -I../drivers/common/dpaax/caamflib -Ilib/eventdev
-I../lib/eventdev -Ilib/ring -I../lib/ring -Ilib/ethdev -I../lib/ethdev
-Ilib/net -I../lib/net -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool
-Ilib/meter -I../lib/meter -Ilib/hash -I../lib/hash -Ilib/rcu -I../lib/rcu
-Ilib/timer -I../lib/timer -Ilib/cryptodev -I../lib/cryptodev -Ilib/dmadev
-I../lib/dmadev -fdiagnostics-color=always -fsanitize=address
-fno-omit-frame-pointer -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra
-Werror -std=c11 -O0 -g -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-missing-field-initializers -D_GNU_SOURCE
-fPIC -march=native -mrtm -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API
-Wno-format-truncation -DRTE_LOG_DEFAULT_LOGTYPE=bus.fslmc -DRTE_ANNOTATE_LOCKS
-Wthread-safety -MD -MQ
drivers/librte_bus_fslmc.a.p/meson-generated_.._rte_bus_fslmc.pmd.c.o -MF
drivers/librte_bus_fslmc.a.p/meson-generated_.._rte_bus_fslmc.pmd.c.o.d -o
drivers/librte_bus_fslmc.a.p/meson-generated_.._rte_bus_fslmc.pmd.c.o -c
drivers/rte_bus_fslmc.pmd.c
drivers/rte_bus_fslmc.pmd.c:4:12: error: redefinition of '_pmd_info'
    4 | const char _pmd_info[] __attribute__((used)) = "PMD_INFO_STRING=
{\"name\": \"\", \"pci_ids\": []}";
      |            ^
drivers/rte_bus_fslmc.pmd.c:2:12: note: previous definition is here
    2 | const char _pmd_info[] __attribute__((used)) = "PMD_INFO_STRING=
{\"name\": \"\", \"pci_ids\": []}";
      |            ^
drivers/rte_bus_fslmc.pmd.c:6:12: error: redefinition of '_pmd_info'
    6 | const char _pmd_info[] __attribute__((used)) = "PMD_INFO_STRING=
{\"name\": \"\", \"pci_ids\": []}";
      |            ^
drivers/rte_bus_fslmc.pmd.c:2:12: note: previous definition is here
    2 | const char _pmd_info[] __attribute__((used)) = "PMD_INFO_STRING=
{\"name\": \"\", \"pci_ids\": []}";
      |            ^
2 errors generated.

[Expected Result]

DPDK compilation successful.
note: Successfully compiled on Ubuntu 22.04.
          


You are receiving this mail because: