Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 182642 - net-wireless/linux-wlan-ng-modules-0.2.8 does not respect the KBUILD_OUTPUT environment variable
Summary: net-wireless/linux-wlan-ng-modules-0.2.8 does not respect the KBUILD_OUTPUT e...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on: 247898
Blocks:
  Show dependency tree
 
Reported: 2007-06-20 07:56 UTC by Natanael Copa
Modified: 2012-11-28 12:15 UTC (History)
3 users (show)

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 Natanael Copa 2007-06-20 07:56:37 UTC
the linux-wlan-ng-modules-0.2.8 ebuild assumes that you have compiled your kernel in your KERNEL_DIR and ingnores the fact that it is very much possible to compile the kernel somewhere else by using KBUILD_OUTPUT.

This is easily fixed:
--- /usr/portage/net-wireless/linux-wlan-ng-modules/linux-wlan-ng-modules-0.2.8.ebuild  2007-05-09 16:30:52 +0000
+++ linux-wlan-ng-modules-0.2.8.ebuild  2007-06-20 07:36:42 +0000
@@ -55,7 +55,11 @@
        cp ${S}/config.in ${config}
 
        echo "TARGET_ROOT_ON_HOST=${D}" >> ${config}
-       echo "LINUX_SRC=${KERNEL_DIR}"  >> ${config}
+       if [ -n "${KBUILD_OUTPUT}" ] ; then
+               echo "LINUX_SRC=${KBUILD_OUTPUT}"  >> ${config}
+       else
+               echo "LINUX_SRC=${KERNEL_DIR}"  >> ${config}
+       fi
        echo "FIRMWARE_DIR=/lib/firmware/" >> ${config}
        echo "PRISM2_PCI=n" >> ${config}
        echo "PRISM2_PLX=n" >> ${config}
Comment 1 Petteri Räty (RETIRED) gentoo-dev 2007-06-20 10:08:58 UTC
kernel: Does the patch look ok to you?
Comment 2 Daniel Drake (RETIRED) gentoo-dev 2007-06-20 12:12:03 UTC
no, as LINUX_SRC should always be passed to the -C option for make when it descends into kbuild. the output directory should be specified in the O variable assignment in the same make statement. There currently is none, so you'll have to hack the makefiles to make this work.
Comment 3 Markus Giese 2008-04-18 23:15:46 UTC
has the reported bug something to do with my error ??? :

 * Preparing p80211 module
make -C /usr/src/linux M='/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211' WLAN_SRC=/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src modules
make[1]: Entering directory `/usr/src/linux-2.6.24-gentoo-r3'
  CC [M]  /var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211/p80211mod.o
  CC [M]  /var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211/p80211conv.o
  CC [M]  /var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211/p80211req.o
  CC [M]  /var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211/p80211wep.o
  CC [M]  /var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211/p80211wext.o
  CC [M]  /var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211/p80211netdev.o
/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211/p80211wext.c:451:2: warning: #warning "get rid of p2mib here"
/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211/p80211netdev.c: In function ‘p80211netdev_startup’:
/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211/p80211netdev.c:170: error: ‘proc_net’ undeclared (first use in this function)
/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211/p80211netdev.c:170: error: (Each undeclared identifier is reported only once
/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211/p80211netdev.c:170: error: for each function it appears in.)
/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211/p80211netdev.c: In function ‘p80211netdev_shutdown’:
/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211/p80211netdev.c:199: error: ‘proc_net’ undeclared (first use in this function)
make[2]: *** [/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211/p80211netdev.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [_module_/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src/p80211] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.24-gentoo-r3'
make: *** [default] Error 2
 *
 * ERROR: net-wireless/linux-wlan-ng-modules-0.2.8-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3231:  Called linux-mod_src_compile
 *             environment, line 2483:  Called die
 * The specific snippet of code:
 *               eval "emake HOSTCC=\"$(tc-getBUILD_CC)\"                                               CC=\"$(get-KERNEL_CC)\"                                     LDFLAGS=\"$(get_abi_LDFLAGS)\"                                           ${BUILD_FIXES}                                          ${BUILD_PARAMS}                     ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CC="$(get-KERNEL_CC)" LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";
 *  The die message:
 *   Unable to emake HOSTCC=x86_64-pc-linux-gnu-gcc CC=x86_64-pc-linux-gnu-gcc LDFLAGS=  WLAN_SRC=/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/work/linux-wlan-ng-0.2.8/src default
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-wireless/linux-wlan-ng-modules-0.2.8-r1/temp/environment'.
Comment 4 Stephen Kirkby 2008-11-21 09:45:35 UTC
Markus, this is probably due to the changes in the new 2.6.24 kernel. I've raised a ticket to bump the ebuild to the next version (see http://bugs.gentoo.org/show_bug.cgi?id=247898)
Comment 5 Guenther Brunthaler 2010-08-06 21:44:00 UTC
I suspect this bug might be a consequence of bug # 331467 which I have just reported.
Comment 6 Natanael Copa 2012-11-28 12:15:40 UTC
Things have happened since 2007.