bugmake - Bugs: bug #33034, "Makefile:23: *** mixed...

 
 
Show feedback again

bug #33034: "Makefile:23: *** mixed implicit and normal rules. Stop." for Linux kernel out of source builds

Submitted by:  None
Submitted on:  Sat 09 Apr 2011 10:42:24 AM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: Not A BugPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 3.82Operating System: POSIX-Based
Fixed Release: NoneTriage Status: None

Add a New Comment (Rich MarkupRich 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 04 Nov 2011 03:54:17 AM UTC, comment #7:

Just for the record, I have been looking for a spare moment to come up with a patch to fix this compatibility problem (which affects many projects other than the Linux kernel, too).

If that's a bad idea for some reason, please feel free to let me know why. :) And if anyone else starts before I do, I won't mind --- on the contrary, I'll be very happy.

Jonathan Nieder <jrn>
Fri 20 May 2011 07:46:25 PM UTC, comment #6:

In fairness, this is a special situation. I have the same problem as "tz", and I expect quite a few other people do too.

My company makes drivers. The corollary is that we keep dozens if not hundreds of entire Linux kernel source build trees going back 10 years or so in order to build drivers for them. The way Linux kernel drivers are built makes it necessary to use the kernel build system. Thus it's not sufficient for us to fix our own makefiles, or even that Linux kernels which came out in the last year are fixed themselves. As things stand, we'll be unable to upgrade from GNU make 3.81 until all pre-2010 kernels have drained out of our support matrix, which could easily be another 10 years. Of course we also have the option of going back and "fixing" the makefiles for each old kernel, but once you've changed 2.6.18-128.7.1 then it's no longer 2.6.18-128.7.1.

So I at least think this issue is different from other incompatibilities and worthy of special consideration. If the original fix was a complete rewrite of parsing then maybe that's the end of the story, but if it's just a little patch which could be switched at runtime, would it be possible to add a special target to control that switch? I might sign up for the work if you agree it's not an outrageous thing to support.

David Boyce <boyski>
Fri 20 May 2011 06:10:11 PM UTC, comment #5:

I'm not trying to be flip, but what do you do when you upgrade to a new version of the compiler and older code no longer builds correctly due to more stringent requirements? I see this in code all the time (not GNU make) with new versions of GCC for example.

I really am not interested in changing all the error messages to give details about which version of GNU make that error was introduced, and I'm also not interested in adding flags to every version of GNU make which allows for backward-compatibility with older versions. That seems completely unwieldy from a development and maintenance point of view.

Paul D. Smith <psmith>
Project Administrator
Fri 20 May 2011 04:23:09 PM UTC, comment #4:

It would help if for the next version there was a backward compatibility switch - there are a lot of archived kernel source trees (and probably a lot of other projects) that this breaks.

It would also help if the error message noted it was a change (mixed ... no longer allowed as of 3.82), because it is very confusing to do a bunch of updates and find the old builds no longer work.

tz <tz1>
Sat 09 Apr 2011 02:06:05 PM UTC, comment #3:

This is an intentional change. See the GNU make NEWS file:

You must split these rules into two rules: one for the pattern and one for the explicit targets. The Linux kernel source has already been modified in this way (in newer kernels).

Paul D. Smith <psmith>
Project Administrator
Sat 09 Apr 2011 11:51:25 AM UTC, comment #2:

As workaround for coLinux can change the template scripts/mkmakefile.

      • old:
      • new:

See also the attached patch.

(file #23162)

Henry Nestler <henryn>
Sat 09 Apr 2011 10:48:32 AM UTC, comment #1:

Sorry. forgotten to login while creating this bug.

The bug was original reported by a coLinux user:
http://article.gmane.org/gmane.linux.colinux.general/5230

Make 3.81 works.

Henry Nestler <henryn>
Sat 09 Apr 2011 10:42:24 AM UTC, original submission:

A build of Linux kernel out of source got this error, if target name was give on command line. It gots this error:

Makefile:23: *** mixed implicit and normal rules. Stop.

The relevant lines in Makefile:
16: all := $(filter-out all Makefile,$(MAKECMDGOALS))
23: $(all) %/: all

Full example:
cd /tmp
wget http://www.kernel.org/pub/linux/kernel/v2.6/longterm/v2.6.33/linux-2.6.33.9.tar.bz2
tar xjf linux-2.6.33.9.tar.bz2
mkdir linux-2.6.33.9-build
cd linux-2.6.33.9
make O=../linux-2.6.33.9-build defconfig
cd ../linux-2.6.33.9-build
make vmlinux

If replacing the command "make vmlinux" with "make", then it works. But it is no workaround, because I need to call "make modules_install" later.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #23162:  make-3.82-mkmakefile.patch added by henryn (281B - text/x-patch - Change kernel Makefile template)
file #23155:  Makefile added by None (523B - application/octet-stream - Linux kernel Makefile from make defconfig in build directory)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jrn (Posted a comment)
  • -unavailable- added by boyski (Posted a comment)
  • -unavailable- added by tz1 (Posted a comment)
  • -unavailable- added by psmith (Posted a comment)
  • -unavailable- added by henryn (Posted a comment)
  •  

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

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 09 Apr 2011 02:06:05 PM UTCpsmithStatusNone=>Not A Bug
      Open/ClosedOpen=>Closed
    Sat 09 Apr 2011 11:51:25 AM UTChenrynAttached File-=>Added make-3.82-mkmakefile.patch, #23162
    Sat 09 Apr 2011 10:42:25 AM UTCNoneAttached File-=>Added Makefile, #23155
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup