Summary: | net-wireless/ndiswrapper-1.56 fails compilation under 2.6.36 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Bob Raitz <pappy_mcfae> |
Component: | Current packages | Assignee: | Christoph Mende (RETIRED) <angelos> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | b.brachaczek, lozza.mario, melser_regs, mobile+disabled, octavsly |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Change ioctl to unlocked_ioctl ops
ndiswrapper ebuild using the SVN trunk |
Description
Bob Raitz
2010-10-22 09:28:57 UTC
compilation results Calculating dependencies ... done! >>> Verifying ebuild manifests >>> Emerging (1 of 1) net-wireless/ndiswrapper-1.56 from Local-Portage-Overlay * ndiswrapper-1.56.tar.gz RMD160 SHA1 SHA256 size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] * Package: net-wireless/ndiswrapper-1.56 * Repository: Local-Portage-Overlay * Maintainer: peper@gentoo.org mobile@gentoo.org * USE: elibc_glibc kernel_linux userland_GNU x86 * See http://www.gentoo.org/doc/en/gentoo-kernel.xml * for a list of supported kernels. * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found kernel object directory: * /lib/modules/2.6.36/build * Found sources for kernel version: * 2.6.36 * Checking for suitable kernel configuration options... [ ok ] >>> Unpacking source... >>> Unpacking ndiswrapper-1.56.tar.gz to /var/tmp/portage/net-wireless/ndiswrapper-1.56/work >>> Source unpacked in /var/tmp/portage/net-wireless/ndiswrapper-1.56/work >>> Preparing source in /var/tmp/portage/net-wireless/ndiswrapper-1.56/work/ndiswrapper-1.56 ... * Applying ndiswrapper-1.56-ldflags.patch ... [ ok ] * Applying ndiswrapper-1.56-2.6.35.patch ... [ ok ] >>> Source prepared. >>> Configuring source in /var/tmp/portage/net-wireless/ndiswrapper-1.56/work/ndiswrapper-1.56 ... >>> Source configured. >>> Compiling source in /var/tmp/portage/net-wireless/ndiswrapper-1.56/work/ndiswrapper-1.56 ... make -j1 CC=i686-pc-linux-gnu-gcc i686-pc-linux-gnu-gcc -g -Wall -I../driver -Wl,-O1 -Wl,--as-needed -o loadndisdriver loadndisdriver.c * Preparing ndiswrapper module make -j1 HOSTCC=i686-pc-linux-gnu-gcc CROSS_COMPILE=i686-pc-linux-gnu- LDFLAGS= KSRC=/usr/src/linux KVERS=2.6.36 KBUILD=/lib/modules/2.6.36/build DISABLE_USB=1 all make -C /lib/modules/2.6.36/build M=/var/tmp/portage/net-wireless/ndiswrapper-1.56/work/ndiswrapper-1.56/driver make[1]: Entering directory `/usr/src/linux-2.6.36' LD /var/tmp/portage/net-wireless/ndiswrapper-1.56/work/ndiswrapper-1.56/driver/built-in.o MKEXPORT /var/tmp/portage/net-wireless/ndiswrapper-1.56/work/ndiswrapper-1.56/driver/crt_exports.h MKEXPORT /var/tmp/portage/net-wireless/ndiswrapper-1.56/work/ndiswrapper-1.56/driver/hal_exports.h MKEXPORT /var/tmp/portage/net-wireless/ndiswrapper-1.56/work/ndiswrapper-1.56/driver/ndis_exports.h MKEXPORT /var/tmp/portage/net-wireless/ndiswrapper-1.56/work/ndiswrapper-1.56/driver/ntoskernel_exports.h MKEXPORT /var/tmp/portage/net-wireless/ndiswrapper-1.56/work/ndiswrapper-1.56/driver/ntoskernel_io_exports.h MKEXPORT /var/tmp/portage/net-wireless/ndiswrapper-1.56/work/ndiswrapper-1.56/driver/rtl_exports.h CC [M] /var/tmp/portage/net-wireless/ndiswrapper-1.56/work/ndiswrapper-1.56/driver/crt.o CC [M] /var/tmp/portage/net-wireless/ndiswrapper-1.56/work/ndiswrapper-1.56/driver/hal.o CC [M] /var/tmp/portage/net-wireless/ndiswrapper-1.56/work/ndiswrapper-1.56/driver/iw_ndis.o CC [M] /var/tmp/portage/net-wireless/ndiswrapper-1.56/work/ndiswrapper-1.56/driver/loader.o /var/tmp/portage/net-wireless/ndiswrapper-1.56/work/ndiswrapper-1.56/driver/loader.c:834: error: unknown field ‘ioctl’ specified in initializer /var/tmp/portage/net-wireless/ndiswrapper-1.56/work/ndiswrapper-1.56/driver/loader.c:834: warning: initialization from incompatible pointer type make[2]: *** [/var/tmp/portage/net-wireless/ndiswrapper-1.56/work/ndiswrapper-1.56/driver/loader.o] Error 1 make[1]: *** [_module_/var/tmp/portage/net-wireless/ndiswrapper-1.56/work/ndiswrapper-1.56/driver] Error 2 make[1]: Leaving directory `/usr/src/linux-2.6.36' make: *** [modules] Error 2 emake failed * ERROR: net-wireless/ndiswrapper-1.56 failed: * Unable to emake HOSTCC=i686-pc-linux-gnu-gcc CROSS_COMPILE=i686-pc-linux-gnu- LDFLAGS= KSRC=/usr/src/linux KVERS=2.6.36 KBUILD='/lib/modules/2.6.36/build' DISABLE_USB=1 all * * Call stack: * ebuild.sh, line 56: Called src_compile * environment, line 3686: Called linux-mod_src_compile * environment, line 2813: Called die * The specific snippet of code: * eval "emake HOSTCC=\"$(tc-getBUILD_CC)\" CROSS_COMPILE=${CHOST}- LDFLAGS=\"$(get_abi_LDFLAGS)\" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}"; * * If you need support, post the output of 'emerge --info =net-wireless/ndiswrapper-1.56', * the complete build log and the output of 'emerge -pqv =net-wireless/ndiswrapper-1.56'. * This ebuild is from an overlay named 'Local-Portage-Overlay': '/usr/local/portage/' * The complete build log is located at '/var/tmp/portage/net-wireless/ndiswrapper-1.56/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-wireless/ndiswrapper-1.56/temp/environment'. * S: '/var/tmp/portage/net-wireless/ndiswrapper-1.56/work/ndiswrapper-1.56' >>> Failed to emerge net-wireless/ndiswrapper-1.56, Log file: >>> '/var/tmp/portage/net-wireless/ndiswrapper-1.56/temp/build.log' > /var/tmp/portage/net-wireless/ndiswrapper-1.56/work/ndiswrapper-1.56/driver/loader.c:834:
> error: unknown field ‘ioctl’ specified in initializer
> /var/tmp/portage/net-wireless/ndiswrapper-1.56/work/ndiswrapper-1.56/driver/loader.c:834:
> warning: initialization from incompatible pointer type
The problem is that the ioctl ops in struct file_operations is deprecated on 2.6.36. I should be converted to unlocked_ioctl ops.
I created a quick patch to make it working, simply converting ioctl to unlocked_ioctl, a little bit of test would be welcome.
Created attachment 251791 [details, diff]
Change ioctl to unlocked_ioctl ops
(In reply to comment #3) > Created an attachment (id=251791) [details] > Change ioctl to unlocked_ioctl ops > The patch definitely works. The proof is I'm sending this via ndiswrapper. Thanks. I think there is no need for writing custom patches, as it is already fixed upstream for some time. See http://ndiswrapper.svn.sourceforge.net/viewvc/ndiswrapper?view=revision&revision=2726. I can confirm that the upstream patch works well. Created attachment 254727 [details]
ndiswrapper ebuild using the SVN trunk
I can also confirm that the upstream fix works with kernel 2.6.36.
I have attached a ndiswrapper build taking the SVN source. To be used until a proper ebuild appears in official tree.
Due to my limited ebuild knowledge I cannot judge if the ebuild is properly written. It is based on the ebuild from the offcial tree.
+ 14 Dec 2010; Christoph Mende <angelos@gentoo.org> ndiswrapper-1.56.ebuild, + +files/ndiswrapper-1.56-2.6.36.patch: + Imported upstream patch for 2.6.36 (bug 342159) |