DOCA sample compile error

I have tried to compile sample code on BF2, but face error below. And I have tried the method in document 1.1. Meson Complains About Missing Dependencies . It still didn’t work, How to fix the problem thx.

ubuntu@localhost**:/opt/mellanox/doca/samples/doca_flow/flow_monitor_meter$ sudo meson build

The Meson build system

Version: 0.61.2

Source dir: /opt/mellanox/doca/samples/doca_flow/flow_monitor_meter

Build dir: /opt/mellanox/doca/samples/doca_flow/flow_monitor_meter/build

Build type: native build

Program cat found: YES (/usr/bin/cat)

Project name: DOCA_SAMPLE

Project version: 1.5.0055

C compiler for the host machine: cc (gcc 9.4.0 “cc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0”)

C linker for the host machine: cc ld.bfd 2.34

C++ compiler for the host machine: c++ (gcc 9.4.0 “c++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0”)

C++ linker for the host machine: c++ ld.bfd 2.34

Host machine cpu family: aarch64

Host machine cpu: aarch64

Found pkg-config: /usr/bin/pkg-config (0.29.1)

Found CMake: /usr/bin/cmake (3.16.3)

Run-time dependency doca-common found: NO (tried pkgconfig and cmake) ERROR: Dependency “doca-common” not found, tried pkgconfig and cmake

I also got the same error. The information provided in the trouble shooting document did not work. Please provide any suggestion.

I have tried to unset PKG_CONFIG_PATH and tried to follow trouble shooting document again and it worked

try with command “sudo -E meson build” which passes user environmental variables to sudo

Have you tried setting these environment variables?

export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/opt/mellanox/doca/lib/aarch64-linux-gnu/pkgconfig:/opt/mellanox/flexio/lib/pkgconfig
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/opt/mellanox/dpdk/lib/aarch64-linux-gnu/pkgconfig
export PATH=${PATH}:/opt/mellanox/doca/tools