bugmake - Bugs: bug #13022, 3.81beta3: regression in implicit...

 
 

bug #13022: 3.81beta3: regression in implicit rules hanlding

Submitted by:  Dmitry V. Levin <ldv>
Submitted on:  Sun 08 May 2005 11:10:42 AM UTC  
 
Severity: 5 - BlockerItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: Boris Kolpackov <bosk>Open/Closed: Closed
Component Version: 4.0Operating System: POSIX-Based
Fixed Release: 3.81Triage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Fri 09 Dec 2005 04:50:15 PM UTC, comment #7:

Commited a fix to the repository.

Boris Kolpackov <bosk>
Project MemberIn charge of this item.
Mon 23 May 2005 04:29:18 PM UTC, comment #6:

What they have in common is that it's in "also builds" logic. The natures of two problems are quite different.

Boris Kolpackov <bosk>
Project MemberIn charge of this item.
Fri 20 May 2005 11:57:45 PM UTC, comment #5:

Is this related to bug # 12078 at all? They seem like cousins, at least. It seems like there have been other reports, if not on savannah then on the mailing list, of similar things.

Paul D. Smith <psmith>
Project Administrator
Mon 09 May 2005 05:13:46 PM UTC, comment #4:

Ooh, this is complicated. First, the change which triggers this regression (2005-03-04) is correct, it just uncovered other bug(s).

Make chooses built-in rule because the user-provided one matches only via intermediate file ('foo.h'). The fact that make thinks 'foo.h' is intermediate even though it was just built as part of 'foo.c' is a bug. At the moment, after building 'foo.c' we enter 'foo.c' as a target and mark that it also builds 'foo.h' but we don't make 'foo.h' a proper target.

The nasty part is that all this logic depends on the order in which things are built. If, for instance, I change

all: foo.c foo.o

to be

all: foo.o foo.c

the user-provided rule will match because we first try to build 'foo.o' and now both 'foo.c' and 'foo.h' are intermediate and the built-in rule is not any better than user-provided anymore. I would imagine this can change from build to build with -j.

Boris Kolpackov <bosk>
Project MemberIn charge of this item.
Sun 08 May 2005 03:11:25 PM UTC, comment #3:

Confirmed, working on it.

Boris Kolpackov <bosk>
Project MemberIn charge of this item.
Sun 08 May 2005 11:39:37 AM UTC, comment #2:

Well, second sample demonstrates already fixed bug with intermediate goals, so please ignore it.

Just to make things clear, first sample is expected to work this way:
$ make-3.81beta1 -n
cp foo.in foo.h
cp foo.in foo.c
echo foo.c foo.h >foo.o

But now make behaves differently:
$ make-20050503 -n
cp foo.in foo.h
cp foo.in foo.c
cc -c -o foo.o foo.c

Dmitry V. Levin <ldv>
Sun 08 May 2005 11:32:15 AM UTC, comment #1:

Oops, second sample demonstrates different regression.

Dmitry V. Levin <ldv>
Sun 08 May 2005 11:10:42 AM UTC, original submission:

Following simple test (which worked up to 2005-03-01 snapshot) no longer works starting with 2005-03-03 snapshot and up to latest cvs (checked 2005-05-03):

$ touch foo.in
$ cat Makefile
all: foo.c foo.o

clean:
rm -f .o .h *.c

%.h %.c: %.in
cp $< $*.h
cp $< $*.c

%.o: %.c %.h
echo $+ >$@

$ make-20050301 -n
cp foo.in foo.h
cp foo.in foo.c
echo foo.c foo.h >foo.o
rm foo.h

$ make-20050303 -n
cp foo.in foo.h
cp foo.in foo.c
cc -c -o foo.o foo.c

Dmitry V. Levin <ldv>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #2934:  Makefile added by ldv (86B - more simple makefile)
file #2933:  Makefile added by ldv (111B - sample makefile)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 9 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 01 Apr 2006 07:15:48 AM UTCpsmithFixed Release4.0=>3.81
Fri 09 Dec 2005 04:50:15 PM UTCboskSeverity3 - Normal=>5 - Blocker
  StatusNone=>Fixed
  Open/ClosedOpen=>Closed
  Fixed ReleaseNone=>4.0
Sun 08 May 2005 03:11:25 PM UTCboskAssigned toNone=>bosk
Sun 08 May 2005 11:20:33 AM UTCldvAttached File-=>Added Makefile, #2483
Sun 08 May 2005 11:10:43 AM UTCldvAttached File-=>Added Makefile, #2482
  Carbon-Copy-=>Added bosk

Back to the top


Powered by Savane 3.1-cleanup1