[dpdk-users] Building app with source in subdirectory ?doesn't work
t-pehous at microsoft.com
Sun Sep 9 20:21:32 CEST 2018
> >I tried debugging the `Makefile` via `make D=1` but it doesn't output any debug
> >information before failing on abovementioned message.
> You need to run "make V=1" in order to get debug messages in the build process,
> and not D=1. I would suggest that you will try again with V=1 and post the log
The "V=1" option only turns it to verbose mode which prints the command that is being run.
Unfortunately due to the way the extapp.rte.mk Makefile is done it doesn't print anything useful.
The "D=1" actually shows what targets are run and why for a dry (i.e. after `make clean`) run. When
(at least the tst.o) is build, however, it simply fails on it with the previously mentioned message without
outputting anything useful.
t-***@***-Virtual-Machine:~/dev/dpdk-18.05/examples/helloworld$ make V=1
mkdir -p /home/t-pehous/dev/dpdk-18.05/examples/helloworld/build
make -C /home/t-pehous/dev/dpdk-18.05/examples/helloworld/build -f /home/t-pehous/dev/dpdk-18.05/examples/helloworld/Makefile \
S=/home/t-pehous/dev/dpdk-18.05/examples/helloworld O=/home/t-pehous/dev/dpdk-18.05/examples/helloworld/build SRCDIR=/home/t-pehous/dev/dpdk-18.05/examples/helloworld
make: Nothing to be done for 'tst.o'.
> Second, where is the Makefile (with SRC-y) that you mentioned located ?
> If I understand correctly, you added the "tst" folder under the root DPDK tree.
No, that's not the case. I added it to the project's root and so the FS structure is following.
|-tst //This is the folder I added
|-tst.c //This is the file I added
And the contents of Makefile are following (the rest is without any changes):
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2010-2014 Intel Corporation
# binary name
APP = helloworld
# all source are stored in SRCS-y | I added the tst/tst.c entry
SRCS-y := main.c \
...the rest of example's makefile
> Third: usually applications are added under the examples folder or the app
> folder, and you can follow recent patches of adding app under examples, unless
> it is mandatory that the tst folder you added will be under the root DPDK folder.
Just to be clear this has nothing to the with the helloworld app / being located within
the examples folder of DPDK's root. Whenever you create a DPDK app _anywhere_,
use the advised way of creating Makefile (i.e. include extapp.rte.mk) and have source file
that you add to SRC-y in a subfolder of current's project root the same issue happens.
I only chose the helloworld example to create a simple repro for you.
Regards Petr Houska
More information about the users