Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v7 03/18] core: re-enter make if $(CURDIR) or $(O) are not absolute canonical path
Date: Sat, 26 Mar 2016 13:21:43 +0100	[thread overview]
Message-ID: <56F67ED7.1060309@mind.be> (raw)
In-Reply-To: <CAHXCMMKaygcoS1PvO4hNxSDWsUgS1ReWXUR8mLLpQnoAaTq6sA@mail.gmail.com>

On 03/25/16 07:31, Samuel Martin wrote:
> On Wed, Mar 23, 2016 at 2:36 AM, Matthew Weber <matt@thewebers.ws> wrote:
>> Yann, Samuel
>>
>> On Tue, Mar 22, 2016 at 7:54 PM, Matthew Weber <matt@thewebers.ws> wrote:
>>> Yann, Samuel, All
>>>
>>> On Tue, Mar 22, 2016 at 6:11 PM, Matthew Weber <matt@thewebers.ws> wrote:
>>>> Yann, All
>>>>
>>>> On Tue, Mar 22, 2016 at 5:07 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>>>>> Matthew, All,
>>>>>
>>>>> On 2016-03-20 20:45 -0500, Matthew Weber spake thusly:
>>>>>> On Sun, Mar 20, 2016 at 8:44 PM, Matthew Weber <matt@thewebers.ws> wrote:
>>>>>>> On Wed, Mar 9, 2016 at 4:58 PM, Samuel Martin <s.martin49@gmail.com> wrote:
>>>>>>>> When $(CURDIR) or $(O) contain symlinks (or mount-bind) in their path,
[snip]
>>>>>>>> +ifneq ($(shell umask):$(CURDIR):$(patsubst %/.,%,$(O)),$(UMASK):$(realpath $(CURDIR)):$(realpath $(O)))
[snip]
>> One additional detail, I cloned https://github.com/tSed/buildroot.git
>> and checkout c55eeee30fe6106354c0f2cb6ce6ecb46972503a.  Then "make
>> qemu_x86_defconfig" and reproduced it.  I'll start dissecting the
>> other commits past that one.  Something must be masking it.
>>
>
> I think I get what happens:

  No you don't :-)


> According to [2,3], realpath return an empty string in case of ENOENT
> (file does not exist), hence the empty $(O) because output/ is not yet
> created when re-entering make.

  But since $(O) itself is also the empty string, the condition won't even 
trigger because 022:/tmp/buildroot: is equal to 022:/tmp/buildroot:

  Matthew, however, has umask 077 I think, so for him the condition will trigger 
even when O is not set.

  The same would happen if there would be a symlink in $PWD.

> However, I'm still not sure how to fix this, either pass O=$(O)
> instead of O=$(realpath $(O))

  Wasn't the point of this patch to give O a full path? So skipping that would 
defeat the purpose...

> when re-entering make, or mkdir $(O)
> before re-entering make. (I still need to think/test about it).
> Any suggestions more than welcome.

  Perhaps the whole ifneq ("$(origin O)", "command line") section should move 
before the conditional recursion, so that we always pass the appropriate O= 
using EXTRAMAKEARGS. Of course, this means that CONFIG_DIR and NEED_WRAPPER have 
to be passed in EXTRAMAKEARGS as well. So it's a rather complicated change.


  Regards,
  Arnout


>
> Note: even after downgrading make to make-3.81, I still don't trigger
> this issue. I figured this out using this tricks [4]... :-/
>
> [2] https://www.gnu.org/software/make/manual/html_node/File-Name-Functions.html
> [3] http://man7.org/linux/man-pages/man3/realpath.3.html
> [4] http://code.bulix.org/epvj9d-94510?raw
>
> Regards,
>
>> --
>> Thanks,
>> Matt
>


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

  reply	other threads:[~2016-03-26 12:21 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09 22:58 [Buildroot] [PATCH v7 00/18] Relocatable SDK / build machine leaks Samuel Martin
2016-03-09 22:58 ` [Buildroot] [PATCH v7 01/18] package/linux-headers: cleanup installation Samuel Martin
2016-03-09 23:09   ` Yann E. MORIN
2016-03-12  8:46     ` Samuel Martin
2016-03-22 22:10       ` Yann E. MORIN
2016-03-09 22:58 ` [Buildroot] [PATCH v7 02/18] core: use $(CURDIR) to set TOPDIR Samuel Martin
2016-03-09 23:10   ` Yann E. MORIN
2016-03-09 23:51   ` Arnout Vandecappelle
2016-03-10 20:45     ` Thomas Petazzoni
2016-03-10 22:50   ` Thomas Petazzoni
2016-03-09 22:58 ` [Buildroot] [PATCH v7 03/18] core: re-enter make if $(CURDIR) or $(O) are not absolute canonical path Samuel Martin
2016-03-09 23:15   ` Yann E. MORIN
2016-03-12  8:48     ` Samuel Martin
     [not found]   ` <CAFt09wNvtXGcfZ3PFZOgGu+bDvp6mEr44uwxa_ryjeP6DDQKBQ@mail.gmail.com>
2016-03-21  1:45     ` Matthew Weber
2016-03-21  5:21       ` Samuel Martin
2016-03-21 11:40         ` Matthew Weber
2016-03-22  3:03           ` Matthew Weber
2016-03-22  5:55             ` Samuel Martin
2016-03-22 11:10               ` Matthew Weber
2016-03-22 22:07       ` Yann E. MORIN
2016-03-22 23:11         ` Matthew Weber
2016-03-23  0:54           ` Matthew Weber
2016-03-23  1:36             ` Matthew Weber
2016-03-25  6:31               ` Samuel Martin
2016-03-26 12:21                 ` Arnout Vandecappelle [this message]
2016-03-23 17:41           ` Yann E. MORIN
2016-03-09 22:58 ` [Buildroot] [PATCH v7 04/18] core: staging symlink uses a relative path when possible Samuel Martin
2016-03-09 23:20   ` Yann E. MORIN
2016-03-10 20:47   ` Thomas Petazzoni
2016-03-12  9:11     ` Samuel Martin
2016-03-12 13:12       ` Thomas Petazzoni
2016-03-09 22:58 ` [Buildroot] [PATCH v7 05/18] core: make staging *-config scripts relocatable Samuel Martin
2016-03-09 23:24   ` Yann E. MORIN
2016-03-10  0:07     ` Arnout Vandecappelle
2016-03-12  9:22       ` Samuel Martin
2016-03-09 22:58 ` [Buildroot] [PATCH v7 06/18] core: make host " Samuel Martin
2016-03-10  0:12   ` Arnout Vandecappelle
2016-03-10 12:30     ` Samuel Martin
2016-03-10 20:50   ` Thomas Petazzoni
2016-03-09 22:58 ` [Buildroot] [PATCH v7 07/18] package/pkgconf: make the pkg-config wrapper relocatable Samuel Martin
2016-03-10 20:53   ` Thomas Petazzoni
2016-03-10 21:33     ` Peter Korsgaard
2016-03-09 22:58 ` [Buildroot] [PATCH v7 08/18] support/scripts: add fix-rpath script + a bunch of helpers Samuel Martin
2016-03-09 22:58 ` [Buildroot] [PATCH v7 09/18] core: add HOST_SANITIZE_RPATH_HOOK to TARGET_FINALIZE_HOOKS Samuel Martin
2016-03-09 22:58 ` [Buildroot] [PATCH v7 10/18] core: add {TARGET, STAGING}_SANITIZE_RPATH_HOOK " Samuel Martin
2016-03-09 22:58 ` [Buildroot] [PATCH v7 11/18] package/speex: remove no longer needed hook Samuel Martin
2016-03-09 22:58 ` [Buildroot] [PATCH v7 12/18] toolchain: add post-install hooks making the toolchain relocatable Samuel Martin
2016-03-09 22:58 ` [Buildroot] [PATCH v7 13/18] support/scripts: update check-host-rpath to use the shell helpers Samuel Martin
2016-03-09 22:58 ` [Buildroot] [PATCH v7 14/18] support/scripts/check-host-rpath: silent find command Samuel Martin
2016-03-10  0:15   ` Arnout Vandecappelle
2016-03-09 22:58 ` [Buildroot] [PATCH v7 15/18] support/scripts/check-host-rpath: also check HOST_DIR/{bin, sbin} Samuel Martin
2016-03-10  0:16   ` Arnout Vandecappelle
2016-03-09 22:58 ` [Buildroot] [PATCH v7 16/18] support/scripts: add check-host-leaks script + all needed helpers Samuel Martin
2016-03-27 22:38   ` Arnout Vandecappelle
2016-03-09 22:58 ` [Buildroot] [PATCH v7 17/18] core: add check-leaks-in-{target, host, staging} targets Samuel Martin
2016-03-09 22:58 ` [Buildroot] [PATCH v7 18/18] docs/manual: document how to debug shell script Samuel Martin
2016-03-10  0:21   ` Arnout Vandecappelle

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=56F67ED7.1060309@mind.be \
    --to=arnout@mind.be \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox