DPDK usage discussions
 help / color / mirror / Atom feed
From: Petr Houska <t-pehous@microsoft.com>
To: Rami Rosen <roszenrami@gmail.com>, "users@dpdk.org" <users@dpdk.org>
Subject: Re: [dpdk-users] Building app with source in subdirectory ?doesn't work
Date: Sun, 9 Sep 2018 18:21:32 +0000	[thread overview]
Message-ID: <CY4PR2101MB0866B292B4A4373CD7A11FA08C060@CY4PR2101MB0866.namprd21.prod.outlook.com> (raw)
In-Reply-To: <CAKoUAr=FAteMyQoSJ-vcfZjimfwAfNFfmsHcrPgrhLhJEMm-yg@mail.gmail.com>

Hi,

> >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
> here.

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[1]: 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.

examples/helloworld
|-main.c
|-Makefile
|-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 \
        tst/tst.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

  reply	other threads:[~2018-09-09 18:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-09 10:51 Rami Rosen
2018-09-09 18:21 ` Petr Houska [this message]
2018-09-10  9:14   ` Rami Rosen
2018-09-10 16:47     ` Petr Houska
  -- strict thread matches above, loose matches on Subject: below --
2018-09-09  4:49 Petr Houska

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=CY4PR2101MB0866B292B4A4373CD7A11FA08C060@CY4PR2101MB0866.namprd21.prod.outlook.com \
    --to=t-pehous@microsoft.com \
    --cc=roszenrami@gmail.com \
    --cc=users@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).