https://bugs.dpdk.org/show_bug.cgi?id=789
Bug ID: 789 Summary: [build]ICC 32bit build failed on Ubuntu 20.04.2 LTS when has "--werror". Product: DPDK Version: 21.08 Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: Normal Component: meson Assignee: dev@dpdk.org Reporter: longfengx.li...@intel.com Target Milestone: --- Environment: DPDK version: commit 4ac3f3d76e9507a93bcf48d165ffd3a1faba08bb (HEAD -> main, tag: v21.08, origin/main, origin/HEAD) Author: Thomas Monjalon <tho...@monjalon.net> Date: Sun Aug 8 17:23:21 2021 +0200 version: 21.08.0 Signed-off-by: Thomas Monjalon <tho...@monjalon.net> OS version: DISTRIB_DESCRIPTION="Ubuntu 20.04.2 LTS" icc version: icc (ICC) 19.1.3.304 20200925 gcc version: gcc (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0 Env setup: env: DPDK build 32 bit is to be tested on a 64 bit OS. root@dpdk-xuemin4x-ub2004-i686-icc:~/dpdk# dpkg --print-foreign-architectures i386 set 32bit build env: #echo "source /opt/intel/bin/iccvars.sh ia32" >> ~/.bashrc #source ~/.bashrc Note: There are two situations: 1.build command has "–werror", build failed. 2.build command no "–werror", build passed. Test Setup: 32bit icc build cmd(has --werror),output as below: #export RTE_TARGET=i686-native-linuxapp-icc #export RTE_SDK=`pwd` #export PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig #export LIBRARY_PATH=/usr/lib/gcc/i686-linux-gnu/10/:$LIBRARY_PATH #CC=icc meson -Dc_args='-m32' -Dc_link_args='-m32' --werror -Denable_kmods=True -Dlibdir=lib -Dexamples=all --default-library=static i686-native-linuxapp-icc #ninja -C i686-native-linuxapp-icc/ root@dpdk-xuemin4x-ub2004-i686-icc:~/dpdk# ninja -C i686-native-linuxapp-icc/ ninja: Entering directory `i686-native-linuxapp-icc/' [507/2388] Compiling C object lib/librte_graph.a.p/graph_graph_stats.c.o ../lib/graph/graph_stats.c(39): warning #2405: array of elements containing a flexible array member is nonstandard struct cluster_node clusters[]; ^ [1128/2388] Compiling C object drivers/net/hinic/base/libhinic_base.a.p/hinic_pmd_hwdev.c.o FAILED: drivers/net/hinic/base/libhinic_base.a.p/hinic_pmd_hwdev.c.o icc -Idrivers/net/hinic/base/libhinic_base.a.p -Idrivers/net/hinic/base -I../drivers/net/hinic/base -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/ethdev -I../lib/ethdev -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 -Ilib/hash -I../lib/hash -Ilib/rcu -I../lib/rcu -pipe -D_FILE_OFFSET_BITS=64 -Wall -w3 -diag-disable:remark -Werror -O3 -include rte_config.h -Wextra -Wcast-qual -Wdeprecated -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-missing-field-initializers -Wno-pointer-to-int-cast -diag-disable=181 -diag-disable=188 -diag-disable=2203 -diag-disable=2279 -diag-disable=2557 -diag-disable=3179 -diag-disable=3656 -D_GNU_SOURCE -m32 -fPIC -march=native -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast -MD -MQ drivers/net/hinic/base/libhinic_base.a.p/hinic_pmd_hwdev.c.o -MF drivers/net/hinic/base/libhinic_base.a.p/hinic_pmd_hwdev.c.o.d -o drivers/net/hinic/base/libhinic_base.a.p/hinic_pmd_hwdev.c.o -c ../drivers/net/hinic/base/hinic_pmd_hwdev.c ../drivers/net/hinic/base/hinic_pmd_hwdev.c(148): error #2259: non-pointer conversion from "rte_iova_t={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits PMD_DRV_LOG(ERR, "Dma addr: %p already in hash table, error: %d, mz_name: %s", ^ ../drivers/net/hinic/base/hinic_pmd_hwdev.c(157): error #2259: non-pointer conversion from "u64={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits (void *)(u64)mz); ^ ../drivers/net/hinic/base/hinic_pmd_hwdev.c(160): error #2259: non-pointer conversion from "rte_iova_t={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits PMD_DRV_LOG(ERR, "Insert dma addr: %p hash failed, error: %d, mz_name: %s", ^ ../drivers/net/hinic/base/hinic_pmd_hwdev.c(192): error #2259: non-pointer conversion from "dma_addr_t={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits PMD_DRV_LOG(ERR, "Can not find phys_addr: %p, error: %d", ^ ../drivers/net/hinic/base/hinic_pmd_hwdev.c(198): error #2259: non-pointer conversion from "rte_iova_t={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits PMD_DRV_LOG(ERR, "Match mz_info failed: " ^ ../drivers/net/hinic/base/hinic_pmd_hwdev.c(198): error #2259: non-pointer conversion from "dma_addr_t={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits PMD_DRV_LOG(ERR, "Match mz_info failed: " ^ ../drivers/net/hinic/base/hinic_pmd_hwdev.c(256): error #2259: non-pointer conversion from "dma_addr_t={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits PMD_DRV_LOG(ERR, "Can not find phys_addr: %p, error: %d", ^ ../drivers/net/hinic/base/hinic_pmd_hwdev.c(262): error #2259: non-pointer conversion from "rte_iova_t={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits PMD_DRV_LOG(ERR, "Match mz_info failed: " ^ ../drivers/net/hinic/base/hinic_pmd_hwdev.c(262): error #2259: non-pointer conversion from "dma_addr_t={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits PMD_DRV_LOG(ERR, "Match mz_info failed: " ^ ../drivers/net/hinic/base/hinic_pmd_hwdev.c(370): error #2259: non-pointer conversion from "dma_addr_t={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits PMD_DRV_LOG(WARNING, "Free leaked dma_addr: %p, mz: %s", ^ compilation aborted for ../drivers/net/hinic/base/hinic_pmd_hwdev.c (code 2) [1130/2388] Compiling C object drivers/net/hinic/base/libhinic_base.a.p/hinic_pmd_wq.c.o FAILED: drivers/net/hinic/base/libhinic_base.a.p/hinic_pmd_wq.c.o icc -Idrivers/net/hinic/base/libhinic_base.a.p -Idrivers/net/hinic/base -I../drivers/net/hinic/base -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/ethdev -I../lib/ethdev -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 -Ilib/hash -I../lib/hash -Ilib/rcu -I../lib/rcu -pipe -D_FILE_OFFSET_BITS=64 -Wall -w3 -diag-disable:remark -Werror -O3 -include rte_config.h -Wextra -Wcast-qual -Wdeprecated -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-missing-field-initializers -Wno-pointer-to-int-cast -diag-disable=181 -diag-disable=188 -diag-disable=2203 -diag-disable=2279 -diag-disable=2557 -diag-disable=3179 -diag-disable=3656 -D_GNU_SOURCE -m32 -fPIC -march=native -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast -MD -MQ drivers/net/hinic/base/libhinic_base.a.p/hinic_pmd_wq.c.o -MF drivers/net/hinic/base/libhinic_base.a.p/hinic_pmd_wq.c.o.d -o drivers/net/hinic/base/libhinic_base.a.p/hinic_pmd_wq.c.o -c ../drivers/net/hinic/base/hinic_pmd_wq.c ../drivers/net/hinic/base/hinic_pmd_wq.c(11): error #2259: non-pointer conversion from "u64={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits dma_free_coherent(hwdev, wq->wq_buf_size, (void *)wq->queue_buf_vaddr, ^ ../drivers/net/hinic/base/hinic_pmd_wq.c(34): error #2259: non-pointer conversion from "u64={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits (void *)wq->queue_buf_vaddr, ^ ../drivers/net/hinic/base/hinic_pmd_wq.c(102): error #2259: non-pointer conversion from "unsigned long long" to "void *" may lose significant bits return WQ_WQE_ADDR(wq, (u32)(*cons_idx)); ^ ../drivers/net/hinic/base/hinic_pmd_wq.c(154): error #2259: non-pointer conversion from "u64={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits memset((void *)wq->queue_buf_vaddr, 0, wq->wq_buf_size); ^ ../drivers/net/hinic/base/hinic_pmd_wq.c(166): error #2259: non-pointer conversion from "unsigned long long" to "void *" may lose significant bits return WQ_WQE_ADDR(wq, (u32)(*prod_idx)); ^ compilation aborted for ../drivers/net/hinic/base/hinic_pmd_wq.c (code 2) [1139/2388] Compiling C object drivers/libtmp_rte_net_fm10k.a.p/net_fm10k_fm10k_ethdev.c.o ninja: build stopped: subcommand failed. 32bit icc build cmd(no --werror),output as below: CC=icc meson -Dc_args='-m32' -Dc_link_args='-m32' -Denable_kmods=True -Dlibdir=lib -Dexamples=all --default-library=static i686-native-linuxapp-icc root@dpdk-xuemin4x-ub2004-i686-icc:~/dpdk# ninja -C i686-native-linuxapp-icc/ ninja: Entering directory `i686-native-linuxapp-icc/' [505/2388] Compiling C object lib/librte_graph.a.p/graph_graph_stats.c.o ../lib/graph/graph_stats.c(39): warning #2405: array of elements containing a flexible array member is nonstandard struct cluster_node clusters[]; ^ [1137/2388] Compiling C object drivers/net/hinic/base/libhinic_base.a.p/hinic_pmd_wq.c.o ../drivers/net/hinic/base/hinic_pmd_wq.c(11): warning #2259: non-pointer conversion from "u64={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits dma_free_coherent(hwdev, wq->wq_buf_size, (void *)wq->queue_buf_vaddr, ^ ../drivers/net/hinic/base/hinic_pmd_wq.c(34): warning #2259: non-pointer conversion from "u64={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits (void *)wq->queue_buf_vaddr, ^ ../drivers/net/hinic/base/hinic_pmd_wq.c(102): warning #2259: non-pointer conversion from "unsigned long long" to "void *" may lose significant bits return WQ_WQE_ADDR(wq, (u32)(*cons_idx)); ^ ../drivers/net/hinic/base/hinic_pmd_wq.c(154): warning #2259: non-pointer conversion from "u64={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits memset((void *)wq->queue_buf_vaddr, 0, wq->wq_buf_size); ^ ../drivers/net/hinic/base/hinic_pmd_wq.c(166): warning #2259: non-pointer conversion from "unsigned long long" to "void *" may lose significant bits return WQ_WQE_ADDR(wq, (u32)(*prod_idx)); ^ [1145/2388] Compiling C object drivers/net/hinic/base/libhinic_base.a.p/hinic_pmd_hwdev.c.o ../drivers/net/hinic/base/hinic_pmd_hwdev.c(148): warning #2259: non-pointer conversion from "rte_iova_t={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits PMD_DRV_LOG(ERR, "Dma addr: %p already in hash table, error: %d, mz_name: %s", ^ ../drivers/net/hinic/base/hinic_pmd_hwdev.c(157): warning #2259: non-pointer conversion from "u64={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits (void *)(u64)mz); ^ ../drivers/net/hinic/base/hinic_pmd_hwdev.c(160): warning #2259: non-pointer conversion from "rte_iova_t={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits PMD_DRV_LOG(ERR, "Insert dma addr: %p hash failed, error: %d, mz_name: %s", ^ ../drivers/net/hinic/base/hinic_pmd_hwdev.c(192): warning #2259: non-pointer conversion from "dma_addr_t={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits PMD_DRV_LOG(ERR, "Can not find phys_addr: %p, error: %d", ^ ../drivers/net/hinic/base/hinic_pmd_hwdev.c(198): warning #2259: non-pointer conversion from "rte_iova_t={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits PMD_DRV_LOG(ERR, "Match mz_info failed: " ^ ../drivers/net/hinic/base/hinic_pmd_hwdev.c(198): warning #2259: non-pointer conversion from "dma_addr_t={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits PMD_DRV_LOG(ERR, "Match mz_info failed: " ^ ../drivers/net/hinic/base/hinic_pmd_hwdev.c(256): warning #2259: non-pointer conversion from "dma_addr_t={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits PMD_DRV_LOG(ERR, "Can not find phys_addr: %p, error: %d", ^ ../drivers/net/hinic/base/hinic_pmd_hwdev.c(262): warning #2259: non-pointer conversion from "rte_iova_t={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits PMD_DRV_LOG(ERR, "Match mz_info failed: " ^ ../drivers/net/hinic/base/hinic_pmd_hwdev.c(262): warning #2259: non-pointer conversion from "dma_addr_t={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits PMD_DRV_LOG(ERR, "Match mz_info failed: " ^ ../drivers/net/hinic/base/hinic_pmd_hwdev.c(370): warning #2259: non-pointer conversion from "dma_addr_t={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits PMD_DRV_LOG(WARNING, "Free leaked dma_addr: %p, mz: %s", ^ [1158/2388] Compiling C object drivers/libtmp_rte_net_hinic.a.p/net_hinic_hinic_pmd_rx.c.o ../drivers/net/hinic/hinic_pmd_rx.c(928): warning #2259: non-pointer conversion from "unsigned long long" to "void *" may lose significant bits rq_wqe = WQ_WQE_ADDR(rxq->wq, (u32)pi); ^ [1168/2388] Compiling C object drivers/libtmp_rte_net_hinic.a.p/net_hinic_hinic_pmd_tx.c.o ../drivers/net/hinic/hinic_pmd_tx.c(353): warning #2259: non-pointer conversion from "u64={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits ((void *)txq->sq_head_addr); ^ ../drivers/net/hinic/hinic_pmd_tx.c(372): warning #2259: non-pointer conversion from "u64={uint64_t={__uint64_t={unsigned long long}}}" to "void *" may lose significant bits hinic_sge_cpu_to_be32((void *)txq->sq_head_addr, around_sges); ^ ../drivers/net/hinic/hinic_pmd_tx.c(703): warning #2259: non-pointer conversion from "unsigned long long" to "void *" may lose significant bits return (struct hinic_sq_wqe *)WQ_WQE_ADDR(wq, cur_pi); ^ [1179/2388] Compiling C object drivers/net/i40e/libi40e_avx512_lib.a.p/i40e_rxtx_vec_avx512.c.o icc: command line warning #10121: overriding '-march=native' with '-march=skylake-avx512' [1187/2388] Compiling C object drivers/libtmp_rte_net_i40e.a.p/net_i40e_i40e_ethdev_vf.c.o ../drivers/net/i40e/i40e_ethdev_vf.c(1498): warning #191: type qualifier is meaningless on cast type if ((volatile uint32_t)msg_opc == ^ [1233/2388] Compiling C object drivers/net/iavf/libiavf_avx512_lib.a.p/iavf_rxtx_vec_avx512.c.o icc: command line warning #10121: overriding '-march=native' with '-march=skylake-avx512' [1238/2388] Compiling C object drivers/net/ice/libice_avx512_lib.a.p/ice_rxtx_vec_avx512.c.o icc: command line warning #10121: overriding '-march=native' with '-march=skylake-avx512' [1600/2388] Compiling C object drivers/libtmp_rte_raw_ioat.a.p/raw_ioat_ioat_common.c.o In file included from ../drivers/raw/ioat/rte_ioat_rawdev.h(208), from ../drivers/raw/ioat/ioat_private.h(19), from ../drivers/raw/ioat/ioat_common.c(10): ../drivers/raw/ioat/rte_ioat_rawdev_fns.h(168): warning #300: const variable "null_hdl" requires an initializer static const uintptr_t null_hdl; ^ [1604/2388] Compiling C object drivers/libtmp_rte_raw_ioat.a.p/raw_ioat_ioat_rawdev.c.o In file included from ../drivers/raw/ioat/rte_ioat_rawdev.h(208), from ../drivers/raw/ioat/ioat_rawdev.c(11): ../drivers/raw/ioat/rte_ioat_rawdev_fns.h(168): warning #300: const variable "null_hdl" requires an initializer static const uintptr_t null_hdl; ^ [1607/2388] Compiling C object drivers/libtmp_rte_raw_ioat.a.p/raw_ioat_idxd_pci.c.o In file included from ../drivers/raw/ioat/rte_ioat_rawdev.h(208), from ../drivers/raw/ioat/ioat_private.h(19), from ../drivers/raw/ioat/idxd_pci.c(9): ../drivers/raw/ioat/rte_ioat_rawdev_fns.h(168): warning #300: const variable "null_hdl" requires an initializer static const uintptr_t null_hdl; ^ [1613/2388] Compiling C object drivers/libtmp_rte_raw_ioat.a.p/raw_ioat_idxd_bus.c.o In file included from ../drivers/raw/ioat/rte_ioat_rawdev.h(208), from ../drivers/raw/ioat/ioat_private.h(19), from ../drivers/raw/ioat/idxd_bus.c(16): ../drivers/raw/ioat/rte_ioat_rawdev_fns.h(168): warning #300: const variable "null_hdl" requires an initializer static const uintptr_t null_hdl; ^ [1665/2388] Compiling C object drivers/libtmp_rte_raw_ioat.a.p/raw_ioat_ioat_rawdev_test.c.o In file included from ../drivers/raw/ioat/rte_ioat_rawdev.h(208), from ../drivers/raw/ioat/ioat_rawdev_test.c(9): ../drivers/raw/ioat/rte_ioat_rawdev_fns.h(168): warning #300: const variable "null_hdl" requires an initializer static const uintptr_t null_hdl; ^ [2227/2388] Compiling C object examples/dpdk-ioat.p/ioat_ioatfwd.c.o In file included from ../drivers/raw/ioat/rte_ioat_rawdev.h(208), from ../examples/ioat/ioatfwd.c(14): ../drivers/raw/ioat/rte_ioat_rawdev_fns.h(168): warning #300: const variable "null_hdl" requires an initializer static const uintptr_t null_hdl; ^ [2311/2388] Compiling C object examples/dpdk-mp_server.p/multi_process_client_server_mp_mp_server_main.c.o ../examples/multi_process/client_server_mp/mp_server/main.c(62): warning #300: const variable "null_mac" requires an initializer static const struct rte_ether_addr null_mac; /* static defaults to 0 */ ^ [2356/2388] Compiling C object examples/dpdk-vhost.p/vhost_ioat.c.o In file included from ../drivers/raw/ioat/rte_ioat_rawdev.h(208), from ../examples/vhost/ioat.c(8): ../drivers/raw/ioat/rte_ioat_rawdev_fns.h(168): warning #300: const variable "null_hdl" requires an initializer static const uintptr_t null_hdl; ^ [2384/2388] Generating rte_kni with a custom command make: Entering directory '/usr/src/linux-headers-5.8.0-48-generic' CC [M] /root/dpdk/i686-native-linuxapp-icc/kernel/linux/kni/kni_net.o CC [M] /root/dpdk/i686-native-linuxapp-icc/kernel/linux/kni/kni_misc.o LD [M] /root/dpdk/i686-native-linuxapp-icc/kernel/linux/kni/rte_kni.o MODPOST /root/dpdk/i686-native-linuxapp-icc/kernel/linux/kni/Module.symvers CC [M] /root/dpdk/i686-native-linuxapp-icc/kernel/linux/kni/rte_kni.mod.o LD [M] /root/dpdk/i686-native-linuxapp-icc/kernel/linux/kni/rte_kni.ko make: Leaving directory '/usr/src/linux-headers-5.8.0-48-generic' [2388/2388] Linking target app/test/dpdk-test -- You are receiving this mail because: You are the assignee for the bug.