bugmake - Bugs: bug #16053, second stem overwrites the first...


bug #16053: second stem overwrites the first per-prerequisite stem

Submitter:  None
Submitted:  Fri 10 Mar 2006 08:57:07 AM UTC
Severity:  3 - Normal 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

Fri 17 Mar 2006 02:25:39 PM UTC, comment #4: 

Fix is in CVS.

Boris Kolpackov <bosk>
Group Member
Wed 15 Mar 2006 07:05:30 PM UTC, comment #3: 

I would rather fix it properly right away than to come back to it. Will try to fix it before the end of the week.

Boris Kolpackov <bosk>
Group Member
Wed 15 Mar 2006 03:56:30 PM UTC, comment #2: 

Hm.  I don't know if we can release 3.81 with this kind of regression: it's different than releasing with a bug in new behavior or with an old bug not fixed.

Another idea which would resolve this problem but not the general case (when .SECONDARYEXPANSION is enabled) would be to go back to 3.80 processing for static pattern rules when .SECONDARYEXPANSION is not defined, and replace the "%" with the stem immediately as the rule is parsed, rather than replacing it with $* and waiting until the target is built.

Paul D. Smith <psmith>
Group administrator
Wed 15 Mar 2006 10:05:27 AM UTC, comment #1: 

Attaching a minimized test case. It prints "all.foo.one all.foo.two" while should print "all.one all.foo.two".

I also checked the code and it seems that keeping stem in prerequisites is the best way to solve this. I am not sure, however, if we should do it for 3.81. There will be quite a bit of changes.

Boris Kolpackov <bosk>
Group Member
Fri 10 Mar 2006 08:57:07 AM UTC, original submission:  

previous discussion:

make-3.80 works ok.
3.81beta4, 3.81rc1 don't work.

Sample output with attached testcase:

/tmp/m/obj$ make --version
GNU Make 3.80
/tmp/m/obj$ make -f ../src/Makefile
mkdir -p /tmp/m/obj/dir
cc    -c -o /tmp/m/obj/dir/a.o /tmp/m/src/dir/a.c
cc    -c -o /tmp/m/obj/dir/b.o /tmp/m/src/dir/b.c
ar cru /tmp/m/obj/my.a /tmp/m/obj/dir/a.o /tmp/m/obj/dir/b.o

fails with e.g. make from cvs:
/tmp/m/obj$ rm -rf *.a dir
/tmp/m/obj$ make --version
GNU Make 3.81rc1
/tmp/m/obj$ make -f ../src/Makefile
make: * No rule to make target `/tmp/m/src/dir/dir/a.c', needed by
`/tmp/m/obj/dir/a.o'.  Stop.



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

Attach Files:

Attached Files
file #1501:  makefile added by bosk (96B - application/octet-stream)
file #1512:  make-3.81rc1_possible_bug.tar added by None (10KiB - application/x-tar - testcase for second stem overwrites the first per-prerequisite stem)


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

Date Changed by Updated Field Previous Value => Replaced by
2006-04-01 psmith Fixed Release4.0 3.81
2006-03-17 bosk StatusNone Fixed
    Open/ClosedOpen Closed
    Fixed ReleaseNone 4.0
2006-03-15 bosk Assigned toNone bosk
2006-03-15 bosk Attached File- Added makefile, #3502
2006-03-10 None Attached File- Added make-3.81rc1_possible_bug.tar, #3486

Back to the top

Powered by Savane 3.13-4b48.
Corresponding source code