From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B0D3FA054F; Mon, 15 Mar 2021 20:48:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28C852427BD; Mon, 15 Mar 2021 20:48:27 +0100 (CET) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by mails.dpdk.org (Postfix) with ESMTP id 5223C4069F for ; Mon, 15 Mar 2021 20:48:25 +0100 (CET) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 12FJXwJj015875; Mon, 15 Mar 2021 15:48:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=IllUNqsfjnA4m+PQjcqA8n8Rn0Q/z2/Tgc7F930pYfI=; b=AyVzTHdD9VZBnVVeXvZG+BPYrgsF+jcbZWxHl50wopG32+lfu0xin4nX6PIlwYVkxKDH 7ry/ikeevlRZsZPweiiTG4alYagcUjNnk0KVy9uJSHJVow5aM//TMt/OCIqiFSJVbyC0 FSnxBmG8FRAjEbWE7Kpobh7tV1I3qQ00brhFk2bRFI+W078r/HuxPnjKclb238axoohE DcTyDaHH/1YLWZbFDMRxu1J1AhkuRJvz3a9g2P42yXVpGftKdPWFYTmy0ZZwRxkvaOCM nIWte33GaV5EEzjPX2ZzQuklfNw30Np52MdZqk27aLSAz6k/PaDHltSMVdr+35+nXG6p eQ== Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0b-001b2d01.pphosted.com with ESMTP id 37ada798ux-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Mar 2021 15:48:22 -0400 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.0.43/8.16.0.43) with SMTP id 12FJm4Ai014467; Mon, 15 Mar 2021 19:48:22 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma01wdc.us.ibm.com with ESMTP id 378n18sqnv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Mar 2021 19:48:22 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 12FJmLe510486462 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 15 Mar 2021 19:48:21 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5ACD3C605F; Mon, 15 Mar 2021 19:48:21 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 81C30C605A; Mon, 15 Mar 2021 19:48:20 +0000 (GMT) Received: from Davids-MBP.randomparity.org (unknown [9.211.140.105]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Mon, 15 Mar 2021 19:48:20 +0000 (GMT) To: Piotr Kubaj , nicolas.chautru@intel.com, declan.doherty@intel.com, ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com, beilei.xing@intel.com, jia.guo@intel.com, haiyue.wang@intel.com, jiawenwu@trustnetic.com, jianwang@trustnetic.com Cc: dev@dpdk.org References: <20210311161140.70534-1-pkubaj@FreeBSD.org> From: David Christensen Message-ID: <2a3387dc-c9b7-2053-16f3-e4b595341eba@linux.vnet.ibm.com> Date: Mon, 15 Mar 2021 12:48:19 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210311161140.70534-1-pkubaj@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761 definitions=2021-03-15_11:2021-03-15, 2021-03-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 bulkscore=0 impostorscore=0 mlxscore=0 mlxlogscore=999 phishscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1011 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103150131 Subject: Re: [dpdk-dev] [PATCH] ppc64le: fix build with Clang and without glibc X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 3/11/21 8:11 AM, Piotr Kubaj wrote: > There are couple of issues when building with Clang: > 1. vector is a keyword and should not be used in code. I undefined it, > but it would probably be better to just change the variable name. > 2. vector long is deprecated by Clang and should not be used. I switched > here to vector int. > 3. Additionally, sys/platform/ppc.h is glibc-dependant and is not > available in other libc's. Use the portable method of reading TBR when > glibc is not used. Taken from > https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/powerpc/sys/platform/ppc.h > > Signed-off-by: Piotr Kubaj > --- Build with patch on my POWER9 system with RHEL 8.3 (gcc 8.3.1 20191121) generates the following errors: ninja -C build ninja: Entering directory `build' [1221/2455] Compiling C object 'drivers/a715181@@tmp_rte_net_i40e@sta/net_i40e_i40e_rxtx_vec_altivec.c.o'. ../drivers/net/i40e/i40e_rxtx_vec_altivec.c: In function ‘_recv_raw_pkts_vec’: ../drivers/net/i40e/i40e_rxtx_vec_altivec.c:243:35: warning: conversion from ‘long long unsigned int’ to ‘unsigned int’ changes value from ‘4294967297’ to ‘1’ [-Woverflow] dd_check = (vector unsigned int){0x0000000100000001ULL, ^~~~~~~~~~~~~~~~~~~~~ ../drivers/net/i40e/i40e_rxtx_vec_altivec.c:244:8: warning: conversion from ‘long long unsigned int’ to ‘unsigned int’ changes value from ‘4294967297’ to ‘1’ [-Woverflow] 0x0000000100000001ULL}; ^~~~~~~~~~~~~~~~~~~~~ ../drivers/net/i40e/i40e_rxtx_vec_altivec.c:247:36: warning: conversion from ‘long long unsigned int’ to ‘unsigned int’ changes value from ‘8589934594’ to ‘2’ [-Woverflow] eop_check = (vector unsigned int){0x0000000200000002ULL, ^~~~~~~~~~~~~~~~~~~~~ ../drivers/net/i40e/i40e_rxtx_vec_altivec.c:248:9: warning: conversion from ‘long long unsigned int’ to ‘unsigned int’ changes value from ‘8589934594’ to ‘2’ [-Woverflow] 0x0000000200000002ULL}; ^~~~~~~~~~~~~~~~~~~~~ [1736/2455] Compiling C object 'drivers/a715181@@tmp_rte_event_dsw@sta/event_dsw_dsw_evdev.c.o'. In file included from ../drivers/event/dsw/dsw_evdev.c:7: ../lib/librte_eal/ppc/include/rte_cycles.h: In function ‘rte_rdtsc’: ../lib/librte_eal/ppc/include/rte_cycles.h:32:9: warning: implicit declaration of function ‘__ppc_get_timebase’; did you mean ‘__builtin_ppc_get_timebase’? [-Wimplicit-function-declaration] return __ppc_get_timebase(); ^~~~~~~~~~~~~~~~~~ __builtin_ppc_get_timebase ../lib/librte_eal/ppc/include/rte_cycles.h:32:9: warning: nested extern declaration of ‘__ppc_get_timebase’ [-Wnested-externs] [1862/2455] Compiling C object 'app/a172ced@@dpdk-testpmd@exe/test-pmd_ieee1588fwd.c.o'. In file included from ../app/test-pmd/ieee1588fwd.c:6: ../lib/librte_eal/ppc/include/rte_cycles.h: In function ‘rte_rdtsc’: ../lib/librte_eal/ppc/include/rte_cycles.h:32:9: warning: implicit declaration of function ‘__ppc_get_timebase’; did you mean ‘__builtin_ppc_get_timebase’? [-Wimplicit-function-declaration] return __ppc_get_timebase(); ^~~~~~~~~~~~~~~~~~ __builtin_ppc_get_timebase ../lib/librte_eal/ppc/include/rte_cycles.h:32:9: warning: nested extern declaration of ‘__ppc_get_timebase’ [-Wnested-externs] [2330/2455] Linking target drivers/librte_event_dsw.so.21.2. FAILED: drivers/librte_event_dsw.so.21.2 cc -o drivers/librte_event_dsw.so.21.2 'drivers/a715181@@rte_event_dsw@sha/meson-generated_.._rte_event_dsw.pmd.c.o' 'drivers/a715181@@tmp_rte_event_dsw@sta/event_dsw_dsw_evdev.c.o' 'drivers/a715181@@tmp_rte_event_dsw@sta/event_dsw_dsw_event.c.o' 'drivers/a715181@@tmp_rte_event_dsw@sta/event_dsw_dsw_xstats.c.o' -Wl,--no-undefined -Wl,--as-needed -Wl,-O1 -shared -fPIC -Wl,--start-group -Wl,-soname,librte_event_dsw.so.21 -Wl,--no-as-needed -pthread -lm -ldl -lnuma lib/librte_eventdev.so.21.2 lib/librte_eal.so.21.2 lib/librte_kvargs.so.21.2 lib/librte_telemetry.so.21.2 lib/librte_ring.so.21.2 lib/librte_ethdev.so.21.2 lib/librte_net.so.21.2 lib/librte_mbuf.so.21.2 lib/librte_mempool.so.21.2 lib/librte_meter.so.21.2 lib/librte_hash.so.21.2 lib/librte_rcu.so.21.2 lib/librte_timer.so.21.2 lib/librte_cryptodev.so.21.2 drivers/librte_bus_vdev.so.21.2 -Wl,--end-group -Wl,--version-script=/home/drc/src/dpdk/drivers/event/dsw/version.map '-Wl,-rpath,$ORIGIN/../lib:$ORIGIN/' -Wl,-rpath-link,/home/drc/src/dpdk/build/lib:/home/drc/src/dpdk/build/drivers drivers/a715181@@tmp_rte_event_dsw@sta/event_dsw_dsw_evdev.c.o: In function `dsw_start': dsw_evdev.c:(.text+0x1078): undefined reference to `__ppc_get_timebase' collect2: error: ld returned 1 exit status [2359/2455] Compiling C object 'app/test/3062f5d@@dpdk-test@exe/test_trace_perf.c.o'. In file included from ../app/test/test_trace_perf.c:5: ../lib/librte_eal/ppc/include/rte_cycles.h: In function ‘rte_rdtsc’: ../lib/librte_eal/ppc/include/rte_cycles.h:32:9: warning: implicit declaration of function ‘__ppc_get_timebase’; did you mean ‘__builtin_ppc_get_timebase’? [-Wimplicit-function-declaration] return __ppc_get_timebase(); ^~~~~~~~~~~~~~~~~~ __builtin_ppc_get_timebase ../lib/librte_eal/ppc/include/rte_cycles.h:32:9: warning: nested extern declaration of ‘__ppc_get_timebase’ [-Wnested-externs] [2366/2455] Compiling C object 'drivers/a715181@@tmp_rte_event_octeontx2@sta/event_octeontx2_otx2_worker_dual.c.o'. ninja: build stopped: subcommand failed.