I apologize that I did not make this more clear.

The library files themselves are in the correct location, according to
the Ubuntu multiarch spec.  The issue is that the symlink does *not*
point to the correct location.

The reason this works for the DPDK examples themselves (including l2fwd)
is because they link using e.g. -lrte_eal, with
-L${RTE_SDK}/${RTE_TARGET}/lib *added* to the search path.  The linker
does not find the library there but *does* find it in the default search
path, which includes the system library directory /usr/lib/x86_64-linux-
gnu.

The SPDK [1] build system includes the following in
spdk/lib/env_dpdk/env.mk:

```make
DPDK_LIB = $(DPDK_ABS_DIR)/lib/librte_eal.a  
$(DPDK_ABS_DIR)/lib/librte_mempool.a \
           $(DPDK_ABS_DIR)/lib/librte_ring.a
```

where DPDK_ABS_DIR is essentially defined to ${RTE_SDK}/${RTE_TARGET}.
This means that SPDK does *not* find these libraries in the system
search path, since it isn't using -l to look for them there but is
hardcoding the specific absolute path where it expects the libraries to
be (I presume they do this so that if there are multiple DPDK
installations you are absolutely sure which one you are linking
against).

Both before and after fixing the symlink, the l2fwd example program
builds successfully:

```
$ ls -l /usr/share/dpdk/x86_64-default-linuxapp-gcc/                            
                      
total 4
drwxr-xr-x 2 root root 4096 Dec 28 14:20 app
lrwxrwxrwx 1 root root   21 Oct  4 03:27 include -> ../../../include/dpdk
lrwxrwxrwx 1 root root   29 Jan  3 13:28 lib -> ../../../lib/x86_64-linux-gnu
$ make -C /usr/share/dpdk/examples/l2fwd O=${PWD}                               
                      
make: Entering directory '/usr/share/dpdk/examples/l2fwd'
  CC main.o
  LD l2fwd
  INSTALL-APP l2fwd
  INSTALL-MAP l2fwd.map
make: Leaving directory '/usr/share/dpdk/examples/l2fwd'
```

[1]: https://github.com/spdk/spdk

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1653179

Title:
  dpdk-dev incorrect symlink under $RTE_SDK

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1653179/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to