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 A89CEA0A0E; Tue, 23 Mar 2021 18:48:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 83511140FB4; Tue, 23 Mar 2021 18:48:33 +0100 (CET) Received: from mail.anongoth.pl (mail.anongoth.pl [46.248.190.61]) by mails.dpdk.org (Postfix) with ESMTP id CDC4940042 for ; Tue, 23 Mar 2021 00:42:49 +0100 (CET) Received: from anongoth.pl (unknown [192.168.1.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: pkubaj@anongoth.pl) by mail.anongoth.pl (Postfix) with ESMTPSA id E5D7CD4A3D; Tue, 23 Mar 2021 00:42:47 +0100 (CET) Date: Tue, 23 Mar 2021 00:42:46 +0100 From: Piotr Kubaj To: David Christensen Cc: 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, dev@dpdk.org Message-ID: References: <20210311161140.70534-1-pkubaj@FreeBSD.org> <2a3387dc-c9b7-2053-16f3-e4b595341eba@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pOZF05c8fU0VTQT+" Content-Disposition: inline In-Reply-To: <2a3387dc-c9b7-2053-16f3-e4b595341eba@linux.vnet.ibm.com> X-Mailman-Approved-At: Tue, 23 Mar 2021 18:48:31 +0100 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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" --pOZF05c8fU0VTQT+ Content-Type: multipart/mixed; boundary="aSg28DGFLwTXUG72" Content-Disposition: inline --aSg28DGFLwTXUG72 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Looks like I forgot to commit the change that includes headers for sysctlby= name(). Patch attached. On 21-03-15 12:48:19, David Christensen wrote: >=20 >=20 > 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=3Dglibc.git;a=3Dblob;f=3Dsysdeps/powerpc/= sys/platform/ppc.h > >=20 > > Signed-off-by: Piotr Kubaj > > --- >=20 > Build with patch on my POWER9 system with RHEL 8.3 (gcc 8.3.1 20191121)= =20 > generates the following errors: >=20 >=20 > ninja -C build > ninja: Entering directory `build' > [1221/2455] Compiling C object=20 > '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=20 > =E2=80=98_recv_raw_pkts_vec=E2=80=99: > ../drivers/net/i40e/i40e_rxtx_vec_altivec.c:243:35: warning: conversion= =20 > from =E2=80=98long long unsigned int=E2=80=99 to =E2=80=98unsigned int=E2= =80=99 changes value from=20 > =E2=80=984294967297=E2=80=99 to =E2=80=981=E2=80=99 [-Woverflow] > dd_check =3D (vector unsigned int){0x0000000100000001ULL, > ^~~~~~~~~~~~~~~~~~~~~ > ../drivers/net/i40e/i40e_rxtx_vec_altivec.c:244:8: warning: conversion=20 > from =E2=80=98long long unsigned int=E2=80=99 to =E2=80=98unsigned int=E2= =80=99 changes value from=20 > =E2=80=984294967297=E2=80=99 to =E2=80=981=E2=80=99 [-Woverflow] > 0x0000000100000001ULL}; > ^~~~~~~~~~~~~~~~~~~~~ > ../drivers/net/i40e/i40e_rxtx_vec_altivec.c:247:36: warning: conversion= =20 > from =E2=80=98long long unsigned int=E2=80=99 to =E2=80=98unsigned int=E2= =80=99 changes value from=20 > =E2=80=988589934594=E2=80=99 to =E2=80=982=E2=80=99 [-Woverflow] > eop_check =3D (vector unsigned int){0x0000000200000002ULL, > ^~~~~~~~~~~~~~~~~~~~~ > ../drivers/net/i40e/i40e_rxtx_vec_altivec.c:248:9: warning: conversion=20 > from =E2=80=98long long unsigned int=E2=80=99 to =E2=80=98unsigned int=E2= =80=99 changes value from=20 > =E2=80=988589934594=E2=80=99 to =E2=80=982=E2=80=99 [-Woverflow] > 0x0000000200000002ULL}; > ^~~~~~~~~~~~~~~~~~~~~ > [1736/2455] Compiling C object=20 > '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 =E2=80=98rte_rdts= c=E2=80=99: > ../lib/librte_eal/ppc/include/rte_cycles.h:32:9: warning: implicit=20 > declaration of function =E2=80=98__ppc_get_timebase=E2=80=99; did you mea= n=20 > =E2=80=98__builtin_ppc_get_timebase=E2=80=99? [-Wimplicit-function-declar= ation] > return __ppc_get_timebase(); > ^~~~~~~~~~~~~~~~~~ > __builtin_ppc_get_timebase > ../lib/librte_eal/ppc/include/rte_cycles.h:32:9: warning: nested extern= =20 > declaration of =E2=80=98__ppc_get_timebase=E2=80=99 [-Wnested-externs] > [1862/2455] Compiling C object=20 > '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 =E2=80=98rte_rdts= c=E2=80=99: > ../lib/librte_eal/ppc/include/rte_cycles.h:32:9: warning: implicit=20 > declaration of function =E2=80=98__ppc_get_timebase=E2=80=99; did you mea= n=20 > =E2=80=98__builtin_ppc_get_timebase=E2=80=99? [-Wimplicit-function-declar= ation] > return __ppc_get_timebase(); > ^~~~~~~~~~~~~~~~~~ > __builtin_ppc_get_timebase > ../lib/librte_eal/ppc/include/rte_cycles.h:32:9: warning: nested extern= =20 > declaration of =E2=80=98__ppc_get_timebase=E2=80=99 [-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=20 > 'drivers/a715181@@rte_event_dsw@sha/meson-generated_.._rte_event_dsw.pmd.= c.o'=20 > 'drivers/a715181@@tmp_rte_event_dsw@sta/event_dsw_dsw_evdev.c.o'=20 > 'drivers/a715181@@tmp_rte_event_dsw@sta/event_dsw_dsw_event.c.o'=20 > 'drivers/a715181@@tmp_rte_event_dsw@sta/event_dsw_dsw_xstats.c.o'=20 > -Wl,--no-undefined -Wl,--as-needed -Wl,-O1 -shared -fPIC=20 > -Wl,--start-group -Wl,-soname,librte_event_dsw.so.21 -Wl,--no-as-needed= =20 > -pthread -lm -ldl -lnuma lib/librte_eventdev.so.21.2=20 > lib/librte_eal.so.21.2 lib/librte_kvargs.so.21.2=20 > lib/librte_telemetry.so.21.2 lib/librte_ring.so.21.2=20 > lib/librte_ethdev.so.21.2 lib/librte_net.so.21.2 lib/librte_mbuf.so.21.2= =20 > lib/librte_mempool.so.21.2 lib/librte_meter.so.21.2=20 > lib/librte_hash.so.21.2 lib/librte_rcu.so.21.2 lib/librte_timer.so.21.2= =20 > lib/librte_cryptodev.so.21.2 drivers/librte_bus_vdev.so.21.2=20 > -Wl,--end-group=20 > -Wl,--version-script=3D/home/drc/src/dpdk/drivers/event/dsw/version.map= =20 > '-Wl,-rpath,$ORIGIN/../lib:$ORIGIN/'=20 > -Wl,-rpath-link,/home/drc/src/dpdk/build/lib:/home/drc/src/dpdk/build/dri= vers > drivers/a715181@@tmp_rte_event_dsw@sta/event_dsw_dsw_evdev.c.o: In=20 > 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=20 > '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 =E2=80=98rte_rdts= c=E2=80=99: > ../lib/librte_eal/ppc/include/rte_cycles.h:32:9: warning: implicit=20 > declaration of function =E2=80=98__ppc_get_timebase=E2=80=99; did you mea= n=20 > =E2=80=98__builtin_ppc_get_timebase=E2=80=99? [-Wimplicit-function-declar= ation] > return __ppc_get_timebase(); > ^~~~~~~~~~~~~~~~~~ > __builtin_ppc_get_timebase > ../lib/librte_eal/ppc/include/rte_cycles.h:32:9: warning: nested extern= =20 > declaration of =E2=80=98__ppc_get_timebase=E2=80=99 [-Wnested-externs] > [2366/2455] Compiling C object=20 > 'drivers/a715181@@tmp_rte_event_octeontx2@sta/event_octeontx2_otx2_worker= _dual.c.o'. > ninja: build stopped: subcommand failed. --aSg28DGFLwTXUG72-- --pOZF05c8fU0VTQT+--