pktgen / Pktgen-DPDK

DPDK based packet generator
Other
388 stars 119 forks source link

Error: Building PktGen using Makefile #268

Closed ldnelson16 closed 4 months ago

ldnelson16 commented 4 months ago

When running sudo make in the main directory, this error is received after cc: error: igc: >>> Use 'make help' for more commands

./tools/pktgen-build.sh build

SDK Path : /home/aveo Install Path : /home/aveo/Pktgen-DPDK Build Directory : /home/aveo/Pktgen-DPDK/builddir Target Directory : usr/local Build Path : /home/aveo/Pktgen-DPDK/builddir Target Path : /home/aveo/Pktgen-DPDK/usr/local

Build and install values: lua_enabled : -Denable_lua=false

Ninja build in '/home/aveo/Pktgen-DPDK/builddir' buildtype=release meson setup -Dbuildtype=release -Denable_lua=false /home/aveo/Pktgen-DPDK/builddir The Meson build system Version: 0.53.2 Source dir: /home/aveo/Pktgen-DPDK Build dir: /home/aveo/Pktgen-DPDK/builddir Build type: native build Program cat found: YES (/bin/cat) Project name: pktgen Project version: 24.05.5 C compiler for the host machine: cc (gcc 9.4.0 "cc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0") C linker for the host machine: cc ld.bfd 2.34 Host machine cpu family: x86_64 Host machine cpu: x86_64 Compiler for C supports arguments -mavx: YES Compiler for C supports arguments -mavx2: YES Compiler for C supports arguments -Wno-pedantic -Wpedantic: YES Compiler for C supports arguments -Wno-format-truncation -Wformat-truncation: YES Found pkg-config: /usr/bin/pkg-config (0.29.1) Found CMake: /usr/bin/cmake (3.16.3) Run-time dependency libfgen found: NO (tried pkgconfig and cmake) Run-time dependency libdpdk found: YES 24.07.0-rc0 Message: prefix: /usr/local libdir: lib/x86_64-linux-gnu Message: DPDK lib path: /usr/local/lib/x86_64-linux-gnu Library rte_net_bond found: YES Program python3 found: YES (/usr/bin/python3) Library rte_net_i40e found: YES Library rte_net_ixgbe found: YES Library rte_net_ice found: YES Library rte_bus_vdev found: YES Run-time dependency threads found: YES Library numa found: YES pcap-config found: YES (/usr/bin/pcap-config) Run-time dependency pcap found: YES 1.9.1 (with TPACKET_V3) Library dl found: YES Library m found: YES Library bsd found: YES Program doxygen found: NO Program sphinx-build found: NO Build targets in project: 9

Found ninja-1.10.0 at /usr/bin/ninja ninja: Entering directory `/home/aveo/Pktgen-DPDK/builddir' [64/64] Linking target app/pktgen. FAILED: app/pktgen cc -o app/pktgen 'app/a172ced@@pktgen@exe/cli-functions.c.o' 'app/a172ced@@pktgen@exe/l2p.c.o' 'app/a172ced@@pktgen@exe/pktgen-arp.c.o' 'app/a172ced@@pktgen@exe/pktgen-capture.c.o' 'app/a172ced@@pktgen@exe/pktgen-cmds.c.o' 'app/a172ced@@pktgen@exe/pktgen-cpu.c.o' 'app/a172ced@@pktgen@exe/pktgen-display.c.o' 'app/a172ced@@pktgen@exe/pktgen-dump.c.o' 'app/a172ced@@pktgen@exe/pktgen-ether.c.o' 'app/a172ced@@pktgen@exe/pktgen-gre.c.o' 'app/a172ced@@pktgen@exe/pktgen-gtpu.c.o' 'app/a172ced@@pktgen@exe/pktgen-ipv4.c.o' 'app/a172ced@@pktgen@exe/pktgen-ipv6.c.o' 'app/a172ced@@pktgen@exe/pktgen-latency.c.o' 'app/a172ced@@pktgen@exe/pktgen-log.c.o' 'app/a172ced@@pktgen@exe/pktgen-main.c.o' 'app/a172ced@@pktgen@exe/pktgen-pcap.c.o' 'app/a172ced@@pktgen@exe/pktgen-port-cfg.c.o' 'app/a172ced@@pktgen@exe/pktgen-random.c.o' 'app/a172ced@@pktgen@exe/pktgen-range.c.o' 'app/a172ced@@pktgen@exe/pktgen-seq.c.o' 'app/a172ced@@pktgen@exe/pktgen-stats.c.o' 'app/a172ced@@pktgen@exe/pktgen-sys.c.o' 'app/a172ced@@pktgen@exe/pktgen-tcp.c.o' 'app/a172ced@@pktgen@exe/pktgen-udp.c.o' 'app/a172ced@@pktgen@exe/pktgen-vlan.c.o' 'app/a172ced@@pktgen@exe/pktgen.c.o' -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -Wl,--start-group lib/common/libcommon.a lib/hmap/libhmap.a lib/utils/libutils.a lib/vec/libvec.a lib/plugin/libplugin.a lib/cli/libcli.a lib/lua/liblua.a -Wl,--as-needed /usr/local/lib/x86_64-linux-gnu/librte_node.so /usr/local/lib/x86_64-linux-gnu/librte_graph.so /usr/local/lib/x86_64-linux-gnu/librte_pipeline.so /usr/local/lib/x86_64-linux-gnu/librte_table.so /usr/local/lib/x86_64-linux-gnu/librte_pdump.so /usr/local/lib/x86_64-linux-gnu/librte_port.so /usr/local/lib/x86_64-linux-gnu/librte_fib.so /usr/local/lib/x86_64-linux-gnu/librte_pdcp.so /usr/local/lib/x86_64-linux-gnu/librte_ipsec.so /usr/local/lib/x86_64-linux-gnu/librte_vhost.so /usr/local/lib/x86_64-linux-gnu/librte_stack.so /usr/local/lib/x86_64-linux-gnu/librte_security.so /usr/local/lib/x86_64-linux-gnu/librte_sched.so /usr/local/lib/x86_64-linux-gnu/librte_reorder.so /usr/local/lib/x86_64-linux-gnu/librte_rib.so /usr/local/lib/x86_64-linux-gnu/librte_mldev.so /usr/local/lib/x86_64-linux-gnu/librte_regexdev.so /usr/local/lib/x86_64-linux-gnu/librte_rawdev.so /usr/local/lib/x86_64-linux-gnu/librte_power.so /usr/local/lib/x86_64-linux-gnu/librte_pcapng.so /usr/local/lib/x86_64-linux-gnu/librte_member.so /usr/local/lib/x86_64-linux-gnu/librte_lpm.so /usr/local/lib/x86_64-linux-gnu/librte_latencystats.so /usr/local/lib/x86_64-linux-gnu/librte_jobstats.so /usr/local/lib/x86_64-linux-gnu/librte_ip_frag.so /usr/local/lib/x86_64-linux-gnu/librte_gso.so /usr/local/lib/x86_64-linux-gnu/librte_gro.so /usr/local/lib/x86_64-linux-gnu/librte_gpudev.so /usr/local/lib/x86_64-linux-gnu/librte_dispatcher.so /usr/local/lib/x86_64-linux-gnu/librte_eventdev.so /usr/local/lib/x86_64-linux-gnu/librte_efd.so /usr/local/lib/x86_64-linux-gnu/librte_dmadev.so /usr/local/lib/x86_64-linux-gnu/librte_distributor.so /usr/local/lib/x86_64-linux-gnu/librte_cryptodev.so /usr/local/lib/x86_64-linux-gnu/librte_compressdev.so /usr/local/lib/x86_64-linux-gnu/librte_cfgfile.so /usr/local/lib/x86_64-linux-gnu/librte_bpf.so /usr/local/lib/x86_64-linux-gnu/librte_bitratestats.so /usr/local/lib/x86_64-linux-gnu/librte_bbdev.so /usr/local/lib/x86_64-linux-gnu/librte_acl.so /usr/local/lib/x86_64-linux-gnu/librte_timer.so /usr/local/lib/x86_64-linux-gnu/librte_hash.so /usr/local/lib/x86_64-linux-gnu/librte_metrics.so /usr/local/lib/x86_64-linux-gnu/librte_cmdline.so /usr/local/lib/x86_64-linux-gnu/librte_pci.so /usr/local/lib/x86_64-linux-gnu/librte_ethdev.so /usr/local/lib/x86_64-linux-gnu/librte_meter.so /usr/local/lib/x86_64-linux-gnu/librte_net.so /usr/local/lib/x86_64-linux-gnu/librte_mbuf.so /usr/local/lib/x86_64-linux-gnu/librte_mempool.so /usr/local/lib/x86_64-linux-gnu/librte_rcu.so /usr/local/lib/x86_64-linux-gnu/librte_ring.so /usr/local/lib/x86_64-linux-gnu/librte_eal.so /usr/local/lib/x86_64-linux-gnu/librte_telemetry.so /usr/local/lib/x86_64-linux-gnu/librte_argparse.so /usr/local/lib/x86_64-linux-gnu/librte_kvargs.so /usr/local/lib/x86_64-linux-gnu/librte_log.so igc lib_rte_igc /usr/lib/x86_64-linux-gnu/libbsd.so /usr/local/lib/x86_64-linux-gnu/librte_net_i40e.so /usr/local/lib/x86_64-linux-gnu/librte_net_ixgbe.so /usr/local/lib/x86_64-linux-gnu/librte_net_ice.so /usr/local/lib/x86_64-linux-gnu/librte_bus_vdev.so -pthread -lnuma -lpcap -ldl -lm -lbsd /usr/local/lib/x86_64-linux-gnu/librte_net_bond.so -Wl,--end-group -Wl,--as-needed igc lib_rte_igc -Wl,--as-needed igc lib_rte_igc -Wl,--as-needed igc lib_rte_igc -Wl,--as-needed igc lib_rte_igc -Wl,--as-needed igc lib_rte_igc -Wl,--as-needed igc lib_rte_igc '-Wl,-rpath,$ORIGIN/../lib/common:$ORIGIN/../lib/hmap:$ORIGIN/../lib/utils:$ORIGIN/../lib/vec:$ORIGIN/../lib/plugin:$ORIGIN/../lib/cli:$ORIGIN/../lib/lua:/usr/local/lib/x86_64-linux-gnu' -Wl,-rpath-link,/home/aveo/Pktgen-DPDK/builddir/lib/common -Wl,-rpath-link,/home/aveo/Pktgen-DPDK/builddir/lib/hmap -Wl,-rpath-link,/home/aveo/Pktgen-DPDK/builddir/lib/utils -Wl,-rpath-link,/home/aveo/Pktgen-DPDK/builddir/lib/vec -Wl,-rpath-link,/home/aveo/Pktgen-DPDK/builddir/lib/plugin -Wl,-rpath-link,/home/aveo/Pktgen-DPDK/builddir/lib/cli -Wl,-rpath-link,/home/aveo/Pktgen-DPDK/builddir/lib/lua -Wl,-rpath-link,/usr/local/lib/x86_64-linux-gnu cc: error: igc: No such file or directory cc: error: lib_rte_igc: No such file or directory cc: error: igc: No such file or directory cc: error: lib_rte_igc: No such file or directory cc: error: igc: No such file or directory cc: error: lib_rte_igc: No such file or directory cc: error: igc: No such file or directory cc: error: lib_rte_igc: No such file or directory cc: error: igc: No such file or directory cc: error: lib_rte_igc: No such file or directory cc: error: igc: No such file or directory cc: error: lib_rte_igc: No such file or directory cc: error: igc: No such file or directory cc: error: lib_rte_igc: No such file or directory ninja: build stopped: subcommand failed. make: *** [Makefile:15: build] Error 1

For some reason, it seems to expect the driver files igc and lib_rte_igc in a certain way. I have reinstalled the igc drivers using rmmod igc && modprobe igc, I am using linux kernel 5.4.0-176-generic, and Ubuntu 20.04, are either of these too old? Any other reasons or roues to look for?

KeithWiles commented 4 months ago

You should not be required to build Pktgen using sudo a simple make build or make rebuild should work.

DPDK needs to be built and installed in the system using the standard DPDK commands i.e, meson setup builddir ninja -C builddir sudo ninja -C builddir install

After DPDK is installed I would use make rebuild in the Pktgen directory. If you had previously built Pktgen using sudo you may be required to remove the build directory as it is owned by root and a normal user will not have permissions.