Red Hat Bugzilla – Bug 125642
kernel's Makefile not suited for long directory paths
Last modified: 2007-11-30 17:07:02 EST
Description of problem: When recompiling the kernel, I often get this error: /bin/sh: scripts/mkdep: Arg list too long This happens when my current working directory is far from / with long names. The problem is this line in the kernel's Makefile: scripts/mkdep -- `find $(FINDHPATH) \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend mkdep is running against A LOT of args, each with the patch included. So... I've patched the Makefile (included)... and it works much better now. Can you apply this to all future RHEL 3 and Fedora kernels please?
Created attachment 100995 [details] Simple patch to the Makefile
If appropriate I'd like to get credit somewhere in the Makefile or kernel documentation for contributing this fix: Joshua Jensen <joshua@iwsp.com>
The blame or the credit? :-) Just kidding, Joshua. I'll add a comment to the Makefile right above your change. Unfortunately, I didn't have time to test and propose your patch in RHEL3 U3 (which is already frozen at this point). But I expect to get this into U4 as soon as it opens. Thanks again for your fix. -ernie
I just downloaded and inspected kernel-source-2.4.21-23.EL which I believe is the upcoming U4 kernel... and still this line unchanged: scripts/mkdep -- `find $(FINDHPATH) \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend So the change *didn't* make it into U4?? Maybe I'm missing something.
Sorry, didn't make it in U4. When the fix is committed (hopefully sometime in U5), I'll change the state of this bug to MODIFIED.
Did this make it into the RHEL3 U4 errata: https://rhn.redhat.com/errata/RHBA-2004-550.html ???
No, it didn't, as I already wrote in comment #5.
Now that https://rhn.redhat.com/errata/RHSA-2005-294.html is out... did this make it into U5? If not why not?
Hello, Joshua. As long as there continue to be higher priority bugs to fix, this problem will never be addressed. Red Hat doesn't support kernels built at customer sites, and with limited resources here, it is most important for us to address the problems (in things that we support) that are most seriously impacting customers. As you can read in the U5 advisory, we addressed over 200 BZs/FZs in U5. It's not like we're sitting around here idle.
This is a very very simple fix. Should I change this to be a FC4 bug so that it will get fixed "upstream"?
If you want it to get fixed upstream, you should post it to LKML. That way, if it gets picked up, it will just become part of Fedora and RHEL.
Patch posted for internal review on 1-Nov-2005.
A fix for this problem has just been committed to the RHEL3 U7 patch pool this evening (in kernel version 2.4.21-37.8.EL).
Created attachment 120673 [details] patch committed to RHEL3 U7 for "make dep" under long cwd paths Hi, Josh. Here's the patch that was committed to RHEL3 U7 tonight. Sorry it took so long to get this resolved. Cheers. -ernie
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2006-0144.html