Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 113614 - linux-headers doesn't unset KBUILD_OUTPUT... again
Summary: linux-headers doesn't unset KBUILD_OUTPUT... again
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
: 114766 141171 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-11-26 03:05 UTC by Max Loparev
Modified: 2006-07-24 14:06 UTC (History)
3 users (show)

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


Attachments
set KBUILD_OUTPUT=<NULL> in xmakeopts (kernel-2-KBUILD_OUTPUT.patch,484 bytes, patch)
2006-01-10 21:46 UTC, Ben Peddell
Details | Diff
unset KBUILD_OUTPUT in unpack_2_6 and compile_manpages (kernel-2_KBUILD_OUTPUT.patch,693 bytes, patch)
2006-02-25 09:35 UTC, Ben Peddell
Details | Diff
unset KBUILD_OUTPUT in install_manpages (KBUILD_OUTPUT-fix2.patch,404 bytes, patch)
2006-05-04 08:20 UTC, Ben Peddell
Details | Diff
unset KBUILD_OUTPUT early in kernel-2.eclass (kernel-2_unset-KBUILD_OUTPUT.patch,927 bytes, patch)
2006-05-19 10:26 UTC, Ben Peddell
Details | Diff
kernel-2.eclass.patch (kernel-2.eclass.patch,390 bytes, patch)
2006-07-20 07:38 UTC, Piotr Jaroszyński (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Max Loparev 2005-11-26 03:05:25 UTC
all of the linux-headers version currently available, using kernel-2_src_unpack
that doesn't call compile_headers, so KBUILD_OUTPUT hasn't unsetted and make
mrproper raises error with permission denied when trying to work in
KBUILD_OUTPUT dir.
Comment 1 Daniel Drake (RETIRED) gentoo-dev 2005-12-07 08:56:35 UTC
*** Bug 114766 has been marked as a duplicate of this bug. ***
Comment 2 Piotr Jaroszyński (RETIRED) gentoo-dev 2005-12-07 09:37:55 UTC
For sure it concerns linux-headers-2.6.11-r3 and hardened-sources-2.6.14-r1, but
i think that all pacakages using unpack_2_6 function are concerned.
Comment 3 Ben Peddell 2006-01-10 21:46:28 UTC
Created attachment 76808 [details, diff]
set KBUILD_OUTPUT=<NULL> in xmakeopts

I can see no harmful side-effects, since xmakeopts is used nowhere else, and setting KBUILD_OUTPUT to <NULL> is equivalent to unsetting it, according to the linux Makefile.
Comment 4 Avuton Olrich 2006-01-13 02:00:08 UTC
Yes! That patch works, please commit asap if that patch is found acceptable, thanks.
Comment 5 Daniel Drake (RETIRED) gentoo-dev 2006-01-20 15:08:02 UTC
I don't suppose you've had a chance to look into where the problem lies?

The compile_headers() function handles that ok, but I gather that the problem happens in unpack somewhere. Any idea where? unpack_2_6 would be my suspect, since it executes some make commands. Can you test that?
Comment 6 Avuton Olrich 2006-02-05 12:03:22 UTC
Is there any way to get more attention on this, please? I get daily emerge failures due to this bug.
Comment 7 Ben Peddell 2006-02-25 09:35:18 UTC
Created attachment 80710 [details, diff]
unset KBUILD_OUTPUT in unpack_2_6 and compile_manpages

This patch applies cleanly from within the portage directory with -p0

(In reply to comment #5)
> I don't suppose you've had a chance to look into where the problem lies?

emerge =sys-kernel/linux-headers-2.6*
  fails on the first make in eclass/kernel-2.eclass#unpack_2_6
    rm: cannot remove `arch/i386/boot/compressed/vmlinux': Permission denied
    rm: cannot remove `arch/i386/boot/compressed/vmlinux.bin': Permission denied
    rm: cannot remove `arch/i386/boot/compressed/vmlinux.bin.gz': Permission denied
    rm: cannot remove `arch/i386/boot/compressed/head.o': Permission denied
    rm: cannot remove `arch/i386/boot/compressed/misc.o': Permission denied
    rm: cannot remove `arch/i386/boot/compressed/piggy.o': Permission denied
    make[3]: *** [__clean] Error 1
    make[2]: *** [arch/i386/boot/compressed] Error 2
    make[1]: *** [archclean] Error 2
    make: *** [mrproper] Error 2

    !!! ERROR: sys-kernel/linux-headers-2.6.11-r2 failed.
    !!! Function unpack_2_6, Line 332, Exitcode 2
    !!! make mrproper failed
    !!! If you need support, post the topmost build error, NOT this status message.

linux-2.4.* does not use KBUILD_OUTPUT, and thus is not affected by this.

emerge =sys-kernel/gentoo-sources-2.6*
  fails on the first make in eclass/kernel-2.eclass#unpack_2_6
    rm: cannot remove `arch/i386/boot/compressed/vmlinux': Permission denied
    rm: cannot remove `arch/i386/boot/compressed/vmlinux.bin': Permission denied
    rm: cannot remove `arch/i386/boot/compressed/vmlinux.bin.gz': Permission denied
    rm: cannot remove `arch/i386/boot/compressed/head.o': Permission denied
    rm: cannot remove `arch/i386/boot/compressed/misc.o': Permission denied
    rm: cannot remove `arch/i386/boot/compressed/piggy.o': Permission denied
    make[3]: *** [__clean] Error 1
    make[2]: *** [arch/i386/boot/compressed] Error 2
    make[1]: *** [archclean] Error 2
    make: *** [mrproper] Error 2

    !!! ERROR: sys-kernel/gentoo-sources-2.6.15-r1 failed.
    !!! Function unpack_2_6, Line 332, Exitcode 2
    !!! make mrproper failed
    !!! If you need support, post the topmost build error, NOT this status message.
  or on the make in eclass/kernel-2.eclass#compile_manpages
     * Making manpages ...
       HOSTCC  scripts/basic/fixdep
     cc1: Permission denied: opening dependency file scripts/basic/.fixdep.d
     make[2]: *** [scripts/basic/fixdep] Error 1
     make[1]: *** [scripts_basic] Error 2
     make: *** [mandocs] Error 2
Comment 8 John Mylchreest (RETIRED) gentoo-dev 2006-02-26 09:19:32 UTC
I'm quite happy with that patch. Many thanks for everyones efforts. Thanks Ben. This is now in CVS.
Comment 9 John Mylchreest (RETIRED) gentoo-dev 2006-02-26 09:26:58 UTC
I'm quite happy with that patch. Many thanks for everyones efforts. Thanks Ben. This is now in CVS.
Comment 10 Ben Peddell 2006-05-04 08:20:48 UTC
Created attachment 86143 [details, diff]
unset KBUILD_OUTPUT in install_manpages

I forgot something - install_manpages
Comment 11 John Mylchreest (RETIRED) gentoo-dev 2006-05-04 08:38:13 UTC
I've moved the unset to early on in the global scope now and as such this should be resolved.

Please emerge sync, test and repoen if this still causes a problem.
Comment 12 Ben Peddell 2006-05-19 10:26:33 UTC
Created attachment 87066 [details, diff]
unset KBUILD_OUTPUT early in kernel-2.eclass

(In reply to comment #11)
> I've moved the unset to early on in the global scope now and as such this
> should be resolved.
> 
> Please emerge sync, test and repoen if this still causes a problem.
> 

Your fix worked - and then someone went and moved your fix into an "elif [[ ${ETYPE} == headers ]]" clause on May 9, which nullified your fix.

I hope this will be a more permanent fix.


>>> Install gentoo-sources-2.6.16-r7 into /var/tmp/portage/gentoo-sources-2.6.16-r7/image/ category sys-kernel
>>> Copying sources ...
 * Installing manpages ...
  HOSTCC  scripts/basic/fixdep
ACCESS DENIED  open_wr:   /usr/src/linux-2.6.16-gentoo-r3/build/scripts/basic/.fixdep.d
cc1: Permission denied: opening dependency file scripts/basic/.fixdep.d
make[2]: *** [scripts/basic/fixdep] Error 1
make[1]: *** [scripts_basic] Error 2
make: *** [installmandocs] Error 2                                        [ !! ]
Comment 13 Daniel Drake (RETIRED) gentoo-dev 2006-05-19 11:19:10 UTC
reopening
Comment 14 John Mylchreest (RETIRED) gentoo-dev 2006-05-22 03:28:05 UTC
this will actually be resolved now that linux-doc is introduced regardless of eclass changes in future, I'll CC in brix for this reason.
Comment 15 Henrik Brix Andersen 2006-05-22 05:55:44 UTC
No need to CC: me on kernel@ assigned bugs.
Comment 16 Piotr Jaroszyński (RETIRED) gentoo-dev 2006-07-20 07:38:31 UTC
Created attachment 92314 [details, diff]
kernel-2.eclass.patch

ooops, made a duplicate(bug #141171).
This simple patch fixes the still current manpages_install() problem.
Comment 17 Piotr Jaroszyński (RETIRED) gentoo-dev 2006-07-20 07:39:10 UTC
*** Bug 141171 has been marked as a duplicate of this bug. ***
Comment 18 Daniel Drake (RETIRED) gentoo-dev 2006-07-24 14:06:06 UTC
fixed: doc code removed