bugmake - Bugs: bug #41273, Directory cache causes issues with...

 
 

bug #41273: Directory cache causes issues with wildcard, etc.

Submitter:  None
Submitted:  Sun 19 Jan 2014 04:12:03 AM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  3.81 Operating System:  Any
Fixed Release:  4.4 Triage Status:  Medium Effort
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 29 Nov 2020 11:11:30 PM UTC, comment #4: 

I've pushed a fix for this issue which will appear in the next release.

Paul D. Smith <psmith>
Group administrator
Fri 27 Dec 2019 02:59:48 PM UTC, comment #3: 

Duplicated by #57102

Paul D. Smith <psmith>
Group administrator
Wed 18 Feb 2015 06:28:39 PM UTC, comment #2: 

For other issues with caching see bug #14617, bug #443, bug #21231 as well as http://lists.gnu.org/archive/html/help-make/2015-02/msg00010.html and various other email threads and SO questions...

We need to either find a way to keep all or most of the benefits of the cache without causing these problems (maybe find a better way to invalidate the cache?), or else allow the user to disable it when they want to write "questionable" makefiles that assume no caching.

Paul D. Smith <psmith>
Group administrator
Mon 03 Feb 2014 12:19:15 AM UTC, comment #1: 

This is a function make's internal directory caching mechanism.  The wildcard function looks through the internal cache (where it exists) not the local filesystem, which means that if there are rules that create files make doesn't know about (e.g., ones that didn't exist when make started and are not listed as targets of the recipes make runs) then they may not show up in the results of the wildcard function.

Paul D. Smith <psmith>
Group administrator
Sun 19 Jan 2014 04:12:03 AM UTC, original submission:  

Using a simple makefile under Windows 7, it became apparent that the wildcard function does not reflect the existence of a library created when the first object was added to it.

This is make 3.81, as downloaded from gnuwin32:

GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-pc-mingw32

C:\Users\admin\dev\lib\ll>

The attached listing shows both the GNUmakefile, and the resulting output showing that $(wildcard ll.lib) does not recognize the existence of the library after it was created.

However, my workaround $(mywildcard) gives the correct results one would expect from the wildcard function.  This is consistent with the mention that a cache is probably used to avoid actually checking the filesystem and can therefore cause inconsistent results.  Curiously, repeated tests showed that occasionally the wildcard function would begin showing the existence of the library file in the middle of building and adding the eight object files.  But usually it would not recognize the file until the make was run a second time.

Thank you,

Harry Clauson

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #30306:  wildcard.txt added by None (6KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-11-29 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.4
    2015-02-18 psmith Operating SystemMS Windows Any
        Triage StatusNone Medium Effort
        Summarywildcard function does not return newly created file Directory cache causes issues with wildcard, etc.
    2014-01-19 None Attached File- Added wildcard.txt, #30306

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code