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


1 Like

I had a runtime dependency to doca, without the -common, but your advise was a solution for me. Thanks.

After this, I am wondering that if we can compile source on the Bluefield, why does the documentation recommend us to install and download a dev-container on the Bluefield. For now, it seems like an unnecessary extra layer that can clearly complicate things when it comes to remote code development…

I want to run the ARM storm sample app that is using doca-flow. But after trying to compile it, now I have a similar issue as above w.r.t. doca-flow.

Run-time dependency doca-flow found: NO (tried pkgconfig and cmake) ERROR: Dependency "doca-flow" not found, tried pkgconfig and cmake

The above exports do not help, but I indeed see the libdoca_flow modules under the path we add, i.e., /opt/mellanox/doca/lib/aarch64-linux-gnu/

Any suggestions?

“vim /etc/profile”, then add below command to the tail!
export PKG_CONFIG_PATH=/opt/mellanox/doca/lib/aarch64-linux-gnu//pkgconfig/:/opt/mellanox/dpdk/lib/aarch64-linux-gnu/pkgconfig/:/opt/mellanox/flexio/lib/pkgconfig/:/opt/mellanox/grpc/lib/pkgconfig/:/opt/mellanox/grpc/share/pkgconfig/:/opt/mellanox/spdk/lib/pkgconfig/

then exec command “source /etc/profile”;
anyway , you‘d better be root role