All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] Compiler errors pointing in BUILD_DIR when using OVERRIDE_SRCDIR
Date: Wed, 21 Oct 2015 22:51:57 +0200	[thread overview]
Message-ID: <20151021225157.04f425da@free-electrons.com> (raw)
In-Reply-To: <5627F50F.2060201@mind.be>

Arnout, Julien,

On Wed, 21 Oct 2015 22:26:55 +0200, Arnout Vandecappelle wrote:

> > In my company we are using buildroot for package development.
> > According to the buildroot documentation we are using the
> > <pkg>_OVERRIDE_SRCDIR mechanism.
> > 
> > It works great when the build is going well. However when there is a
> > compiler error/warning the issue is referring files in
> > output/build/<pkg> (because the source code was rsynced at this
> > location to be built).
> >>From a developer point of view (which is editing source code in
> > <pkg>_OVERRIDE_SRCDIR), it is difficult to work because if you jump on
> > the error, it does not jump on the source file which is edited. This
> > behavior generates mistake.
> > 
> > What do you think about that (limitation, bug ?) ? Do you think it
> > would be possible to improve it ?
> 
>  Some people (e.g., me :-) use the same source directory to build several
> configurations in separate output directories. In that case, building in the
> source directory wouldn't work...
> 
>  If the package in question supports out-of-tree building (like e.g. the kernel
> or most autotools-based packages), it would be possible that we don't copy the
> sources but instead just build out-of-tree in the build directory. Thomas
> Petazzoni posted a patch series to that effect about two and a half years ago,
> but that series was incomplete and never got applied. So you could take it over,
> perhaps improve and repost it. See [1], but mind [2]. Also, Thomas may have a
> more recent version of the series.

In fact, I already had a discussion with Julien about this issue (I
happen to know Julien for other reasons), and already pointed him to
the idea of doing per-package out-of-tree build. I unfortunately don't
have a more recent version of the series than what I posted a long,
long time ago.

Another option maybe is to ask rsync to create hardlinks so that
developers could edit directly the source files in output/build/<pkg>/
and in fact what gets edited are the files in the original location.
Though I agree that this is quite hackish and I'm pretty sure has lots
of nasty corner cases.

Clearly, the long-term solution to solve this problem is out of tree
build of packages.

At least, this request is great for one thing: it gives me one more
argument to push per-package out of tree build. I was wondering what to
do during my upcoming 10-11 hours flight, maybe you gave me an idea :)

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2015-10-21 20:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-21 13:16 [Buildroot] Compiler errors pointing in BUILD_DIR when using OVERRIDE_SRCDIR Julien Rosener
2015-10-21 20:26 ` Arnout Vandecappelle
2015-10-21 20:51   ` Thomas Petazzoni [this message]
2015-10-21 21:35     ` Julien Rosener

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=20151021225157.04f425da@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.