DPDK patches and discussions
 help / color / mirror / Atom feed
From: Piotr Kubaj <pkubaj@anongoth.pl>
To: David Christensen <drc@linux.vnet.ibm.com>
Cc: Piotr Kubaj <pkubaj@freebsd.org>,
	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
Subject: Re: [dpdk-dev] [PATCH] ppc64le: fix build with Clang and without glibc
Date: Tue, 23 Mar 2021 00:42:46 +0100	[thread overview]
Message-ID: <YFkrdgpnqplnbClG@KGPE-D16> (raw)
In-Reply-To: <2a3387dc-c9b7-2053-16f3-e4b595341eba@linux.vnet.ibm.com>


[-- Attachment #1.1: Type: text/plain, Size: 6097 bytes --]

Looks like I forgot to commit the change that includes headers for sysctlbyname().

Patch attached.

On 21-03-15 12:48:19, David Christensen wrote:
> 
> 
> 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 <pkubaj@FreeBSD.org>
> > ---
> 
> 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.

  parent reply	other threads:[~2021-03-23 17:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11 16:11 Piotr Kubaj
2021-03-11 20:58 ` Ajit Khaparde
2021-03-15 19:48 ` David Christensen
2021-03-22 20:14   ` Piotr Kubaj
2021-03-22 23:42   ` Piotr Kubaj [this message]
2021-05-05 14:58     ` David Marchand
     [not found]       ` <YJMes69UJORrjT1G@KGPE-D16>
2021-05-07 20:28         ` David Christensen
2021-05-07 20:30         ` David Christensen
     [not found]           ` <YJXae53gvmmXwY4n@KGPE-D16>
2021-05-11 14:02             ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YFkrdgpnqplnbClG@KGPE-D16 \
    --to=pkubaj@anongoth.pl \
    --cc=ajit.khaparde@broadcom.com \
    --cc=beilei.xing@intel.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=drc@linux.vnet.ibm.com \
    --cc=haiyue.wang@intel.com \
    --cc=jia.guo@intel.com \
    --cc=jianwang@trustnetic.com \
    --cc=jiawenwu@trustnetic.com \
    --cc=nicolas.chautru@intel.com \
    --cc=pkubaj@freebsd.org \
    --cc=somnath.kotur@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).