On Tue, Nov 10, 2020 at 4:02 AM Jiang, Cheng1 <cheng1.ji...@intel.com> wrote: > > - This series breaks external compilation, as the external Makefile was not > > updated. > > > > I'm not sure I understand what you mean by external Makefile, because as far > as I know, makefile has been deprecated.
make support is dropped for dpdk compilation itself. For the examples, the users will use make to compile them, as this is the only way provided to users *out of* dpdk. But the examples are compiled too via meson when compiling dpdk itself if you pass -Dexamples= options. Bruce, I want to avoid more misses like this one. If we want to keep the examples compilation in meson, we need a consistent framework to compile in both cases. Right now, we don't export meson for examples, and it makes no sense in their current form. It seems simpler to me to only maintain make support, and meson can still call make for each example. Another solution is to rely only on test-meson-builds.sh, but then it ends up on the maintainer shoulders, so I prefer the solution above. Other ideas? Cheng, For the problem on vhost, there are different ways to reproduce, but the simpler for now is: $ meson --default-library=shared builddir $ ninja-build -C builddir -j4 $ export DESTDIR=$(pwd)/installdir $ ninja-build -C builddir -j4 install $ export PKG_CONFIG_PATH=$(dirname $(find $DESTDIR -name libdpdk.pc)):$PKG_CONFIG_PATH $ export LD_LIBRARY_PATH=$(dirname $(find $DESTDIR -name librte_eal.so)):$LD_LIBRARY_PATH $ export PKGCONF="pkg-config --define-prefix" $ make -C $DESTDIR/usr/local/share/dpdk/examples/vhost clean shared static ... rm -f build/vhost-switch build/vhost-switch-static build/vhost-switch-shared test -d build && rmdir -p build || true cc -O3 -I.../installdir/usr/local/include -include rte_config.h -march=native -I/usr/usr/include -DALLOW_EXPERIMENTAL_API main.c virtio_net.c -o build/vhost-switch-shared -pthread -Wl,--as-needed -L.../installdir/usr/local/lib64 -lrte_node -lrte_graph -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_fib -lrte_ipsec -lrte_vhost -lrte_stack -lrte_security -lrte_sched -lrte_reorder -lrte_rib -lrte_regexdev -lrte_rawdev -lrte_pdump -lrte_power -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_cmdline -lrte_pci -lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_rcu -lrte_ring -lrte_eal -lrte_telemetry -lrte_kvargs -lbsd /usr/bin/ld: /tmp/ccXZVDJk.o: in function `new_device': main.c:(.text+0x173): undefined reference to `ioat_transfer_data_cb' /usr/bin/ld: main.c:(.text+0x178): undefined reference to `ioat_check_completed_copies_cb' /usr/bin/ld: /tmp/ccXZVDJk.o: in function `main': main.c:(.text.startup+0x25e): undefined reference to `open_ioat' collect2: error: ld returned 1 exit status make: *** [Makefile:34: build/vhost-switch-shared] Error 1 > Do you mean I need to update the Makfile in examples/vhost? Yes. > > - This series imposes a dependency on the raw/ioat driver for no reason. > > > > $ meson configure build -Ddisable_drivers=raw/ioat $ ninja-build -C build - > > j4 ... > > examples/meson.build:91:4: ERROR: Problem encountered: Missing > > dependency "raw_ioat" for example "vhost" > > > > The check for the architecture == x86 is wrong. > > The example must check for RTE_RAW_IOAT presence. > > > > As for this issue, I agreed with you. I will fix it by changing the x86 check > into RTE_RAW_IOAT check. Reading the thread again, Maxime had already asked for this change. -- David Marchand