libdpdk should link against the library it uses

Bug #1547517 reported by Christian Ehrhardt 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dpdk (Ubuntu)
Fix Released
Low
Christian Ehrhardt 

Bug Description

See:
ldd usr/lib/x86_64-linux-gnu/libdpdk.so.0
        linux-vdso.so.1 => (0x00007ffc977e3000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb7594da000)
        /lib64/ld-linux-x86-64.so.2 (0x0000557d9e648000)

While a consume of libdpdk can fix that op on his own by providing the right -l parameters it will fail with errors like this if he doesn't

configure:18780: gcc -o conftest -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/dpdk -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -L/usr/lib conftest.c -ldpdk -ldl -latomic -lpthread -lrt -lm -lfuse >&5
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libdpdk.so: undefined reference to `xs_close'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libdpdk.so: undefined reference to `xs_transaction_start'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libdpdk.so: undefined reference to `pcap_next'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libdpdk.so: undefined reference to `pcap_close'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libdpdk.so: undefined reference to `pcap_open_dead'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libdpdk.so: undefined reference to `pcap_dump'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libdpdk.so: undefined reference to `pcap_dump_flush'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libdpdk.so: undefined reference to `pcap_open_offline'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libdpdk.so: undefined reference to `xs_get_domain_path'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libdpdk.so: undefined reference to `pcap_sendpacket'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libdpdk.so: undefined reference to `xs_rm'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libdpdk.so: undefined reference to `xs_domain_open'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libdpdk.so: undefined reference to `pcap_dump_close'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libdpdk.so: undefined reference to `xs_read'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libdpdk.so: undefined reference to `pcap_open_live'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libdpdk.so: undefined reference to `pcap_dump_open'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libdpdk.so: undefined reference to `xs_write'
collect2: error: ld returned 1 exit status
configure:18780: $? = 1

So eventually the library libdpdk.so.0 should link itself against the libraries it uses.

Changed in dpdk (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Changed in dpdk (Ubuntu):
assignee: nobody → ChristianEhrhardt (paelzer)
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I was working on a fix to bring it upstream first, but there our old discussion with a wider scope got picked up again.
=> http://dpdk.org/dev/patchwork/patch/9088/
There are always tradeoffs to be made and we had quite some discussions on so-versioning and such I don't want to go in to, but the outcome of this will be the proper long term solution.
But that will be part of DPDK 2.3 and backporting into 2.2 is likely too invasive / not worth the effort as it will break our library consumers.
This will be part of bug 1546547

On the good side for this bug here, that means for a short term solution we don't have to create a generic solution.
Instead we can just fix the missing linkage options "for us" in a delta that can be dropped when moving to DPDK 2.3 with the solution mentioned above integrated.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dpdk - 2.2.0-0ubuntu3

---------------
dpdk (2.2.0-0ubuntu3) xenial; urgency=medium

  * Guard dep8 tests against non supported platforms (LP: #1551158):
    - d/t/control now avoids failing due to "dependencies are unsatisfiable"
      when fetching packages. The packages architecture restrictions got added
      to avoid that.
    - d/t/check-dpdk-supported-arch.sh is called by all DPDK tests to ensure
      the platform is supported. If not it skips the test.

 -- Christian Ehrhardt <email address hidden> Mon, 29 Feb 2016 11:03:39 +0000

Changed in dpdk (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.