Bug ID 1542
Summary [dpdk21.11.8-rc1] meson build failed on Ubuntu24.04 and Fedora40
Product DPDK
Version 21.11
Hardware x86
OS Linux
Status UNCONFIRMED
Severity normal
Priority Normal
Component meson
Assignee dev@dpdk.org
Reporter tingtingx.liao@intel.com
Target Milestone ---

[Environment]
DPDK version: 
commit 680818068d31764357075cde440232ce5ab8b786 (HEAD, tag: v21.11.8-rc1,
origin/21.11)
OS:  Ubuntu 24.04 LTS/6.8.0-31-generic, Fedora39/6.5.6-300.fc39.x86_64
Compiler: clang version 18.1.3/gcc version 13.2.0
Hardware platform: Intel(R) Xeon(R) Platinum 8180 CPU @ 2.50GHz

[Test Setup]
1. Build with gcc:
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

2. Build with clang:
CC=clang meson --werror -Denable_kmods=True -Dlibdir=lib -Dexamples=all
--default-library=static x86_64-native-linuxapp-clang
ninja -j 10 -C x86_64-native-linuxapp-clang

3. Build with gcc-shared:
CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib
-Dlibdir=-DRTE_BUILD_SHARED_LIB --default-library=shared
x86_64-native-linuxapp-gcc+shared
ninja -j 10 -C x86_64-native-linuxapp-gcc+shared

4. Build with gcc-16byte
CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib -Dexamples=all
--default-library=static '-Dc_args=-DRTE_LIBRTE_I40E_16BYTE_RX_DESC
-DRTE_LIBRTE_ICE_16BYTE_RX_DESC' x86_64-native-linuxapp-gcc+16byte
ninja -j 10 -C x86_64-native-linuxapp-gcc+16byte

5. Build document:
CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib -Denable_docs=true
x86_64-native-linuxapp-doc
ninja -j 10 -C x86_64-native-linuxapp-doc

[Show the output from the previous commands.]
FAILED: kernel/linux/kni/rte_kni.ko
/usr/bin/make -j4 -C /lib/modules/6.8.0-31-generic/build
M=/root/UB2404-64_K6.8.0_GCC13.2.0/x86_64-native-linuxapp-gcc/20240910134035/dpdk/x86_64-native-linuxapp-gcc/kernel/linux/kni
src=/root/UB2404-64_K6.8.0_GCC13.2.0/x86_64-native-linuxapp-gcc/20240910134035/dpdk/kernel/linux/kni
'MODULE_CFLAGS=  -include
/root/UB2404-64_K6.8.0_GCC13.2.0/x86_64-native-linuxapp-gcc/20240910134035/dpdk/config/rte_config.h
-I/root/UB2404-64_K6.8.0_GCC13.2.0/x86_64-native-linuxapp-gcc/20240910134035/dpdk/lib/eal/include
-I/root/UB2404-64_K6.8.0_GCC13.2.0/x86_64-native-linuxapp-gcc/20240910134035/dpdk/lib/kni
-I/root/UB2404-64_K6.8.0_GCC13.2.0/x86_64-native-linuxapp-gcc/20240910134035/dpdk/x86_64-native-linuxapp-gcc
-I/root/UB2404-64_K6.8.0_GCC13.2.0/x86_64-native-linuxapp-gcc/20240910134035/dpdk/kernel/linux/kni'
modules
make: Entering directory '/usr/src/linux-headers-6.8.0-31-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.2.0-23ubuntu4)
13.2.0
  You are using:           gcc-13 (Ubuntu 13.2.0-23ubuntu4) 13.2.0
  CC [M] 
/root/UB2404-64_K6.8.0_GCC13.2.0/x86_64-native-linuxapp-gcc/20240910134035/dpdk/x86_64-native-linuxapp-gcc/kernel/linux/kni/kni_misc.o
  CC [M] 
/root/UB2404-64_K6.8.0_GCC13.2.0/x86_64-native-linuxapp-gcc/20240910134035/dpdk/x86_64-native-linuxapp-gcc/kernel/linux/kni/kni_net.o
/root/UB2404-64_K6.8.0_GCC13.2.0/x86_64-native-linuxapp-gcc/20240910134035/dpdk/kernel/linux/kni/kni_net.c:
In function ‘kni_get_drvinfo’:
/root/UB2404-64_K6.8.0_GCC13.2.0/x86_64-native-linuxapp-gcc/20240910134035/dpdk/kernel/linux/kni/kni_net.c:835:9:
error: implicit declaration of function ‘strlcpy’; did you mean ‘strscpy’?
[-Werror=implicit-function-declaration]
  835 |         strlcpy(info->version, KNI_VERSION, sizeof(info->version));
      |         ^~~~~~~
      |         strscpy
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:243:
/root/UB2404-64_K6.8.0_GCC13.2.0/x86_64-native-linuxapp-gcc/20240910134035/dpdk/x86_64-native-linuxapp-gcc/kernel/linux/kni/kni_net.o]
Error 1
make[1]: *** [/usr/src/linux-headers-6.8.0-31-generic/Makefile:1926:
/root/UB2404-64_K6.8.0_GCC13.2.0/x86_64-native-linuxapp-gcc/20240910134035/dpdk/x86_64-native-linuxapp-gcc/kernel/linux/kni]
Error 2
make: *** [Makefile:240: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-6.8.0-31-generic'
[3253/3330] Compiling C object
drivers/libtmp_rte_event_octeontx2.a.p/event_octeontx2_otx2_worker.c.o
[3254/3330] Compiling C object
drivers/libtmp_rte_event_octeontx2.a.p/event_octeontx2_otx2_worker_dual.c.o
ninja: build stopped

FAILED: kernel/linux/kni/rte_kni.ko
/usr/bin/make -j4 -C /lib/modules/6.8.0-31-generic/build
M=/root/UB2404-64_K6.8.0_Clang18.1.3/x86_64-native-linuxapp-clang/20240910134035/dpdk/x86_64-native-linuxapp-clang/kernel/linux/kni
src=/root/UB2404-64_K6.8.0_Clang18.1.3/x86_64-native-linuxapp-clang/20240910134035/dpdk/kernel/linux/kni
'MODULE_CFLAGS=  -include
/root/UB2404-64_K6.8.0_Clang18.1.3/x86_64-native-linuxapp-clang/20240910134035/dpdk/config/rte_config.h
-I/root/UB2404-64_K6.8.0_Clang18.1.3/x86_64-native-linuxapp-clang/20240910134035/dpdk/lib/eal/include
-I/root/UB2404-64_K6.8.0_Clang18.1.3/x86_64-native-linuxapp-clang/20240910134035/dpdk/lib/kni
-I/root/UB2404-64_K6.8.0_Clang18.1.3/x86_64-native-linuxapp-clang/20240910134035/dpdk/x86_64-native-linuxapp-clang
-I/root/UB2404-64_K6.8.0_Clang18.1.3/x86_64-native-linuxapp-clang/20240910134035/dpdk/kernel/linux/kni'
modules
make: Entering directory '/usr/src/linux-headers-6.8.0-31-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.2.0-23ubuntu4)
13.2.0
  You are using:           gcc-13 (Ubuntu 13.2.0-23ubuntu4) 13.2.0
  CC [M] 
/root/UB2404-64_K6.8.0_Clang18.1.3/x86_64-native-linuxapp-clang/20240910134035/dpdk/x86_64-native-linuxapp-clang/kernel/linux/kni/kni_misc.o
  CC [M] 
/root/UB2404-64_K6.8.0_Clang18.1.3/x86_64-native-linuxapp-clang/20240910134035/dpdk/x86_64-native-linuxapp-clang/kernel/linux/kni/kni_net.o
/root/UB2404-64_K6.8.0_Clang18.1.3/x86_64-native-linuxapp-clang/20240910134035/dpdk/kernel/linux/kni/kni_net.c:
In function ‘kni_get_drvinfo’:
/root/UB2404-64_K6.8.0_Clang18.1.3/x86_64-native-linuxapp-clang/20240910134035/dpdk/kernel/linux/kni/kni_net.c:835:9:
error: implicit declaration of function ‘strlcpy’; did you mean ‘strscpy’?
[-Werror=implicit-function-declaration]
  835 |         strlcpy(info->version, KNI_VERSION, sizeof(info->version));
      |         ^~~~~~~
      |         strscpy
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:243:
/root/UB2404-64_K6.8.0_Clang18.1.3/x86_64-native-linuxapp-clang/20240910134035/dpdk/x86_64-native-linuxapp-clang/kernel/linux/kni/kni_net.o]
Error 1
make[1]: *** [/usr/src/linux-headers-6.8.0-31-generic/Makefile:1926:
/root/UB2404-64_K6.8.0_Clang18.1.3/x86_64-native-linuxapp-clang/20240910134035/dpdk/x86_64-native-linuxapp-clang/kernel/linux/kni]
Error 2
make: *** [Makefile:240: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-6.8.0-31-generic'
[3329/3330] Compiling C object app/test/dpdk-test.p/test_ring_perf.c.o
ninja: build stopped

[Expected Result]
Build Passed
          


You are receiving this mail because: