smadaminov / ovs-dpdk-meson-issues

VMware Summer 2021
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

windows: pkg-config and dpdk #38

Closed williamtu closed 3 years ago

williamtu commented 3 years ago

looks like pkg-config can find libdpdk after setting the PKG_CONFIG_PATH

PS C:\ovs-meson> pkg-config.exe --libs dpdk
Package dpdk was not found in the pkg-config search path.
Perhaps you should add the directory containing `dpdk.pc'
to the PKG_CONFIG_PATH environment variable
No package 'dpdk' found
PS C:\ovs-meson> pkg-config.exe --libs libdpdk
-LC:/TEMP/dpdk/lib -Wl,--as-needed -lrte_pdump -lrte_latencystats -lrte_gso -lrte_gro -lrte_cfgfile -lrte_bitratestats -lrte_time
r -lrte_hash -lrte_metrics -lrte_cmdline -lrte_pci -lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_rcu -lrte_ri
ng -lrte_eal -lrte_telemetry -lrte_kvargs
PS C:\ovs-meson> pkg-config.exe --list-al
Unknown option --list-al
PS C:\ovs-meson> pkg-config.exe --list-all
libdpdk      DPDK - The Data Plane Development Kit (DPDK).
libdpdk-libs dpdk-libs - Internal-only DPDK pkgconfig file. Not for direct use.
PS C:\ovs-meson> pkg-config.exe --cflags libdpdk
-include rte_config.h -march=native -IC:/TEMP/dpdk/include

but meson can not find it

 dpdk_lib = cc.find_library('dpdk')
 dpdk_lib = cc.find_library('dpdk', dirs: ['C:\\temp\\dpdk\\lib'])
williamtu commented 3 years ago

I switch to use dependency, but still not work

dependency('libdpdk', method : 'pkg-config')
dependency('DPDK', method : 'pkg-config')
dependency('dpdk', method : 'pkg-config')

still not work

Program pkg-config found: YES
Program sed found: YES
Found pkg-config: C:\ProgramData\chocolatey\bin\pkg-config.EXE (0.28)
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency libunwind found: NO (tried pkgconfig and cmake)
Program python3 found: YES
Dependency threads found: YES unknown (cached)
Library pthreadVC3 found: YES
Library rte_eal found: YES
Run-time dependency dpdk found: NO (tried pkgconfig)
vipinpv85 commented 3 years ago

on Windows environment, I assume you have installed 'C:\temp\dpdk\lib'. I got the pkg-config.exe working by 2 moths

  1. adding prefix PKG_CONFIG_PATH=C:\temp\dpdk\lib\pkg-config\ pkg-config --cflags libdpdk
  2. changing the desired path dependency in meson as dpdk_lib = cc.find_library('dpdk', dirs: ['C:\\temp\\dpdk\\lib\\pkg-config'])
williamtu commented 3 years ago

Thanks for the information!

Another way suggested by Bruce is to use -Dpkg_config_path.

PS C:\k8s-antrea-dpdk-win\ovs> meson --reconfigure build
-Dpkg_config_path=C:\temp\dpdk\lib\pkgconfig\

discussed here: http://inbox.dpdk.org/dev/CALDO+SY28rpwQCu08AyFy5uX4+T1=09tvNoZQS3j6Mbzm_nHqQ@mail.gmail.com/

vipinpv85 commented 2 years ago

Thanks for the information!

Another way suggested by Bruce is to use -Dpkg_config_path.

PS C:\k8s-antrea-dpdk-win\ovs> meson --reconfigure build
-Dpkg_config_path=C:\temp\dpdk\lib\pkgconfig\

discussed here: http://inbox.dpdk.org/dev/CALDO+SY28rpwQCu08AyFy5uX4+T1=09tvNoZQS3j6Mbzm_nHqQ@mail.gmail.com/

good to hear, if the problem is resolved please feel free to close the ticket