microsoft / machnet

Machnet provides applications like databases and finance an easy way to access low-latency DPDK-based messaging on public cloud VMs. 750K RPS on Azure at 61 us P99.9.
MIT License
67 stars 18 forks source link

Update PKG_CONFIG_PATH for dpdk setup on Ubuntu #40

Closed abhinavg97 closed 1 month ago

abhinavg97 commented 1 month ago

Present: The location of PKG_CONFIG_PATH does not reflect the correct location of pkgconfig upon dpdk installation

proposed: correct path as installed by dpdk

anujkaliaiitd commented 1 month ago

Thanks. This varies by system. We could have both, or use find to locate the .pc file.

abhinavg97 commented 1 month ago

Using find is a better alternative I think. I included that in the latest commit.

anujkaliaiitd commented 1 month ago

Thanks, can we just do:

export PKG_CONFIG_PATH="${PWD}/build/install/usr/local/lib/x86_64-linux-gnu/pkgconfig:${PWD}/build/install/usr/local/lib/pkgconfig"

sarsanaee commented 1 month ago

Sorry quick question, does this work for ARM too?

abhinavg97 commented 1 month ago

From what I see, for arm, the path is $PWD/build/install/usr/local/lib/aarch64-linux-gnu/pkgconfig. I think users can check the path from the find command in that case. @sarsanaee

sarsanaee commented 2 weeks ago

@abhinavg97

I am trying to build machnet following the INTERNAL documentation, and it does not build on ubuntu 22.04 and DPDK 23.10 LTS. It actually builds, but it does not RUN. It cannot find the right libraries, and it must have gotten wrong on these commits somehow.

Would you please advise?

Thanks, Alireza

abhinavg97 commented 2 weeks ago

Hi @sarsanaee Could you verify the pkg config path with this command? find *path_to_dpdk* -name "*.pc"

sarsanaee commented 2 weeks ago

hi @abhinavg97

this is paths (output)

dpdk-stable-23.11.1/build/meson-uninstalled/libdpdk-uninstalled.pc dpdk-stable-23.11.1/build/meson-uninstalled/libdpdk-libs-uninstalled.pc dpdk-stable-23.11.1/build/meson-private/libdpdk.pc dpdk-stable-23.11.1/build/meson-private/libdpdk-libs.pc dpdk-stable-23.11.1/build/install/usr/local/lib/x86_64-linux-gnu/pkgconfig/libdpdk.pc dpdk-stable-23.11.1/build/install/usr/local/lib/x86_64-linux-gnu/pkgconfig/libdpdk-libs.pc

sarsanaee commented 2 weeks ago

@abhinavg97

This is basically what I am facing:

sudo GLOG_logtostderr=1 ./src/apps/machnet/machnet --config_json ~/machnet/src/apps/machnet/config.json

./src/apps/machnet/machnet: error while loading shared libraries: librte_kvargs.so.24: cannot open shared object file: No such file or directory

abhinavg97 commented 2 weeks ago

Just to confirm, did you run sudo ldconfig after building dpdk?

sarsanaee commented 2 weeks ago

@abhinavg97

Yes I did.

Are you assuming that dpdk should be installed globally by any chance?

Furthermore, the error that I am facing indicates that the binary is looking for some dynamic library. In fact, it must not be looking for dpdk's dynamic libraries, as all libs should have been linked statically.