Bug#917984: Can not link ODP with newer DPDK

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#917984: Can not link ODP with newer DPDK

Dmitry Eremin-Solenikov
Package: libdpdk-dev
Version: 18.11-3
Severity: important

Hello,

I've tried using migrated DPDK to build ODP. Unfortunately, ODP uses
libtool and libtool likes to rearrange linking options (see below). Thus
linked ODP library/app doesn't get all necessary PMDs.

Linking in an old way also doesn't seem possible because you've stopped
providing libdpdk.a script (which is still included in the DPDK
installation BTW, if build/install cycle is done using make).

$ pkg-config --libs libdpdk --static
-lrte_telemetry -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_vhost -lrte_security -lrte_sched -lrte_reorder -lrte_rawdev -lrte_pdump -lrte_power -lrte_meter -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag -lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrte_metrics -lrte_pci -lrte_ethdev -lrte_net -lrte_mbuf -lrte_mempool -lrte_ring -lrte_eal -lrte_kvargs -lrte_cmdline -lrte_kvargs -lrte_eal -lrte_ring -lrte_mempool -lrte_mbuf -lrte_pci -lrte_cryptodev -lrte_net -lrte_cmdline -lrte_ethdev -lrte_hash -lrte_timer -lrte_common_dpaax -lrte_eventdev -lrte_rawdev -lrte_bus_dpaa -lrte_bus_fslmc -lrte_bus_pci -lrte_common_octeontx -lrte_bus_vdev -lrte_meter -lrte_sched -lrte_ip_frag -lz -lrte_mempool_dpaa -lrte_mempool_dpaa2 -lrte_vhost -lrte_security -lrte_kni -lmnl -lmlx4 -libverbs -lmnl -lmlx5 -libverbs -lrte_bus_vmbus -lrte_mempool_octeontx -lpcap -lrte_port -lrte_lpm -lrte_acl -lrte_table -lrte_pipeline -lrte_gso -lIPSec_MB -lrte_common_cpt -lrte_reorder -lrte_compressdev -lrte_pmd_dpaa -lrte_pmd_dpaa2 -lrte_pmd_dpaa2_sec -lrte_pmd_octeontx -lrte_bbdev -lrte_bus_ifpga -Wl,--whole-archive -lrte_mempool_bucket -lrte_mempool_ring -lrte_mempool_stack -lrte_pmd_af_packet -lrte_pmd_ark -lrte_pmd_atlantic -lrte_pmd_avf -lrte_pmd_avp -lrte_pmd_axgbe -lrte_pmd_bond -lrte_pmd_bnx2x -lrte_pmd_bnxt -lrte_pmd_cxgbe -lrte_pmd_e1000 -lrte_pmd_ena -lrte_pmd_enetc -lrte_pmd_enic -lrte_pmd_failsafe -lrte_pmd_fm10k -lrte_pmd_i40e -lrte_pmd_ifc -lrte_pmd_ixgbe -lrte_pmd_kni -lrte_pmd_liquidio -lrte_pmd_mlx4 -lrte_pmd_mlx5 -lrte_pmd_netvsc -lrte_pmd_nfp -lrte_pmd_null -lrte_pmd_pcap -lrte_pmd_qede -lrte_pmd_ring -lrte_pmd_sfc -lrte_pmd_softnic -lrte_pmd_tap -lrte_pmd_thunderx -lrte_pmd_vdev_netvsc -lrte_pmd_vhost -lrte_pmd_virtio -lrte_pmd_vmxnet3 -lrte_pmd_aesni_gcm -lrte_pmd_aesni_mb -lrte_pmd_caam_jr -lrte_pmd_ccp -lrte_pmd_dpaa_sec -lrte_pmd_null_crypto -lrte_pmd_octeontx_crypto -lrte_pmd_openssl -lrte_pmd_crypto_scheduler -lrte_pmd_virtio_crypto -lrte_pmd_octeontx_compress -lrte_pmd_qat -lrte_pmd_zlib -lrte_pmd_dpaa_event -lrte_pmd_dpaa2_event -lrte_pmd_octeontx_event -lrte_pmd_opdl_event -lrte_pmd_skeleton_event -lrte_pmd_sw_event -lrte_pmd_dsw_event -lrte_pmd_bbdev_null -lrte_pmd_skeleton_rawdev -lrte_pmd_dpaa2_cmdif -lrte_pmd_dpaa2_qdma -lrte_pmd_ifpga_rawdev -Wl,--no-whole-archive -Wl,-Bdynamic -Wl,--no-as-needed -pthread -lm -ldl -lnuma -lbsd -lpcap -lcrypto -lz -lcrypto -ldl -pthread -lz

$ libtool --mode=link gcc /tmp/test.c -o /tmp/tes `pkg-config --libs libdpdk --static`
libtool: link: gcc /tmp/test.c -o /tmp/tes -Wl,--whole-archive -Wl,--no-whole-archive -Wl,-Bdynamic -Wl,--no-as-needed -pthread -pthread  -lrte_telemetry -lrte_bpf -lrte_flow_classify -lrte_pdump -lrte_power -lrte_member -lrte_latencystats -lrte_jobstats -lrte_gro -lrte_efd -lrte_distributor -lrte_cfgfile -lrte_bitratestats -lrte_metrics -lrte_kvargs -lrte_eal -lrte_ring -lrte_mempool -lrte_mbuf -lrte_pci -lrte_cryptodev -lrte_net -lrte_cmdline -lrte_ethdev -lrte_hash -lrte_timer -lrte_common_dpaax -lrte_eventdev -lrte_rawdev -lrte_bus_dpaa -lrte_bus_fslmc -lrte_bus_pci -lrte_common_octeontx -lrte_bus_vdev -lrte_meter -lrte_sched -lrte_ip_frag -lrte_mempool_dpaa -lrte_mempool_dpaa2 -lrte_vhost -lrte_security -lrte_kni -lmlx4 -lmnl -lmlx5 -libverbs -lrte_bus_vmbus -lrte_mempool_octeontx -lrte_port -lrte_lpm -lrte_acl -lrte_table -lrte_pipeline -lrte_gso -lIPSec_MB -lrte_common_cpt -lrte_reorder -lrte_compressdev -lrte_pmd_dpaa -lrte_pmd_dpaa2 -lrte_pmd_dpaa2_sec -lrte_pmd_octeontx -lrte_bbdev -lrte_bus_ifpga -lrte_mempool_bucket -lrte_mempool_ring -lrte_mempool_stack -lrte_pmd_af_packet -lrte_pmd_ark -lrte_pmd_atlantic -lrte_pmd_avf -lrte_pmd_avp -lrte_pmd_axgbe -lrte_pmd_bond -lrte_pmd_bnx2x -lrte_pmd_bnxt -lrte_pmd_cxgbe -lrte_pmd_e1000 -lrte_pmd_ena -lrte_pmd_enetc -lrte_pmd_enic -lrte_pmd_failsafe -lrte_pmd_fm10k -lrte_pmd_i40e -lrte_pmd_ifc -lrte_pmd_ixgbe -lrte_pmd_kni -lrte_pmd_liquidio -lrte_pmd_mlx4 -lrte_pmd_mlx5 -lrte_pmd_netvsc -lrte_pmd_nfp -lrte_pmd_null -lrte_pmd_pcap -lrte_pmd_qede -lrte_pmd_ring -lrte_pmd_sfc -lrte_pmd_softnic -lrte_pmd_tap -lrte_pmd_thunderx -lrte_pmd_vdev_netvsc -lrte_pmd_vhost -lrte_pmd_virtio -lrte_pmd_vmxnet3 -lrte_pmd_aesni_gcm -lrte_pmd_aesni_mb -lrte_pmd_caam_jr -lrte_pmd_ccp -lrte_pmd_dpaa_sec -lrte_pmd_null_crypto -lrte_pmd_octeontx_crypto -lrte_pmd_openssl -lrte_pmd_crypto_scheduler -lrte_pmd_virtio_crypto -lrte_pmd_octeontx_compress -lrte_pmd_qat -lrte_pmd_zlib -lrte_pmd_dpaa_event -lrte_pmd_dpaa2_event -lrte_pmd_octeontx_event -lrte_pmd_opdl_event -lrte_pmd_skeleton_event -lrte_pmd_sw_event -lrte_pmd_dsw_event -lrte_pmd_bbdev_null -lrte_pmd_skeleton_rawdev -lrte_pmd_dpaa2_cmdif -lrte_pmd_dpaa2_qdma -lrte_pmd_ifpga_rawdev -lm -lnuma -lbsd -lpcap -lcrypto -ldl -lz -pthread



-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.18.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8), LANGUAGE=ru_RU:ru (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libdpdk-dev depends on:
ii  libbsd-dev                         0.9.1-1
ii  libibverbs-dev                     21.0-1
ii  libmnl-dev                         1.0.4-2
ii  libnuma-dev                        2.0.12-1
ii  libpcap-dev                        1.8.1-6
ii  librte-acl18.11                    18.11-3
ii  librte-bbdev18.11                  18.11-3
ii  librte-bitratestats18.11           18.11-3
ii  librte-bpf18.11                    18.11-3
ii  librte-bus-dpaa18.11               18.11-3
ii  librte-bus-fslmc18.11              18.11-3
ii  librte-bus-ifpga18.11              18.11-3
ii  librte-bus-pci18.11                18.11-3
ii  librte-bus-vdev18.11               18.11-3
ii  librte-bus-vmbus18.11              18.11-3
ii  librte-cfgfile18.11                18.11-3
ii  librte-cmdline18.11                18.11-3
ii  librte-common-cpt18.11             18.11-3
ii  librte-common-dpaax18.11           18.11-3
ii  librte-common-octeontx18.11        18.11-3
ii  librte-compressdev18.11            18.11-3
ii  librte-cryptodev18.11              18.11-3
ii  librte-distributor18.11            18.11-3
ii  librte-eal18.11                    18.11-3
ii  librte-efd18.11                    18.11-3
ii  librte-ethdev18.11                 18.11-3
ii  librte-eventdev18.11               18.11-3
ii  librte-flow-classify18.11          18.11-3
ii  librte-gro18.11                    18.11-3
ii  librte-gso18.11                    18.11-3
ii  librte-hash18.11                   18.11-3
ii  librte-ip-frag18.11                18.11-3
ii  librte-jobstats18.11               18.11-3
ii  librte-kni18.11                    18.11-3
ii  librte-kvargs18.11                 18.11-3
ii  librte-latencystats18.11           18.11-3
ii  librte-lpm18.11                    18.11-3
ii  librte-mbuf18.11                   18.11-3
ii  librte-member18.11                 18.11-3
ii  librte-mempool-bucket18.11         18.11-3
ii  librte-mempool-dpaa18.11           18.11-3
ii  librte-mempool-dpaa2-18.11         18.11-3
ii  librte-mempool-octeontx18.11       18.11-3
ii  librte-mempool-ring18.11           18.11-3
ii  librte-mempool-stack18.11          18.11-3
ii  librte-mempool18.11                18.11-3
ii  librte-meter18.11                  18.11-3
ii  librte-metrics18.11                18.11-3
ii  librte-net18.11                    18.11-3
ii  librte-pci18.11                    18.11-3
ii  librte-pdump18.11                  18.11-3
ii  librte-pipeline18.11               18.11-3
ii  librte-pmd-aesni-gcm18.11          18.11-3
ii  librte-pmd-aesni-mb18.11           18.11-3
ii  librte-pmd-af-packet18.11          18.11-3
ii  librte-pmd-ark18.11                18.11-3
ii  librte-pmd-atlantic18.11           18.11-3
ii  librte-pmd-avf18.11                18.11-3
ii  librte-pmd-avp18.11                18.11-3
ii  librte-pmd-axgbe18.11              18.11-3
ii  librte-pmd-bbdev-null18.11         18.11-3
ii  librte-pmd-bnx2x18.11              18.11-3
ii  librte-pmd-bnxt18.11               18.11-3
ii  librte-pmd-bond18.11               18.11-3
ii  librte-pmd-caam-jr18.11            18.11-3
ii  librte-pmd-ccp18.11                18.11-3
ii  librte-pmd-crypto-scheduler18.11   18.11-3
ii  librte-pmd-cxgbe18.11              18.11-3
ii  librte-pmd-dpaa-event18.11         18.11-3
ii  librte-pmd-dpaa-sec18.11           18.11-3
ii  librte-pmd-dpaa18.11               18.11-3
ii  librte-pmd-dpaa2-18.11             18.11-3
ii  librte-pmd-dpaa2-cmdif18.11        18.11-3
ii  librte-pmd-dpaa2-event18.11        18.11-3
ii  librte-pmd-dpaa2-qdma18.11         18.11-3
ii  librte-pmd-dpaa2-sec18.11          18.11-3
ii  librte-pmd-dsw-event18.11          18.11-3
ii  librte-pmd-e1000-18.11             18.11-3
ii  librte-pmd-ena18.11                18.11-3
ii  librte-pmd-enetc18.11              18.11-3
ii  librte-pmd-enic18.11               18.11-3
ii  librte-pmd-failsafe18.11           18.11-3
ii  librte-pmd-fm10k18.11              18.11-3
ii  librte-pmd-i40e18.11               18.11-3
ii  librte-pmd-ifc18.11                18.11-3
ii  librte-pmd-ifpga-rawdev18.11       18.11-3
ii  librte-pmd-ixgbe18.11              18.11-3
ii  librte-pmd-kni18.11                18.11-3
ii  librte-pmd-liquidio18.11           18.11-3
ii  librte-pmd-mlx4-18.11              18.11-3
ii  librte-pmd-mlx5-18.11              18.11-3
ii  librte-pmd-netvsc18.11             18.11-3
ii  librte-pmd-nfp18.11                18.11-3
ii  librte-pmd-null-crypto18.11        18.11-3
ii  librte-pmd-null18.11               18.11-3
ii  librte-pmd-octeontx-compress18.11  18.11-3
ii  librte-pmd-octeontx-crypto18.11    18.11-3
ii  librte-pmd-octeontx-event18.11     18.11-3
ii  librte-pmd-octeontx18.11           18.11-3
ii  librte-pmd-opdl-event18.11         18.11-3
ii  librte-pmd-openssl18.11            18.11-3
ii  librte-pmd-pcap18.11               18.11-3
ii  librte-pmd-qat18.11                18.11-3
ii  librte-pmd-qede18.11               18.11-3
ii  librte-pmd-ring18.11               18.11-3
ii  librte-pmd-sfc18.11                18.11-3
ii  librte-pmd-skeleton-event18.11     18.11-3
ii  librte-pmd-skeleton-rawdev18.11    18.11-3
ii  librte-pmd-softnic18.11            18.11-3
ii  librte-pmd-sw-event18.11           18.11-3
ii  librte-pmd-tap18.11                18.11-3
ii  librte-pmd-thunderx18.11           18.11-3
ii  librte-pmd-vdev-netvsc18.11        18.11-3
ii  librte-pmd-vhost18.11              18.11-3
ii  librte-pmd-virtio-crypto18.11      18.11-3
ii  librte-pmd-virtio18.11             18.11-3
ii  librte-pmd-vmxnet3-18.11           18.11-3
ii  librte-pmd-zlib18.11               18.11-3
ii  librte-port18.11                   18.11-3
ii  librte-power18.11                  18.11-3
ii  librte-rawdev18.11                 18.11-3
ii  librte-reorder18.11                18.11-3
ii  librte-ring18.11                   18.11-3
ii  librte-sched18.11                  18.11-3
ii  librte-security18.11               18.11-3
ii  librte-table18.11                  18.11-3
ii  librte-telemetry18.11              18.11-3
ii  librte-timer18.11                  18.11-3
ii  librte-vhost18.11                  18.11-3
ii  libssl-dev                         1.1.1a-1
ii  zlib1g-dev                         1:1.2.11.dfsg-1

libdpdk-dev recommends no packages.

libdpdk-dev suggests no packages.

-- no debconf information

Reply | Threaded
Open this post in threaded view
|

Bug#917984: [Pkg-dpdk-devel] Bug#917984: Can not link ODP with newer DPDK

Luca Boccassi-3
On Wed, 2019-01-02 at 01:43 +0300, Dmitry Eremin-Solenikov wrote:

> Package: libdpdk-dev
> Version: 18.11-3
> Severity: important
>
> Hello,
>
> I've tried using migrated DPDK to build ODP. Unfortunately, ODP uses
> libtool and libtool likes to rearrange linking options (see below).
> Thus
> linked ODP library/app doesn't get all necessary PMDs.
>
> Linking in an old way also doesn't seem possible because you've
> stopped
> providing libdpdk.a script (which is still included in the DPDK
> installation BTW, if build/install cycle is done using make).
>
> $ pkg-config --libs libdpdk --static
> -lrte_telemetry -lrte_bpf -lrte_flow_classify -lrte_pipeline
> -lrte_table -lrte_port -lrte_vhost -lrte_security -lrte_sched
> -lrte_reorder -lrte_rawdev -lrte_pdump -lrte_power -lrte_meter
> -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats
> -lrte_ip_frag -lrte_gso -lrte_gro -lrte_eventdev -lrte_efd
> -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile
> -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash
> -lrte_metrics -lrte_pci -lrte_ethdev -lrte_net -lrte_mbuf
> -lrte_mempool -lrte_ring -lrte_eal -lrte_kvargs -lrte_cmdline
> -lrte_kvargs -lrte_eal -lrte_ring -lrte_mempool -lrte_mbuf -lrte_pci
> -lrte_cryptodev -lrte_net -lrte_cmdline -lrte_ethdev -lrte_hash
> -lrte_timer -lrte_common_dpaax -lrte_eventdev -lrte_rawdev
> -lrte_bus_dpaa -lrte_bus_fslmc -lrte_bus_pci -lrte_common_octeontx
> -lrte_bus_vdev -lrte_meter -lrte_sched -lrte_ip_frag -lz
> -lrte_mempool_dpaa -lrte_mempool_dpaa2 -lrte_vhost -lrte_security
> -lrte_kni -lmnl -lmlx4 -libverbs -lmnl -lmlx5 -libverbs
> -lrte_bus_vmbus -lrte_mempool_octeontx -lpcap -lrte_port -lrte_lpm
> -lrte_acl -lrte_table -lrte_pipeline -lrte_gso -lIPSec_MB
> -lrte_common_cpt -lrte_reorder -lrte_compressdev -lrte_pmd_dpaa
> -lrte_pmd_dpaa2 -lrte_pmd_dpaa2_sec -lrte_pmd_octeontx -lrte_bbdev
> -lrte_bus_ifpga -Wl,--whole-archive -lrte_mempool_bucket
> -lrte_mempool_ring -lrte_mempool_stack -lrte_pmd_af_packet
> -lrte_pmd_ark -lrte_pmd_atlantic -lrte_pmd_avf -lrte_pmd_avp
> -lrte_pmd_axgbe -lrte_pmd_bond -lrte_pmd_bnx2x -lrte_pmd_bnxt
> -lrte_pmd_cxgbe -lrte_pmd_e1000 -lrte_pmd_ena -lrte_pmd_enetc
> -lrte_pmd_enic -lrte_pmd_failsafe -lrte_pmd_fm10k -lrte_pmd_i40e
> -lrte_pmd_ifc -lrte_pmd_ixgbe -lrte_pmd_kni -lrte_pmd_liquidio
> -lrte_pmd_mlx4 -lrte_pmd_mlx5 -lrte_pmd_netvsc -lrte_pmd_nfp
> -lrte_pmd_null -lrte_pmd_pcap -lrte_pmd_qede -lrte_pmd_ring
> -lrte_pmd_sfc -lrte_pmd_softnic -lrte_pmd_tap -lrte_pmd_thunderx
> -lrte_pmd_vdev_netvsc -lrte_pmd_vhost -lrte_pmd_virtio
> -lrte_pmd_vmxnet3 -lrte_pmd_aesni_gcm -lrte_pmd_aesni_mb
> -lrte_pmd_caam_jr -lrte_pmd_ccp -lrte_pmd_dpaa_sec
> -lrte_pmd_null_crypto -lrte_pmd_octeontx_crypto -lrte_pmd_openssl
> -lrte_pmd_crypto_scheduler -lrte_pmd_virtio_crypto
> -lrte_pmd_octeontx_compress -lrte_pmd_qat -lrte_pmd_zlib
> -lrte_pmd_dpaa_event -lrte_pmd_dpaa2_event -lrte_pmd_octeontx_event
> -lrte_pmd_opdl_event -lrte_pmd_skeleton_event -lrte_pmd_sw_event
> -lrte_pmd_dsw_event -lrte_pmd_bbdev_null -lrte_pmd_skeleton_rawdev
> -lrte_pmd_dpaa2_cmdif -lrte_pmd_dpaa2_qdma -lrte_pmd_ifpga_rawdev
> -Wl,--no-whole-archive -Wl,-Bdynamic -Wl,--no-as-needed -pthread -lm
> -ldl -lnuma -lbsd -lpcap -lcrypto -lz -lcrypto -ldl -pthread -lz
>
> $ libtool --mode=link gcc /tmp/test.c -o /tmp/tes `pkg-config --libs
> libdpdk --static`
> libtool: link: gcc /tmp/test.c -o /tmp/tes -Wl,--whole-archive -Wl,
> --no-whole-archive -Wl,-Bdynamic -Wl,--no-as-needed -pthread
> -pthread  -lrte_telemetry -lrte_bpf -lrte_flow_classify -lrte_pdump
> -lrte_power -lrte_member -lrte_latencystats -lrte_jobstats -lrte_gro
> -lrte_efd -lrte_distributor -lrte_cfgfile -lrte_bitratestats
> -lrte_metrics -lrte_kvargs -lrte_eal -lrte_ring -lrte_mempool
> -lrte_mbuf -lrte_pci -lrte_cryptodev -lrte_net -lrte_cmdline
> -lrte_ethdev -lrte_hash -lrte_timer -lrte_common_dpaax -lrte_eventdev
> -lrte_rawdev -lrte_bus_dpaa -lrte_bus_fslmc -lrte_bus_pci
> -lrte_common_octeontx -lrte_bus_vdev -lrte_meter -lrte_sched
> -lrte_ip_frag -lrte_mempool_dpaa -lrte_mempool_dpaa2 -lrte_vhost
> -lrte_security -lrte_kni -lmlx4 -lmnl -lmlx5 -libverbs
> -lrte_bus_vmbus -lrte_mempool_octeontx -lrte_port -lrte_lpm -lrte_acl
> -lrte_table -lrte_pipeline -lrte_gso -lIPSec_MB -lrte_common_cpt
> -lrte_reorder -lrte_compressdev -lrte_pmd_dpaa -lrte_pmd_dpaa2
> -lrte_pmd_dpaa2_sec -lrte_pmd_octeontx -lrte_bbdev -lrte_bus_ifpga
> -lrte_mempool_bucket -lrte_mempool_ring -lrte_mempool_stack
> -lrte_pmd_af_packet -lrte_pmd_ark -lrte_pmd_atlantic -lrte_pmd_avf
> -lrte_pmd_avp -lrte_pmd_axgbe -lrte_pmd_bond -lrte_pmd_bnx2x
> -lrte_pmd_bnxt -lrte_pmd_cxgbe -lrte_pmd_e1000 -lrte_pmd_ena
> -lrte_pmd_enetc -lrte_pmd_enic -lrte_pmd_failsafe -lrte_pmd_fm10k
> -lrte_pmd_i40e -lrte_pmd_ifc -lrte_pmd_ixgbe -lrte_pmd_kni
> -lrte_pmd_liquidio -lrte_pmd_mlx4 -lrte_pmd_mlx5 -lrte_pmd_netvsc
> -lrte_pmd_nfp -lrte_pmd_null -lrte_pmd_pcap -lrte_pmd_qede
> -lrte_pmd_ring -lrte_pmd_sfc -lrte_pmd_softnic -lrte_pmd_tap
> -lrte_pmd_thunderx -lrte_pmd_vdev_netvsc -lrte_pmd_vhost
> -lrte_pmd_virtio -lrte_pmd_vmxnet3 -lrte_pmd_aesni_gcm
> -lrte_pmd_aesni_mb -lrte_pmd_caam_jr -lrte_pmd_ccp -lrte_pmd_dpaa_sec
> -lrte_pmd_null_crypto -lrte_pmd_octeontx_crypto -lrte_pmd_openssl
> -lrte_pmd_crypto_scheduler -lrte_pmd_virtio_crypto
> -lrte_pmd_octeontx_compress -lrte_pmd_qat -lrte_pmd_zlib
> -lrte_pmd_dpaa_event -lrte_pmd_dpaa2_event -lrte_pmd_octeontx_event
> -lrte_pmd_opdl_event -lrte_pmd_skeleton_event -lrte_pmd_sw_event
> -lrte_pmd_dsw_event -lrte_pmd_bbdev_null -lrte_pmd_skeleton_rawdev
> -lrte_pmd_dpaa2_cmdif -lrte_pmd_dpaa2_qdma -lrte_pmd_ifpga_rawdev -lm
> -lnuma -lbsd -lpcap -lcrypto -ldl -lz -pthread
Hi,

Strange that libtool is messing things up, I've used the same pkgconfig
file in a few different projects that use autoconf/automake and I
haven't seen this issue.

I had a look on github, and it does not seem that odp is currently
using pkg-config, but rather doing some manual check - is there a
branch in a fork or a patch you could point me to so that I can try to
reproduce?

--
Kind regards,
Luca Boccassi

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Bug#917984: [Pkg-dpdk-devel] Bug#917984: Can not link ODP with newer DPDK

Dmitry Eremin-Solenikov
Hello,

ср, 2 янв. 2019 г. в 14:49, Luca Boccassi <[hidden email]>:
>
> On Wed, 2019-01-02 at 01:43 +0300, Dmitry Eremin-Solenikov wrote:
> Strange that libtool is messing things up, I've used the same pkgconfig
> file in a few different projects that use autoconf/automake and I
> haven't seen this issue.

libtool rearranges/squashes linking flags in an attempt to find 'better'
linking flags. Unfortunately this fail for DPDK. We have worked around
this by squashing all PMDs into a single gcc argument:
-Wl,--whole-archive,-lrte_pmd_af_packet,-lrte_pmd_ark,........,-lrte_pmd_vmxnet3_uio,--no-whole-archive
-ldpdk

Thus libtool won't move PMDs from --whole-archive/--no-whole-archive brackets.

> I had a look on github, and it does not seem that odp is currently
> using pkg-config, but rather doing some manual check - is there a
> branch in a fork or a patch you could point me to so that I can try to
> reproduce?

No, I have not pushed my code to github yet. The easies way to reproduce
is to statically link a sample program with libtool and check that generated
ELF contains all PMDs.

--
With best wishes
Dmitry

Reply | Threaded
Open this post in threaded view
|

Bug#917984: [Pkg-dpdk-devel] Bug#917984: Can not link ODP with newer DPDK

Luca Boccassi-3
On Wed, 2019-01-02 at 14:55 +0300, Dmitry Eremin-Solenikov wrote:

> Hello,
>
> ср, 2 янв. 2019 г. в 14:49, Luca Boccassi <[hidden email]>:
> >
> > On Wed, 2019-01-02 at 01:43 +0300, Dmitry Eremin-Solenikov wrote:
> > Strange that libtool is messing things up, I've used the same
> > pkgconfig
> > file in a few different projects that use autoconf/automake and I
> > haven't seen this issue.
>
> libtool rearranges/squashes linking flags in an attempt to find
> 'better'
> linking flags. Unfortunately this fail for DPDK. We have worked
> around
> this by squashing all PMDs into a single gcc argument:
> -Wl,--whole-archive,-lrte_pmd_af_packet,-lrte_pmd_ark,........,-
> lrte_pmd_vmxnet3_uio,--no-whole-archive
> -ldpdk
>
> Thus libtool won't move PMDs from --whole-archive/--no-whole-archive
> brackets.
>
> > I had a look on github, and it does not seem that odp is currently
> > using pkg-config, but rather doing some manual check - is there a
> > branch in a fork or a patch you could point me to so that I can try
> > to
> > reproduce?
>
> No, I have not pushed my code to github yet. The easies way to
> reproduce
> is to statically link a sample program with libtool and check that
> generated
> ELF contains all PMDs.
That looks like a very very old libtool bug:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=347650

Have you tried patching config/ltmain.sh as it's suggested on that bug?
Something like:

--- a/config/ltmain.sh
+++ b/config/ltmain.sh
@@ -4716,6 +4716,11 @@ func_mode_link ()
  arg=$func_stripname_result
  ;;
 
+      -Wl,--as-needed|-Wl,--no-as-needed|-Wl,--whole-archive|-Wl,--no-whole-archive)
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
       -Wl,*)
  func_stripname '-Wl,' '' "$arg"
  args=$func_stripname_result
@@ -5067,6 +5072,15 @@ func_mode_link ()
  lib=
  found=false
  case $deplib in
+ -Wl,--as-needed|-Wl,--no-as-needed|-Wl,--whole-archive|-Wl,--no-whole-archive)
+  if test "$linkmode,$pass" = "prog,link"; then
+    compile_deplibs="$deplib $compile_deplibs"
+    finalize_deplibs="$deplib $finalize_deplibs"
+  else
+    deplibs="$deplib $deplibs"
+  fi
+  continue
+  ;;
  -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
         |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
   if test prog,link = "$linkmode,$pass"; then

Note that the current version of Meson does not do a good job of
generating the pkg-config file, but it's fixed in the version in
development. I also found a couple of bugs in dpdk. So the following
content for libdpdk.pc is more correct:

prefix=/usr
libdir=${prefix}/lib/x86_64-linux-gnu
includedir=${prefix}/include/dpdk

Name: DPDK
Description: The Data Plane Development Kit (DPDK)
Version: 18.11.0
Requires.private: libbsd, zlib, libmnl, libmlx4, libibverbs, libmlx5, libcrypto, jansson, libelf
Libs: -L${libdir} -lrte_telemetry -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_vhost -lrte_security -lrte_sched -lrte_reorder -lrte_rawdev -lrte_pdump -lrte_power -lrte_meter -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag -lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrte_metrics -lrte_pci -lrte_ethdev -lrte_net -lrte_mbuf -lrte_mempool -lrte_ring -lrte_eal -lrte_kvargs -lrte_cmdline
Libs.private: -Wl,--whole-archive -L${libdir} -lrte_common_cpt -lrte_common_dpaax -lrte_common_octeontx -lrte_bus_dpaa -lrte_bus_fslmc -lrte_bus_ifpga -lrte_bus_pci -lrte_bus_vdev -lrte_bus_vmbus -lrte_mempool_bucket -lrte_mempool_dpaa -lrte_mempool_dpaa2 -lrte_mempool_octeontx -lrte_mempool_ring -lrte_mempool_stack -lrte_pmd_af_packet -lrte_pmd_ark -lrte_pmd_atlantic -lrte_pmd_avf -lrte_pmd_avp -lrte_pmd_axgbe -lrte_pmd_bond -lrte_pmd_bnx2x -lrte_pmd_bnxt -lrte_pmd_cxgbe -lrte_pmd_dpaa -lrte_pmd_dpaa2 -lrte_pmd_e1000 -lrte_pmd_ena -lrte_pmd_enetc -lrte_pmd_enic -lrte_pmd_failsafe -lrte_pmd_fm10k -lrte_pmd_i40e -lrte_pmd_ifc -lrte_pmd_ixgbe -lrte_pmd_kni -lrte_pmd_liquidio -lrte_pmd_mlx4 -lrte_pmd_mlx5 -lrte_pmd_netvsc -lrte_pmd_nfp -lrte_pmd_null -lrte_pmd_octeontx -lrte_pmd_pcap -lrte_pmd_qede -lrte_pmd_ring -lrte_pmd_sfc -lrte_pmd_softnic -lrte_pmd_tap -lrte_pmd_thunderx -lrte_pmd_vdev_netvsc -lrte_pmd_vhost -lrte_pmd_virtio -lrte_pmd_vmxnet3 -lrte_pmd_aesni_gcm -lrte_pmd_aesni_mb -lrte_pmd_caam_jr -lrte_pmd_ccp -lrte_pmd_dpaa_sec -lrte_pmd_dpaa2_sec -lrte_pmd_null_crypto -lrte_pmd_octeontx_crypto -lrte_pmd_openssl -lrte_pmd_crypto_scheduler -lrte_pmd_virtio_crypto -lrte_pmd_octeontx_compress -lrte_pmd_qat -lrte_pmd_zlib -lrte_pmd_dpaa_event -lrte_pmd_dpaa2_event -lrte_pmd_octeontx_event -lrte_pmd_opdl_event -lrte_pmd_skeleton_event -lrte_pmd_sw_event -lrte_pmd_dsw_event -lrte_pmd_bbdev_null -lrte_pmd_skeleton_rawdev -lrte_pmd_dpaa2_cmdif -lrte_pmd_dpaa2_qdma -lrte_pmd_ifpga_rawdev -Wl,--no-whole-archive -lrte_telemetry -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_vhost -lrte_security -lrte_sched -lrte_reorder -lrte_rawdev -lrte_pdump -lrte_power -lrte_meter -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag -lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrte_metrics -lrte_pci -lrte_ethdev -lrte_net -lrte_mbuf -lrte_mempool -lrte_ring -lrte_eal -lrte_kvargs -lrte_cmdline -Wl,-Bdynamic -Wl,--no-as-needed -pthread -lm -ldl -lnuma -lz -lIPSec_MB -lIPSec_MB -lpcap
Cflags: -I${includedir}/../x86_64-linux-gnu/dpdk -I${includedir} -include rte_config.h -march=corei7

With that I can manually do a static link (without using libtool).

--
Kind regards,
Luca Boccassi

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Bug#917984: [Pkg-dpdk-devel] Bug#917984: Bug#917984: Can not link ODP with newer DPDK

Dmitry Eremin-Solenikov
Hello,

чт, 3 янв. 2019 г. в 02:09, Luca Boccassi <[hidden email]>:

> On Wed, 2019-01-02 at 14:55 +0300, Dmitry Eremin-Solenikov wrote:
> > ср, 2 янв. 2019 г. в 14:49, Luca Boccassi <[hidden email]>:
> > > On Wed, 2019-01-02 at 01:43 +0300, Dmitry Eremin-Solenikov wrote:
> > > Strange that libtool is messing things up, I've used the same
> > > pkgconfig
> > > file in a few different projects that use autoconf/automake and I
> > > haven't seen this issue.
> >
> > libtool rearranges/squashes linking flags in an attempt to find
> > 'better'
> > linking flags. Unfortunately this fail for DPDK. We have worked
> > around
> > this by squashing all PMDs into a single gcc argument:
> > -Wl,--whole-archive,-lrte_pmd_af_packet,-lrte_pmd_ark,........,-
> > lrte_pmd_vmxnet3_uio,--no-whole-archive
> > -ldpdk
> >
> > Thus libtool won't move PMDs from --whole-archive/--no-whole-archive
> > brackets.
> >
> > > I had a look on github, and it does not seem that odp is currently
> > > using pkg-config, but rather doing some manual check - is there a
> > > branch in a fork or a patch you could point me to so that I can try
> > > to
> > > reproduce?
> >
> > No, I have not pushed my code to github yet. The easies way to
> > reproduce
> > is to statically link a sample program with libtool and check that
> > generated
> > ELF contains all PMDs.
>
> That looks like a very very old libtool bug:
>
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=347650
>
> Have you tried patching config/ltmain.sh as it's suggested on that bug?

I can try doing that as a test, but I wouldn't like to have patched ltmain.sh
in the source tree.

> Something like:

[patch skipped]

> Note that the current version of Meson does not do a good job of
> generating the pkg-config file, but it's fixed in the version in
> development. I also found a couple of bugs in dpdk. So the following
> content for libdpdk.pc is more correct:

[libdpdk.pc skipped]

Do you plan to upload fixed dpdk packages?

> With that I can manually do a static link (without using libtool).

Good!

BTW: Is there any chance to get libdpdk.a back? We can then work
on fixing linking with libdpdk.pc as the time permits. Note: according
to README.md the 'official' DPDK build is one done using GNU Make
and this build has libdpdk.a instead of libdpdk.pc.

--
With best wishes
Dmitry

Reply | Threaded
Open this post in threaded view
|

Bug#917984: [Pkg-dpdk-devel] Bug#917984: Bug#917984: Bug#917984: Can not link ODP with newer DPDK

Luca Boccassi-3
On Thu, 2019-01-03 at 02:29 +0300, Dmitry Eremin-Solenikov wrote:

> Hello,
>
> чт, 3 янв. 2019 г. в 02:09, Luca Boccassi <[hidden email]>:
> > On Wed, 2019-01-02 at 14:55 +0300, Dmitry Eremin-Solenikov wrote:
> > > ср, 2 янв. 2019 г. в 14:49, Luca Boccassi <[hidden email]>:
> > > > On Wed, 2019-01-02 at 01:43 +0300, Dmitry Eremin-Solenikov
> > > > wrote:
> > > > Strange that libtool is messing things up, I've used the same
> > > > pkgconfig
> > > > file in a few different projects that use autoconf/automake and
> > > > I
> > > > haven't seen this issue.
> > >
> > > libtool rearranges/squashes linking flags in an attempt to find
> > > 'better'
> > > linking flags. Unfortunately this fail for DPDK. We have worked
> > > around
> > > this by squashing all PMDs into a single gcc argument:
> > > -Wl,--whole-archive,-lrte_pmd_af_packet,-lrte_pmd_ark,........,-
> > > lrte_pmd_vmxnet3_uio,--no-whole-archive
> > > -ldpdk
> > >
> > > Thus libtool won't move PMDs from --whole-archive/--no-whole-
> > > archive
> > > brackets.
> > >
> > > > I had a look on github, and it does not seem that odp is
> > > > currently
> > > > using pkg-config, but rather doing some manual check - is there
> > > > a
> > > > branch in a fork or a patch you could point me to so that I can
> > > > try
> > > > to
> > > > reproduce?
> > >
> > > No, I have not pushed my code to github yet. The easies way to
> > > reproduce
> > > is to statically link a sample program with libtool and check
> > > that
> > > generated
> > > ELF contains all PMDs.
> >
> > That looks like a very very old libtool bug:
> >
> > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=347650
> >
> > Have you tried patching config/ltmain.sh as it's suggested on that
> > bug?
>
> I can try doing that as a test, but I wouldn't like to have patched
> ltmain.sh
> in the source tree.
Another workaround has been suggested and I've verified that it works:
parse the output of pkg-config --libs --static libdpdk and change the
string "-Wl,--whole-archive -lrte_pmdfoo -lrte_pmdbar ... -Wl,--no-
whole-archive" intoto "-Wl,--whole-archive,-lrte_pmdfoo,-
lrte_pmdbar,...,--no-whole-archive"

Basically, trick libtool into thinking that it's a single linker flag:

libtool --mode=link --tag=CC gcc test.o -o a.out -lrte_telemetry -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_vhost -lrte_security -lrte_sched -lrte_reorder -lrte_rawdev -lrte_pdump -lrte_power -lrte_meter -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag -lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrte_metrics -lrte_pci -lrte_ethdev -lrte_net -lrte_mbuf -lrte_mempool -lrte_ring -lrte_eal -lrte_kvargs -lrte_cmdline -Wl,--whole-archive,-lrte_common_cpt,-lrte_common_dpaax,-lrte_common_octeontx,-lrte_bus_dpaa,-lrte_bus_fslmc,-lrte_bus_ifpga,-lrte_bus_pci,-lrte_bus_vdev,-lrte_bus_vmbus,-lrte_mempool_bucket,-lrte_mempool_dpaa,-lrte_mempool_dpaa2,-lrte_mempool_octeontx,-lrte_mempool_ring,-lrte_mempool_stack,-lrte_pmd_af_packet,-lrte_pmd_ark,-lrte_pmd_atlantic,-lrte_pmd_avf,-lrte_pmd_avp,-lrte_pmd_axgbe,-lrte_pmd_bond,-lrte_pmd_bnx2x,-lrte_pmd_bnxt,-lrte_pmd_cxgbe,-lrte_pmd_dpaa,-lrte_pmd_dpaa2,-lrte_pmd_e1000,-lrte_pmd_ena,-lrte_pmd_enetc,-lrte_pmd_enic,-lrte_pmd_failsafe,-lrte_pmd_fm10k,-lrte_pmd_i40e,-lrte_pmd_ifc,-lrte_pmd_ixgbe,-lrte_pmd_kni,-lrte_pmd_liquidio,-lrte_pmd_mlx4,-lrte_pmd_mlx5,-lrte_pmd_netvsc,-lrte_pmd_nfp,-lrte_pmd_null,-lrte_pmd_octeontx,-lrte_pmd_pcap,-lrte_pmd_qede,-lrte_pmd_ring,-lrte_pmd_sfc,-lrte_pmd_softnic,-lrte_pmd_tap,-lrte_pmd_thunderx,-lrte_pmd_vdev_netvsc,-lrte_pmd_vhost,-lrte_pmd_virtio,-lrte_pmd_vmxnet3,-lrte_pmd_aesni_gcm,-lrte_pmd_aesni_mb,-lrte_pmd_caam_jr,-lrte_pmd_ccp,-lrte_pmd_dpaa_sec,-lrte_pmd_dpaa2_sec,-lrte_pmd_null_crypto,-lrte_pmd_octeontx_crypto,-lrte_pmd_openssl,-lrte_pmd_crypto_scheduler,-lrte_pmd_virtio_crypto,-lrte_pmd_octeontx_compress,-lrte_pmd_qat,-lrte_pmd_zlib,-lrte_pmd_dpaa_event,-lrte_pmd_dpaa2_event,-lrte_pmd_octeontx_event,-lrte_pmd_opdl_event,-lrte_pmd_skeleton_event,-lrte_pmd_sw_event,-lrte_pmd_dsw_event,-lrte_pmd_bbdev_null,-lrte_pmd_skeleton_rawdev,-lrte_pmd_dpaa2_cmdif,-lrte_pmd_dpaa2_qdma,-lrte_pmd_ifpga_rawdev,--no-whole-archive -lrte_telemetry -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_vhost -lrte_security -lrte_sched -lrte_reorder -lrte_rawdev -lrte_pdump -lrte_power -lrte_meter -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag -lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrte_metrics -lrte_pci -lrte_ethdev -lrte_net -lrte_mbuf -lrte_mempool -lrte_ring -lrte_eal -lrte_kvargs -lrte_cmdline -Wl,-Bdynamic -Wl,--no-as-needed -pthread -lm -ldl -lnuma -lz -lIPSec_MB -lpcap -lbsd -lmnl -lmlx4 -lpthread -lmlx5 -lpthread -libverbs -lbnxt_re-rdmav21 -lcxgb3-rdmav21 -lcxgb4-rdmav21 -lhns-rdmav21 -li40iw-rdmav21 -lmlx4 -lmlx5 -lmthca-rdmav21 -lnes-rdmav21 -locrdma-rdmav21 -lqedr-rdmav21 -lvmw_pvrdma-rdmav21 -lhfi1verbs-rdmav21 -lipathverbs-rdmav21 -lrxe-rdmav21 -libverbs -lpthread -lnl-route-3 -lnl-3 -lcrypto -ldl -pthread -ljansson -lelf -lz -all-static
libtool: link: gcc test.o -o a.out -Wl,--whole-archive -Wl,-lrte_common_cpt -Wl,-lrte_common_dpaax -Wl,-lrte_common_octeontx -Wl,-lrte_bus_dpaa -Wl,-lrte_bus_fslmc -Wl,-lrte_bus_ifpga -Wl,-lrte_bus_pci -Wl,-lrte_bus_vdev -Wl,-lrte_bus_vmbus -Wl,-lrte_mempool_bucket -Wl,-lrte_mempool_dpaa -Wl,-lrte_mempool_dpaa2 -Wl,-lrte_mempool_octeontx -Wl,-lrte_mempool_ring -Wl,-lrte_mempool_stack -Wl,-lrte_pmd_af_packet -Wl,-lrte_pmd_ark -Wl,-lrte_pmd_atlantic -Wl,-lrte_pmd_avf -Wl,-lrte_pmd_avp -Wl,-lrte_pmd_axgbe -Wl,-lrte_pmd_bond -Wl,-lrte_pmd_bnx2x -Wl,-lrte_pmd_bnxt -Wl,-lrte_pmd_cxgbe -Wl,-lrte_pmd_dpaa -Wl,-lrte_pmd_dpaa2 -Wl,-lrte_pmd_e1000 -Wl,-lrte_pmd_ena -Wl,-lrte_pmd_enetc -Wl,-lrte_pmd_enic -Wl,-lrte_pmd_failsafe -Wl,-lrte_pmd_fm10k -Wl,-lrte_pmd_i40e -Wl,-lrte_pmd_ifc -Wl,-lrte_pmd_ixgbe -Wl,-lrte_pmd_kni -Wl,-lrte_pmd_liquidio -Wl,-lrte_pmd_mlx4 -Wl,-lrte_pmd_mlx5 -Wl,-lrte_pmd_netvsc -Wl,-lrte_pmd_nfp -Wl,-lrte_pmd_null -Wl,-lrte_pmd_octeontx -Wl,-lrte_pmd_pcap -Wl,-lrte_pmd_qede -Wl,-lrte_pmd_ring -Wl,-lrte_pmd_sfc -Wl,-lrte_pmd_softnic -Wl,-lrte_pmd_tap -Wl,-lrte_pmd_thunderx -Wl,-lrte_pmd_vdev_netvsc -Wl,-lrte_pmd_vhost -Wl,-lrte_pmd_virtio -Wl,-lrte_pmd_vmxnet3 -Wl,-lrte_pmd_aesni_gcm -Wl,-lrte_pmd_aesni_mb -Wl,-lrte_pmd_caam_jr -Wl,-lrte_pmd_ccp -Wl,-lrte_pmd_dpaa_sec -Wl,-lrte_pmd_dpaa2_sec -Wl,-lrte_pmd_null_crypto -Wl,-lrte_pmd_octeontx_crypto -Wl,-lrte_pmd_openssl -Wl,-lrte_pmd_crypto_scheduler -Wl,-lrte_pmd_virtio_crypto -Wl,-lrte_pmd_octeontx_compress -Wl,-lrte_pmd_qat -Wl,-lrte_pmd_zlib -Wl,-lrte_pmd_dpaa_event -Wl,-lrte_pmd_dpaa2_event -Wl,-lrte_pmd_octeontx_event -Wl,-lrte_pmd_opdl_event -Wl,-lrte_pmd_skeleton_event -Wl,-lrte_pmd_sw_event -Wl,-lrte_pmd_dsw_event -Wl,-lrte_pmd_bbdev_null -Wl,-lrte_pmd_skeleton_rawdev -Wl,-lrte_pmd_dpaa2_cmdif -Wl,-lrte_pmd_dpaa2_qdma -Wl,-lrte_pmd_ifpga_rawdev -Wl,--no-whole-archive -Wl,-Bdynamic -Wl,--no-as-needed -pthread -pthread -static  -lrte_telemetry -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_vhost -lrte_security -lrte_sched -lrte_reorder -lrte_rawdev -lrte_pdump -lrte_power -lrte_meter -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag -lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrte_metrics -lrte_pci -lrte_ethdev -lrte_net -lrte_mbuf -lrte_mempool -lrte_ring -lrte_eal -lrte_kvargs -lrte_cmdline -lm -lnuma -lIPSec_MB -lpcap -lbsd -lmnl -lbnxt_re-rdmav21 -lcxgb3-rdmav21 -lcxgb4-rdmav21 -lhns-rdmav21 -li40iw-rdmav21 -lmlx4 -lmlx5 -lmthca-rdmav21 -lnes-rdmav21 -locrdma-rdmav21 -lqedr-rdmav21 -lvmw_pvrdma-rdmav21 -lhfi1verbs-rdmav21 -lipathverbs-rdmav21 -lrxe-rdmav21 -libverbs -lpthread -lnl-route-3 -lnl-3 -lcrypto -ldl -ljansson -lelf -lz -pthread

I'll see if I can get meson to generate that directly, but I don't
think it's possible from what I can see, so I'd suggest to employ one
of these workarounds. Or drop libtool :-)

> > Something like:
>
> [patch skipped]
>
> > Note that the current version of Meson does not do a good job of
> > generating the pkg-config file, but it's fixed in the version in
> > development. I also found a couple of bugs in dpdk. So the
> > following
> > content for libdpdk.pc is more correct:
>
> [libdpdk.pc skipped]
>
> Do you plan to upload fixed dpdk packages?
Yes, I'll push the changes upstream and backport them sometimes within
the next couple of days.

> > With that I can manually do a static link (without using libtool).
>
> Good!
>
> BTW: Is there any chance to get libdpdk.a back? We can then work
> on fixing linking with libdpdk.pc as the time permits. Note:
> according
> to README.md the 'official' DPDK build is one done using GNU Make
> and this build has libdpdk.a instead of libdpdk.pc.

The linker script and single archive were a bit of a hack and are not
planned to be supported under Meson as far as I'm aware, so I'm afraid
not.

--
Kind regards,
Luca Boccassi

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Bug#917984: [Pkg-dpdk-devel] Bug#917984: Bug#917984: Bug#917984: Bug#917984: Can not link ODP with newer DPDK

Luca Boccassi-3
On Thu, 2019-01-03 at 13:26 +0100, Luca Boccassi wrote:

> On Thu, 2019-01-03 at 02:29 +0300, Dmitry Eremin-Solenikov wrote:
> > Hello,
> >
> > чт, 3 янв. 2019 г. в 02:09, Luca Boccassi <[hidden email]>:
> > > On Wed, 2019-01-02 at 14:55 +0300, Dmitry Eremin-Solenikov wrote:
> > > > ср, 2 янв. 2019 г. в 14:49, Luca Boccassi <[hidden email]>:
> > > > > On Wed, 2019-01-02 at 01:43 +0300, Dmitry Eremin-Solenikov
> > > > > wrote:
> > > > > Strange that libtool is messing things up, I've used the same
> > > > > pkgconfig
> > > > > file in a few different projects that use autoconf/automake
> > > > > and
> > > > > I
> > > > > haven't seen this issue.
> > > >
> > > > libtool rearranges/squashes linking flags in an attempt to find
> > > > 'better'
> > > > linking flags. Unfortunately this fail for DPDK. We have worked
> > > > around
> > > > this by squashing all PMDs into a single gcc argument:
> > > > -Wl,--whole-archive,-lrte_pmd_af_packet,-
> > > > lrte_pmd_ark,........,-
> > > > lrte_pmd_vmxnet3_uio,--no-whole-archive
> > > > -ldpdk
> > > >
> > > > Thus libtool won't move PMDs from --whole-archive/--no-whole-
> > > > archive
> > > > brackets.
> > > >
> > > > > I had a look on github, and it does not seem that odp is
> > > > > currently
> > > > > using pkg-config, but rather doing some manual check - is
> > > > > there
> > > > > a
> > > > > branch in a fork or a patch you could point me to so that I
> > > > > can
> > > > > try
> > > > > to
> > > > > reproduce?
> > > >
> > > > No, I have not pushed my code to github yet. The easies way to
> > > > reproduce
> > > > is to statically link a sample program with libtool and check
> > > > that
> > > > generated
> > > > ELF contains all PMDs.
> > >
> > > That looks like a very very old libtool bug:
> > >
> > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=347650
> > >
> > > Have you tried patching config/ltmain.sh as it's suggested on
> > > that
> > > bug?
> >
> > I can try doing that as a test, but I wouldn't like to have patched
> > ltmain.sh
> > in the source tree.
>
> Another workaround has been suggested and I've verified that it
> works:
> parse the output of pkg-config --libs --static libdpdk and change the
> string "-Wl,--whole-archive -lrte_pmdfoo -lrte_pmdbar ... -Wl,--no-
> whole-archive" intoto "-Wl,--whole-archive,-lrte_pmdfoo,-
> lrte_pmdbar,...,--no-whole-archive"
>
> Basically, trick libtool into thinking that it's a single linker
> flag:
>
> > > Something like:
> >
> > [patch skipped]
> >
> > > Note that the current version of Meson does not do a good job of
> > > generating the pkg-config file, but it's fixed in the version in
> > > development. I also found a couple of bugs in dpdk. So the
> > > following
> > > content for libdpdk.pc is more correct:
> >
> > [libdpdk.pc skipped]
> >
> > Do you plan to upload fixed dpdk packages?
>
> Yes, I'll push the changes upstream and backport them sometimes
> within
> the next couple of days.
I've uploaded that in the past couple of days, the pkg-config file now
lists everything needed for static builds and uses Requires.private for
recursive dependencies.

Note that on amd64 libdpdk-dev is missing a dependency on libipsec-mb-
dev, this will be fixed in the next upload.

--
Kind regards,
Luca Boccassi

signature.asc (499 bytes) Download Attachment