Open denverfu opened 2 months ago
I have found the reason, please close it.
I checked out the master branch, it works.
I switched the master branch and it still has the same error
The master branch works for me. No luck with the dev branch.
Tested on Ubuntu 22.04, kernel version 5.15
Does it work on 24.04 LTS?
I build f-stack example on ubuntu2310, but failed. The following is the error message: (myenv) dfu@ubuntu2310:/data/f-stack/example$ make cc -O0 -g -gdwarf-2 -I/usr/local/include -include rte_config.h -march=native -I/usr/include/libnl3 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -DINET6 -o "helloworld" main.c -Wl,--whole-archive -L/usr/local/lib/x86_64-linux-gnu -l:librte_common_cpt.a -l:librte_common_dpaax.a -l:librte_common_iavf.a -l:librte_common_idpf.a -l:librte_common_octeontx.a -l:librte_bus_auxiliary.a -l:librte_bus_dpaa.a -l:librte_bus_fslmc.a -l:librte_bus_ifpga.a -l:librte_bus_pci.a -l:librte_bus_vdev.a -l:librte_bus_vmbus.a -l:librte_common_cnxk.a -l:librte_common_mlx5.a -l:librte_common_qat.a -l:librte_common_sfc_efx.a -l:librte_mempool_bucket.a -l:librte_mempool_cnxk.a -l:librte_mempool_dpaa.a -l:librte_mempool_dpaa2.a -l:librte_mempool_octeontx.a -l:librte_mempool_ring.a -l:librte_mempool_stack.a -l:librte_dma_cnxk.a -l:librte_dma_dpaa.a -l:librte_dma_dpaa2.a -l:librte_dma_hisilicon.a -l:librte_dma_idxd.a -l:librte_dma_ioat.a -l:librte_dma_skeleton.a -l:librte_net_af_packet.a -l:librte_net_af_xdp.a -l:librte_net_ark.a -l:librte_net_atlantic.a -l:librte_net_avp.a -l:librte_net_axgbe.a -l:librte_net_bnx2x.a -l:librte_net_bnxt.a -l:librte_net_bond.a -l:librte_net_cnxk.a -l:librte_net_cxgbe.a -l:librte_net_dpaa.a -l:librte_net_dpaa2.a -l:librte_net_e1000.a -l:librte_net_ena.a -l:librte_net_enetc.a -l:librte_net_enetfec.a -l:librte_net_enic.a -l:librte_net_failsafe.a -l:librte_net_fm10k.a -l:librte_net_gve.a -l:librte_net_hinic.a -l:librte_net_hns3.a -l:librte_net_i40e.a -l:librte_net_iavf.a -l:librte_net_ice.a -l:librte_net_idpf.a -l:librte_net_igc.a -l:librte_net_ionic.a -l:librte_net_ixgbe.a -l:librte_net_kni.a -l:librte_net_liquidio.a -l:librte_net_mana.a -l:librte_net_memif.a -l:librte_net_mlx4.a -l:librte_net_mlx5.a -l:librte_net_netvsc.a -l:librte_net_nfp.a -l:librte_net_ngbe.a -l:librte_net_null.a -l:librte_net_octeontx.a -l:librte_net_octeon_ep.a -l:librte_net_pcap.a -l:librte_net_pfe.a -l:librte_net_qede.a -l:librte_net_ring.a -l:librte_net_sfc.a -l:librte_net_softnic.a -l:librte_net_tap.a -l:librte_net_thunderx.a -l:librte_net_txgbe.a -l:librte_net_vdev_netvsc.a -l:librte_net_vhost.a -l:librte_net_virtio.a -l:librte_net_vmxnet3.a -l:librte_raw_cnxk_bphy.a -l:librte_raw_cnxk_gpio.a -l:librte_raw_dpaa2_cmdif.a -l:librte_raw_ntb.a -l:librte_raw_skeleton.a -l:librte_crypto_bcmfs.a -l:librte_crypto_caam_jr.a -l:librte_crypto_ccp.a -l:librte_crypto_cnxk.a -l:librte_crypto_dpaa_sec.a -l:librte_crypto_dpaa2_sec.a -l:librte_crypto_ipsec_mb.a -l:librte_crypto_mlx5.a -l:librte_crypto_nitrox.a -l:librte_crypto_null.a -l:librte_crypto_octeontx.a -l:librte_crypto_openssl.a -l:librte_crypto_scheduler.a -l:librte_crypto_virtio.a -l:librte_compress_mlx5.a -l:librte_compress_octeontx.a -l:librte_compress_zlib.a -l:librte_regex_mlx5.a -l:librte_regex_cn9k.a -l:librte_vdpa_ifc.a -l:librte_vdpa_mlx5.a -l:librte_vdpa_sfc.a -l:librte_event_cnxk.a -l:librte_event_dlb2.a -l:librte_event_dpaa.a -l:librte_event_dpaa2.a -l:librte_event_dsw.a -l:librte_event_opdl.a -l:librte_event_skeleton.a -l:librte_event_sw.a -l:librte_event_octeontx.a -l:librte_baseband_acc.a -l:librte_baseband_fpga_5gnr_fec.a -l:librte_baseband_fpga_lte_fec.a -l:librte_baseband_la12xx.a -l:librte_baseband_null.a -l:librte_baseband_turbo_sw.a -l:librte_node.a -l:librte_graph.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_power.a -l:librte_pcapng.a -l:librte_member.a -l:librte_lpm.a -l:librte_latencystats.a -l:librte_kni.a -l:librte_jobstats.a -l:librte_ip_frag.a -l:librte_gso.a -l:librte_gro.a -l:librte_gpudev.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 -lIPSec_MB -latomic -Wl,--as-needed -lrte_node -lrte_graph -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_power -lrte_pcapng -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag -lrte_gso -lrte_gro -lrte_gpudev -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 -larchive -lbsd -lmd -lmlx5 -libverbs -lbnxt_re-rdmav34 -lcxgb4-rdmav34 -lefa -lerdma-rdmav34 -lhns-rdmav34 -lirdma-rdmav34 -lmana -lmlx4 -lmlx5 -lmthca-rdmav34 -locrdma-rdmav34 -lqedr-rdmav34 -lvmw_pvrdma-rdmav34 -lhfi1verbs-rdmav34 -lipathverbs-rdmav34 -lrxe-rdmav34 -lsiw-rdmav34 -lpthread -lnl-3 -lpthread -libverbs -lbnxt_re-rdmav34 -lcxgb4-rdmav34 -lefa -lerdma-rdmav34 -lhns-rdmav34 -lirdma-rdmav34 -lmlx4 -lmlx5 -lmthca-rdmav34 -locrdma-rdmav34 -lqedr-rdmav34 -lvmw_pvrdma-rdmav34 -lhfi1verbs-rdmav34 -lipathverbs-rdmav34 -lrxe-rdmav34 -lsiw-rdmav34 -libverbs -lpthread -lnl-3 -lpthread -lcrypto -ldl -pthread -lxdp -lelf -pthread -lz -lbpf -pthread -lz -lz -lmana -libverbs -lbnxt_re-rdmav34 -lcxgb4-rdmav34 -lefa -lerdma-rdmav34 -lhns-rdmav34 -lirdma-rdmav34 -lmana -lmlx5 -lmthca-rdmav34 -locrdma-rdmav34 -lqedr-rdmav34 -lvmw_pvrdma-rdmav34 -lhfi1verbs-rdmav34 -lipathverbs-rdmav34 -lrxe-rdmav34 -lsiw-rdmav34 -libverbs -lpthread -lnl-3 -lpthread -lmlx4 -libverbs -lbnxt_re-rdmav34 -lcxgb4-rdmav34 -lefa -lerdma-rdmav34 -lhns-rdmav34 -lirdma-rdmav34 -lmana -lmlx4 -lmlx5 -lmthca-rdmav34 -locrdma-rdmav34 -lqedr-rdmav34 -lvmw_pvrdma-rdmav34 -lhfi1verbs-rdmav34 -lipathverbs-rdmav34 -lrxe-rdmav34 -lsiw-rdmav34 -libverbs -lpthread -lnl-route-3 -lnl-3 -lpthread -lpcap -ldbus-1 -lsystemd -lelf -lz -lzstd -pthread -ljansson -L/data/f-stack/lib -Wl,--whole-archive,-lfstack,--no-whole-archive -Wl,--no-whole-archive -lrt -lm -ldl -lcrypto -pthread -lnuma /usr/bin/ld: /data/f-stack/lib/libfstack.a(ff_thread.o): in function
ff_start_routine': ff_thread.c:(.text+0x11): undefined reference to
pcurthread' /usr/bin/ld: /data/f-stack/lib/libfstack.a(ff_thread.o): in functionff_pthread_create': ff_thread.c:(.text+0x76): undefined reference to
pcurthread' collect2: error: ld returned 1 exit status make: *** [Makefile:21: all] Error 1Context: 1)ubuntu(minimum installation) (myenv) dfu@ubuntu2310:/data/f-stack/example$ uname -a Linux ubuntu2310 6.5.0-44-generic #44-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 7 15:10:09 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux 2)libs sudo apt install -y iputils-ping bc lsof linux-tools-$(uname -r) vim git meson pkg-config autoconf libpcre3-dev automake gcc-12 g++-12 cmake python-is-python3 python3-venv rdma-core libibverbs-dev libxdp-dev libbpf-dev libipsec-mb-dev libsystemd-dev libarchive-dev libbsd-dev libjansson-dev libssl-dev libpcap-dev libelf-dev librdmacm-dev zlib1g-dev build-essential libnuma-dev linux-headers-$(uname -r) 3)dpdk download sudo mkdir -p /data/f-stack sudo chown -R $(whoami):$(whoami) /data/f-stack git clone https://github.com/F-Stack/f-stack.git /data/f-stack cd /data/f-stack git checkout dev 4)dpdk build python3 -m venv /data/f-stack/dpdk/myenv source /data/f-stack/dpdk/myenv/bin/activate pip install pyelftools --upgrade python -c "import pyelftools; print(pyelftools.file)" export PYTHONPATH=$(python -c "import site; print(site.getsitepackages()[0])") cd /data/f-stack/dpdk meson setup -Denable_kmods=true -Ddisable_libs=flow_classify build ninja -C build ninja -C build install 5)install module echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages echo 0 > /proc/sys/kernel/randomize_va_space mkdir /mnt/huge mount -t hugetlbfs nodev /mnt/huge modprobe uio insmod /data/f-stack/dpdk/build/kernel/linux/igb_uio/igb_uio.ko insmod /data/f-stack/dpdk/build/kernel/linux/kni/rte_kni.ko ip link set ens38 down python dpdk-devbind.py --bind=igb_uio ens38 # assuming that use 10GE NIC and eth0 6)f-stack build export FF_PATH=/data/f-stack export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib/pkgconfig cd /data/f-stack/lib/ export CC=gcc-12 make make install 7)example build (myenv) dfu@ubuntu2310:/data/f-stack/example$ export CC=gcc-12 (myenv) dfu@ubuntu2310:/data/f-stack/example$ make