bugmake - Bugs: bug #30723, implicit re-executing of subdirs...

 
 

bug #30723: implicit re-executing of subdirs breaks $(origin) with make-3.82

Submitted by:  Mike Frysinger <vapier>
Submitted on:  Tue 10 Aug 2010 05:22:11 AM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 3.82Operating System: Any
Fixed Release: 4.0Triage Status: Verified

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Tue 10 Aug 2010 08:31:26 AM UTC, comment #4:

yes, that patch fixes things for me. now i get the "expected":
Makefile:240: *** mixed implicit and normal rules. Stop.

but that is something to take up with glibc maintainers

Mike Frysinger <vapier>
Tue 10 Aug 2010 07:13:52 AM UTC, comment #3:

Hm, I believe I found the bug. Please try this patch:

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Tue 10 Aug 2010 05:55:05 AM UTC, comment #2:

i tried to recreate a reduced test case but failed, but then i realized i was testing on a diff machine that had make-3.81

here is a simple reduced test case ... forget about glibc ;)

$ tar xf origin-breakage.tar.bz2
$ cd origin-breakage
$ make-3.82 x=1
config.make:1: x=1 origin=command line
config.make:3: x=1 origin=command line
rm -f foo/foo
make-3.82 -C foo
make-3.82[1]: Entering directory `/home/vapier/origin-breakage/foo'
../config.make:1: x=1 origin=command line
../config.make:3: x=1 origin=command line
Makefile:2: foo: No such file or directory
touch foo
make-3.82[1]: Leaving directory `/home/vapier/origin-breakage/foo'
make-3.82[1]: Entering directory `/home/vapier/origin-breakage/foo'
../config.make:1: x=1 origin=environment
../config.make:3: x= origin=file
make-3.82[1]: `foo' is up to date.
make-3.82[1]: Leaving directory `/home/vapier/origin-breakage/foo'
rm -f foo/foo

$ make-3.81 x=1
config.make:1: x=1 origin=command line
config.make:3: x=1 origin=command line
rm -f foo/foo
make-3.81 -C foo
make-3.81[1]: Entering directory `/home/vapier/origin-breakage/foo'
../config.make:1: x=1 origin=command line
../config.make:3: x=1 origin=command line
Makefile:2: foo: No such file or directory
touch foo
make-3.81[1]: Leaving directory `/home/vapier/origin-breakage/foo'
make-3.81[1]: Entering directory `/home/vapier/origin-breakage/foo'
../config.make:1: x=1 origin=command line
../config.make:3: x=1 origin=command line
make-3.81[1]: `foo' is up to date.
make-3.81[1]: Leaving directory `/home/vapier/origin-breakage/foo'
rm -f foo/foo

Mike Frysinger <vapier>
Tue 10 Aug 2010 05:53:48 AM UTC, comment #1:

Hm. Is there any way for you to provide a smaller example? I tried to follow your directions but I think the build failed for some other reason, earlier than the problem you hit:
Up until that point, every invocation of config.make had shown origin=command line.

I tried to create a little makefile to represent what I think you said (when you say depends on generated files, do you mean like make include files where make generates them and auto-re-execs itself? Or something different?) but I couldn't get that to fail either.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Tue 10 Aug 2010 05:22:11 AM UTC, original submission:

upgrading from make-3.81 to make-3.82 seems to break the origin marking of variables and thus command line variable overriding. using glibc here as my example.

to reproduce (warning: do not run as root):
tar xf glibc-2.11.2.tar.bz2
cd glibc-2.11.2
mkdir build
cd build
../configure --prefix=/usr -q
sed -i '/^install_root/{h;s:.*:$(warning install_root=$(install_root) origin=$(origin install_root)):;H;x;H;x}' config.make
make install-headers install_root=$PWD/foo

the local config.make file has a default:
install_root =
but we're overriding it on the command line, so that should always be ignored

glibc will basically do a `make -C ..`, and here you'll see the correct behavior:
.../config.make:8: install_root=$PWD/foo origin=command line
.../config.make:10: install_root=$PWD/foo origin=command line

but the makefile logic in there depends on generated files. so make will generate those files, leave the subdir, and then re-enter it. upon re-entry though, we now see:
.../config.make:8: install_root=$PWD/foo origin=environment
.../config.make:10: install_root= origin=file

obviously that is incorrect ;)

Mike Frysinger <vapier>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #21181:  origin-breakage.tar.bz2 added by vapier (383B - application/x-bzip2)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by psmith (Posted a comment)
  • -unavailable- added by vapier (Submitted the item)
  •  

    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
    Tue 10 Aug 2010 07:38:06 AM UTCpsmithComponent VersionNone=>3.82
    Tue 10 Aug 2010 07:36:28 AM UTCpsmithItem GroupNone=>Bug
      StatusNone=>Fixed
      Assigned toNone=>psmith
      Open/ClosedOpen=>Closed
      Operating SystemNone=>Any
      Fixed ReleaseNone=>4.0
      Triage StatusNone=>Verified
    Tue 10 Aug 2010 05:55:36 AM UTCvapierAttached File-=>Added origin-breakage.tar.bz2, #21181

    Back to the top


    Powered by Savane 3.1-cleanup