Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 383341 - sys-devel/make-3.82-r2 breaks Linux kernel compilation
Summary: sys-devel/make-3.82-r2 breaks Linux kernel compilation
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-17 12:51 UTC by Manuel Lauss
Modified: 2011-09-18 23:57 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Lauss 2011-09-17 12:51:21 UTC
make-3.82-r2 breaks linux kernel build:

mano@flagship /usr/src/linux-2.6.git $ make O=/usr/src/kbuild-linux-2.6.git
/usr/src/linux-2.6.git/scripts/Makefile.build:44: /usr/src/linux-2.6.git/scripts/basic/Kbuild: No such file or directory
make[2]: *** No rule to make target `/usr/src/linux-2.6.git/scripts/basic/Kbuild'.  Stop.
make[1]: *** [scripts_basic] Error 2
make: *** [sub-make] Error 2


Downgrading to 3.82-r1 fixes it.

Reproducible: Always
Comment 1 Manuel Lauss 2011-09-17 12:54:11 UTC
among other things, it also breaks busybox build (which uses the kernels build system).
Comment 2 Anthony Basile gentoo-dev 2011-09-18 16:44:06 UTC
Bah!  I just hit this.
Comment 3 Anthony Basile gentoo-dev 2011-09-18 16:51:14 UTC
It was introduced by make-3.82-glob-speedup.patch, and its triggered by make's wildcard builtin, some change in behavior, as we can see at line 44 of scripts/Makefile.build:

kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
kbuild-file := $(if $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbuild-dir)/Makefile)
include $(kbuild-file)

Removing the patch, which is a tantamount to reverting to -r1 fixes it.
Comment 4 Anthony Basile gentoo-dev 2011-09-18 17:29:46 UTC
I've narrowed down the problem to the check

    strpbrk (name, "?*[") == NULL

in the line

    if (!(flags & PARSEFS_EXISTS) || strpbrk (name, "?*[") == NULL)
    {
       new behavior
    }
    else
    {
       old behavior
    }

This is their test for "fast globbing".  strpbrk is searching for ?*[ in name, doesn't find it and == NULL yields true.  As a result, the new behavior is triggered and there's no globbing.  If strpbrk were to find the substring, then == NULL would fail and the old behavior would run, which is what we want in this case (ie there would be globbing).

The other piece !(flags & PARSEFS_EXISTS) just relaxes a check on files that actually exist and yields false in our case.  So the following works (ie triggers the old behavior):

    if (!(flags & PARSEFS_EXISTS) )
    {
       new behavior
    }
    else
    {
       old behavior
    }

I'm not sure what upstream's logic was with strpbrk (name, "?*[") == NULL, so I'm not sure how to fix it short of dropping it.
Comment 5 SpanKY gentoo-dev 2011-09-18 19:09:59 UTC
your tree is out of date

*** This bug has been marked as a duplicate of bug 383311 ***
Comment 6 Anthony Basile gentoo-dev 2011-09-18 23:57:56 UTC
(In reply to comment #5)
> your tree is out of date
> 
> *** This bug has been marked as a duplicate of bug 383311 ***

Heh, || vs && logic.  Ironic I just finished teaching that in my intro programming class.