DPDK patches and discussions
 help / color / mirror / Atom feed
From: Gilbert Carrillo <gcarrillo@ampex.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: RE: DPDK 22.11 Troubleshooting
Date: Wed, 3 May 2023 17:25:04 +0000	[thread overview]
Message-ID: <SN7PR20MB61096E1FF0210F1073583DA3B76C9@SN7PR20MB6109.namprd20.prod.outlook.com> (raw)
In-Reply-To: <ZFKXX6o+VNVj1W2v@bricha3-MOBL.ger.corp.intel.com>



-----Original Message-----
From: Bruce Richardson <bruce.richardson@intel.com> 
Sent: Wednesday, May 3, 2023 11:18 AM
To: Gilbert Carrillo <gcarrillo@ampex.com>
Cc: dev@dpdk.org
Subject: Re: DPDK 22.11 Troubleshooting

On Wed, May 03, 2023 at 04:53:20PM +0000, Gilbert Carrillo wrote:
> Make static returns an error (see attached).
> 
> v/R,
> Gilbert
>

To help investigate this issue, can you perhaps include the text of the full build output when you run "make static". On my system I see libelf listed on the linker flags when I run "make static", and things link properly. I'm wondering how my setup may differ from yours.

/Bruce
 
> -----Original Message-----
> From: Bruce Richardson <bruce.richardson@intel.com>
> Sent: Wednesday, May 3, 2023 10:35 AM
> To: Gilbert Carrillo <gcarrillo@ampex.com>
> Cc: dev@dpdk.org
> Subject: Re: DPDK 22.11 Troubleshooting
> 
> On Wed, May 03, 2023 at 04:22:05PM +0000, Gilbert Carrillo wrote:
> > Hi Bruce,
> > 
> > Thank you for the response.
> > 
> > There is no errors when I run the makefile, however I do see a difference in the programs. I don't believe the makefile is linking all the libraries together as intended.
> > 
> > For example, when I run the ethtool sample program and compile it using meson, it works fine and rte_eth_dev_count_avail() returns the correct amount. However, when I compile ethtool with the makefile and run it rte_eth_dev_count_avail() returns 0.
> > 
> 
> Note that by default the meson build will statically link the examples, while the makefile will dynamically load the drivers at runtime. That may explain the difference. Can you try building and running using "make static" rather than just "make".
> 
> /Bruce

Below is the full output after running make static from the ethtool folder in examples.
[root@localhost ethtool]# make static
make -C lib static
make[1]: Entering directory '/home/ampex/dpdk-23.03/dpdk-23.03/examples/ethtool/lib'
cc -O3 -fPIC -DALLOW_EXPERIMENTAL_API -O3 -I/usr/include/dpdk -include rte_config.h -march=corei7 -mno-avx512f  -c rte_ethtool.c -o build/rte_ethtool.c.o
In file included from rte_ethtool.c:7:
rte_ethtool.c: In function 'rte_ethtool_get_drvinfo':
rte_ethtool.c:52:29: warning: implicit declaration of function 'rte_dev_name'; did you mean 'rte_dev_remove'? [-Wimplicit-function-declaration]
  strlcpy(drvinfo->bus_info, rte_dev_name(dev_info.device),
                             ^~~~~~~~~~~~
/usr/include/dpdk/rte_string_fns.h:90:50: note: in definition of macro 'strlcpy'
 #define strlcpy(dst, src, size) rte_strlcpy(dst, src, size)
                                                  ^~~
rte_ethtool.c:52:29: warning: passing argument 2 of 'rte_strlcpy' makes pointer from integer without a cast [-Wint-conversion]
  strlcpy(drvinfo->bus_info, rte_dev_name(dev_info.device),
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/dpdk/rte_string_fns.h:90:50: note: in definition of macro 'strlcpy'
 #define strlcpy(dst, src, size) rte_strlcpy(dst, src, size)
                                                  ^~~
/usr/include/dpdk/rte_string_fns.h:59:36: note: expected 'const char *' but argument is of type 'int'
 rte_strlcpy(char *dst, const char *src, size_t size)
                        ~~~~~~~~~~~~^~~
ar -cr build/librte_ethtool.a build/*.o
make[1]: Leaving directory '/home/ampex/dpdk-23.03/dpdk-23.03/examples/ethtool/lib'
make -C ethtool-app static
make[1]: Entering directory '/home/ampex/dpdk-23.03/dpdk-23.03/examples/ethtool/ethtool-app'
cc -I../lib -O3 -I/usr/include/dpdk -include rte_config.h -march=corei7 -mno-avx512f  -DALLOW_EXPERIMENTAL_API main.c ethapp.c -o build/ethtool-static -L../lib/build -l:librte_ethtool.a -Wl,--whole-archive -l:librte_common_iavf.a -l:librte_bus_auxiliary.a -l:librte_bus_pci.a -l:librte_bus_vdev.a -l:librte_bus_vmbus.a -l:librte_common_mlx5.a -l:librte_mempool_ring.a -l:librte_net_bnxt.a -l:librte_net_e1000.a -l:librte_net_enic.a -l:librte_net_failsafe.a -l:librte_net_i40e.a -l:librte_net_iavf.a -l:librte_net_ice.a -l:librte_net_ixgbe.a -l:librte_net_mlx4.a -l:librte_net_mlx5.a -l:librte_net_netvsc.a -l:librte_net_nfp.a -l:librte_net_qede.a -l:librte_net_ring.a -l:librte_net_tap.a -l:librte_net_vdev_netvsc.a -l:librte_net_vhost.a -l:librte_net_virtio.a -l:librte_node.a -l:librte_graph.a -l:librte_flow_classify.a -l:librte_pipeline.a -l:librte_table.a -l:librte_pdump.a -l:librte_port.a -l:librte_fib.a -l:librte_ipsec.a -l:librte_vhost.a -l:librte_stack.a -l:librte_security.a -l:librte_sched.a -l:librte_reorder.a -l:librte_rib.a -l:librte_dmadev.a -l:librte_regexdev.a -l:librte_rawdev.a -l:librte_pcapng.a -l:librte_member.a -l:librte_lpm.a -l:librte_latencystats.a -l:librte_ip_frag.a -l:librte_gso.a -l:librte_gro.a -l:librte_eventdev.a -l:librte_efd.a -l:librte_distributor.a -l:librte_cryptodev.a -l:librte_compressdev.a -l:librte_cfgfile.a -l:librte_bpf.a -l:librte_bitratestats.a -l:librte_bbdev.a -l:librte_acl.a -l:librte_timer.a -l:librte_hash.a -l:librte_metrics.a -l:librte_cmdline.a -l:librte_pci.a -l:librte_ethdev.a -l:librte_meter.a -l:librte_net.a -l:librte_mbuf.a -l:librte_mempool.a -l:librte_rcu.a -l:librte_ring.a -l:librte_eal.a -l:librte_telemetry.a -l:librte_kvargs.a -Wl,--no-whole-archive -Wl,--export-dynamic -Wl,--as-needed -lrte_node -lrte_graph -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_pdump -lrte_port -lrte_fib -lrte_ipsec -lrte_vhost -lrte_stack -lrte_security -lrte_sched -lrte_reorder -lrte_rib -lrte_dmadev -lrte_regexdev -lrte_rawdev -lrte_pcapng -lrte_member -lrte_lpm -lrte_latencystats -lrte_ip_frag -lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bpf -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrte_metrics -lrte_cmdline -lrte_pci -lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_rcu -lrte_ring -lrte_eal -lrte_telemetry -lrte_kvargs -pthread -lm -ldl -lnuma -lmlx5 -lpthread -lpthread -libverbs -lpthread -lmlx4 -lpthread -libverbs -lpthread 
//usr/local/lib64/librte_bpf.a(bpf_bpf_load_elf.c.o): In function `rte_bpf_elf_load':
bpf_load_elf.c:(.text+0x5e): undefined reference to `elf_version'
bpf_load_elf.c:(.text+0x6e): undefined reference to `elf_begin'
bpf_load_elf.c:(.text+0x79): undefined reference to `elf64_getehdr'
bpf_load_elf.c:(.text+0xc7): undefined reference to `elf_nextscn'
bpf_load_elf.c:(.text+0xdb): undefined reference to `elf64_getshdr'
bpf_load_elf.c:(.text+0xec): undefined reference to `elf_strptr'
bpf_load_elf.c:(.text+0x126): undefined reference to `elf_getdata'
bpf_load_elf.c:(.text+0x14f): undefined reference to `elf_ndxscn'
bpf_load_elf.c:(.text+0x15e): undefined reference to `elf_nextscn'
bpf_load_elf.c:(.text+0x197): undefined reference to `elf_nextscn'
bpf_load_elf.c:(.text+0x1ab): undefined reference to `elf64_getshdr'
bpf_load_elf.c:(.text+0x1c8): undefined reference to `elf_getdata'
bpf_load_elf.c:(.text+0x20e): undefined reference to `elf64_getehdr'
bpf_load_elf.c:(.text+0x21e): undefined reference to `elf_getscn'
bpf_load_elf.c:(.text+0x228): undefined reference to `elf_getdata'
bpf_load_elf.c:(.text+0x2a5): undefined reference to `elf_strptr'
bpf_load_elf.c:(.text+0x3d9): undefined reference to `elf_nextscn'
bpf_load_elf.c:(.text+0x3f5): undefined reference to `elf_end'
bpf_load_elf.c:(.text+0x493): undefined reference to `elf_nextscn'
bpf_load_elf.c:(.text+0x584): undefined reference to `elf_end'
bpf_load_elf.c:(.text+0x5db): undefined reference to `elf_errno'
bpf_load_elf.c:(.text+0x5e4): undefined reference to `elf_errmsg'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:48: build/ethtool-static] Error 1
make[1]: Leaving directory '/home/ampex/dpdk-23.03/dpdk-23.03/examples/ethtool/ethtool-app'
make: *** [Makefile:11: ethtool-app] Error 2

-Gilbert


  reply	other threads:[~2023-05-04  7:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-01 22:27 Gilbert Carrillo
2023-05-03  8:28 ` Bruce Richardson
2023-05-03 16:22   ` Gilbert Carrillo
2023-05-03 16:34     ` Bruce Richardson
2023-05-03 16:53       ` Gilbert Carrillo
2023-05-03 17:13         ` Bruce Richardson
2023-05-03 17:18         ` Bruce Richardson
2023-05-03 17:25           ` Gilbert Carrillo [this message]
2023-05-08 23:26           ` Gilbert Carrillo
2023-05-09  9:42             ` Bruce Richardson
2023-05-09 14:16               ` Gilbert Carrillo
2023-05-09 14:52                 ` Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SN7PR20MB61096E1FF0210F1073583DA3B76C9@SN7PR20MB6109.namprd20.prod.outlook.com \
    --to=gcarrillo@ampex.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).