over-linking due to dpdk pkg-config

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

Bug Description

We found that OVS 2.12 builds woudl overlink several libraries
=> https://launchpadlibrarian.net/439281290/buildlog_ubuntu-eoan-amd64.openvswitch_2.12.0~git20190828.23acdc07f-0ubuntu1~ubuntu19.10.1~ppa201908281053_BUILDING.txt.gz

The build had
... -Wl,-Bdynamic -Wl,--no-as-needed -pthread -lm -ldl -lnuma -lIPSec_MB ...

This is from:
/usr/lib/x86_64-linux-gnu/pkgconfig/libdpdk.pc
-Wl,-Bdynamic -Wl,--no-as-needed -pthread -lm -ldl -lnuma -lIPSec_MB -lpcap

We need to strip/filter/sort our pkgconfig somehow.
IMHO a DPDK app should not get these unless really using those symbols.

On the surface this would be just dropping the -Wl,--no-as-needed from the string of options.
But we need to understand where it comes from.

Furthermore even if the -Wl,--no-as-needed has to stay for some, it needs a closing -Wl,--as-needed at least in Ubuntu where as-needed is the default to not "infect" following options.

Related branches

Changed in dpdk (Ubuntu):
status: New → Triaged
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

And if telemetry as of today works, then it doesn't even need the as-needed.
The flags are [...] -lrte_telemetry [...] -Wl,--no-as-needed [...]
So telemetry itself (for which it was added) is "outside" the "as-needed area".

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Test build in [1] PPA succeeded.
I installed the result in a container and checked the pkgconfig, it is without the breaking --no-as-needed now.

And at the same time nothing around telemetry broke in an obvious way.

[1]: https://launchpad.net/~paelzer/+archive/ubuntu/bug-1841759-dpdk-overlinking

Changed in dpdk (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Time to submit it upstream for a discussion there:

=> http://mails.dpdk.org/archives/dev/2019-August/141696.html

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

This bug was fixed in the package dpdk - 18.11.2-4

---------------
dpdk (18.11.2-4) unstable; urgency=medium

  * d/p/avoid-as-needed-as-it-causes-overlinking.patch: fix overlinking in
    software using the dpdk pkg-config (LP: #1841759)

 -- Christian Ehrhardt <email address hidden> Wed, 04 Sep 2019 15:37:29 +0200

Changed in dpdk (Ubuntu):
status: In Progress → 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.