help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: $(wildcard ) in fakechroot environment


From: Paul Smith
Subject: Re: $(wildcard ) in fakechroot environment
Date: Wed, 18 Feb 2015 13:29:41 -0500

On Wed, 2015-02-18 at 10:53 +0000, Warlich, Christof wrote:
> Can anyone guess why make does not play well with fakechroot w.r.t.
> $(wildcard )? Many thanks for any hints,

Yeah... this is because of GNU make's internal file cache.  It's based
solely on directory pathnames, rather than something like inodes (not as
portable).

When glob() wants to open a given directory, it calls a GNU make
function (open_dirstream) which will use an internal cache of the
contents of that directory (if it exists) rather than reading it from
the disk.  As above the lookup in the cache is by fully-qualified
filename, and it doesn't know its in a chroot now.

The performance benefits of this cache are not insignificant, since make
does a LOT of searching for files in directories.  But it does cause
problems as well, this is just the latest.

I've long considered it would be a good idea to allow makefiles to
disable the cache if they wanted to, but such a capability hasn't been
implemented.

See https://savannah.gnu.org/bugs/index.php?41273





reply via email to

[Prev in Thread] Current Thread [Next in Thread]