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

 
 

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

Submitter:  Dmitry V. Levin <ldv>
Submitted:  Sun 08 May 2005 11:10:42 AM UTC
   
 
Severity:  5 - Blocker Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  bosk Open/Closed:  Closed
Component Version:  4.0 Operating System:  POSIX-Based
Fixed Release:  3.81 Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group Member
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>
Group Member
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>
Group 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>
Group Member
Sun 08 May 2005 03:11:25 PM UTC, comment #3: 

Confirmed, working on it.

Boris Kolpackov <bosk>
Group Member
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 Files:
   
   
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

 

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 9 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-04-01 psmith Fixed Release4.0 3.81
2005-12-09 bosk Severity3 - Normal 5 - Blocker
    StatusNone Fixed
    Open/ClosedOpen Closed
    Fixed ReleaseNone 4.0
2005-05-08 bosk Assigned toNone bosk
2005-05-08 ldv Attached File- Added Makefile, #2483
2005-05-08 ldv Attached File- Added Makefile, #2482
    Carbon-Copy- Added bosk

Back to the top

Powered by Savane 3.13-758e.
Corresponding source code