Why is it so difficult to link SPDK libraries?

29 Views Asked by At

I am trying to build a simple application that calls a simple status checking SPDK API. However, I am struggling to resolve all the dependencies to do this.

Here is what I did so far:

Attempt 1. Build SPDK from scratch and link shared SPDK libraries.

Result 1. Long list of "spdk_*" shared libraries. Difficult to understand which ones to link.

Attempt 2. Reading from their website, link the code with -lspdk -lspdk_env_dpdk -ldpdk.

Result 2. libdpdk.so not found.

Attempt 3. Suspecting spdk/dpdk not being properly built, rebuild/install SPDK with various configure flags --with-dpdk.

Result 3. Still libdpdk.so not found.

Attempt 4. Getting tired of this non-sense, just tried with apt install libdpdk-dev.

Result 4. Still libdpdk.so not found.

Here are my questions.

  1. What am I doing wrong? Should I be linking librte_* (which are related to DPDK and main reason why compiler complains) manually?
  2. Why is SPDK and DPDK integrated so poorly designed? Why must they be separate with such a huge dependency mess (e.g., spdk_env_dpdk?)
  3. How can I avoid such things from happening when engineering my own library?
0

There are 0 best solutions below