bug-make
[Top][All Lists]
Advanced

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

bug in cleaarcae mvfs for linux confuses make VPATH


From: Richard Sharman
Subject: bug in cleaarcae mvfs for linux confuses make VPATH
Date: Sun, 13 Jan 2008 16:20:23 -0500

The Linux version of the MVFS file-system from Clearcase can present
the same inode and dev numbers for a directory in different views.
(We do not see the same problem on the sparc mvfs.)

This can cause make to produce incorrect results when two or more
clearcase view directories appear in the VPATH list.

This little makefile demonstrates the problem:

------------------------------------------------------------------------
VPATH :=  /view/sharman_Platform_Services/vobs 
/view/sharman_MediaServer_1.0/vobs

junk : junk.c NETSVC/NS_Inc/SDPContext.h
        wc -l $^
------------------------------------------------------------------------

The file NETSVC/NS_Inc/SDPParser.h does not occur in the first vpath
directory, but does occur in the second.  (The directory NETSVC/NS_Inc
exists in the first directory but is empty.)

$ make -f make1
make: *** No rule to make target `NETSVC/NS_Inc/SDPContext.h', needed by 
`junk'.  Stop.
$ 


I think that because both the directories have the same inode & dev
combination, when make finds that the file does not occur in the first
directory when it comes to the second one it thinks it has already
processed it.

The program filenumber does a stat and prints the inode number, the
dev number and the ctime number.  It demonstrates the fact that the
two directories incorrectly have the same inode & dev numbers:

$ V1=/view/sharman_Platform_Services/vobs/NETSVC/NS_Inc 
$ V2=/view/sharman_MediaServer_1.0/vobs/NETSVC/NS_Inc
$ filenumber $V1 $V2
/view/sharman_Platform_Services/vobs/NETSVC/NS_Inc device=64608 inode=3544 
ctime=1032294808
/view/sharman_MediaServer_1.0/vobs/NETSVC/NS_Inc device=64608 inode=3544 
ctime=1177967845
$ ls $V1/SDPContext.h $V2/SDPContext.h
ls: /view/sharman_Platform_Services/vobs/NETSVC/NS_Inc/SDPContext.h: No such 
file or directory
/view/sharman_MediaServer_1.0/vobs/NETSVC/NS_Inc/SDPContext.h
$ 


I was able to overcome the problem by adding a check of the files'
ctimes as well as their inode and dev numbers.  

$ ~/make-3.81/x86-linux/make -f make1
wc -l junk.c /view/sharman_MediaServer_1.0/vobs/NETSVC/NS_Inc/SDPContext.h
  0 junk.c
 31 /view/sharman_MediaServer_1.0/vobs/NETSVC/NS_Inc/SDPContext.h
 31 total
$ 


Here is a patch against make 3.81

Attachment: Patch
Description: Patch for gnu make 3.81 to check ctime

Richard

reply via email to

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