> > Hi Tianfei, > > To reproduce this, assume using Ubuntu 20.04. > 1. Install libfdt (It will include ifpga driver from drivers/raw/ifpga/base) > $ sudo apt-get install libfdt-dev > 2. configure DPDK library > $ meson build > 3. check libdpdk.pc file in build/meson-private/libdpdk.pc. It will include > path > to librt.so without this patch.
I have checked the libdpdk.pc and got the different between with and without this patch. Without this patch, there are a full path for librt.so in libdpdk.pc. With this patch, it provide "-lrt" in libdpdk.pc. This patch looks good for me. Acked-by: Tianfei Zhang <tianfei.zh...@intel.com> > > Regards, > Alim Hussin > > -----Original Message----- > From: Zhang, Tianfei <tianfei.zh...@intel.com> > Sent: Thursday, July 1, 2021 9:19 PM > To: Xu, Rosen <rosen...@intel.com>; Hussin, Mohamad Noor Alim > <mohamad.noor.alim.hus...@intel.com> > Cc: dev@dpdk.org; Huang, Wei <wei.hu...@intel.com>; sta...@dpdk.org > Subject: RE: [PATCH v2] ifpga/base/meson: fix looking for librt > > > > > -----Original Message----- > > From: Xu, Rosen <rosen...@intel.com> > > Sent: 2021年6月30日 18:03 > > To: Hussin, Mohamad Noor Alim <mohamad.noor.alim.hus...@intel.com>; > > Zhang, Tianfei <tianfei.zh...@intel.com> > > Cc: dev@dpdk.org; Huang, Wei <wei.hu...@intel.com>; sta...@dpdk.org > > Subject: RE: [PATCH v2] ifpga/base/meson: fix looking for librt > > > > CC Tianfei, who is maintainer. > > > > > -----Original Message----- > > > From: Hussin, Mohamad Noor Alim > > <mohamad.noor.alim.hus...@intel.com> > > > Sent: Wednesday, June 30, 2021 17:26 > > > To: Xu, Rosen <rosen...@intel.com> > > > Cc: dev@dpdk.org; Hussin, Mohamad Noor Alim > > > <mohamad.noor.alim.hus...@intel.com>; Huang, Wei > > > <wei.hu...@intel.com>; sta...@dpdk.org > > > Subject: [PATCH v2] ifpga/base/meson: fix looking for librt > > > > > > Finding with "librt" keyword would give the output with full path of > > > librt such as > > > /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/librt.so > > > instead of -lrt in libdpdk.pc pkg-config file. > > > > > > Assume find_library() will prepend "lib", thus remove "lib" from "librt" > > > keyword. The output will shows as -lrt. > > > > > > This will cause an issue when compile DPDK app with static library > > > as the path of librt has been hard-coded in the libdpdk.pc file. > > How to reproduce this issue? > > > > > > > Fixes: e41856b515ce ("raw/ifpga/base: enhance driver reliability in > > > multi- > > > process") > > > Cc: wei.hu...@intel.com > > > Cc: sta...@dpdk.org > > > > > > Signed-off-by: Mohamad Noor Alim Hussin > > > <mohamad.noor.alim.hus...@intel.com> > > > --- > > > drivers/raw/ifpga/base/meson.build | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/raw/ifpga/base/meson.build > > > b/drivers/raw/ifpga/base/meson.build > > > index 8d27c6021..ce592a13a 100644 > > > --- a/drivers/raw/ifpga/base/meson.build > > > +++ b/drivers/raw/ifpga/base/meson.build > > > @@ -27,7 +27,7 @@ sources = [ > > > > > > rtdep = dependency('librt', required: false) if not rtdep.found() > > > - rtdep = cc.find_library('librt', required: false) > > > + rtdep = cc.find_library('rt', required: false) > > > endif > > > if not rtdep.found() > > > build = false > > > -- > > > 2.17.1