Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 409271 - net-wireless/ndiswrapper-1.57 with sys-kernel/{vanilla,gentoo}-sources-3.3.0 - work/ndiswrapper-1.57/driver/ndis.c:2657:24: error: ‘struct kernel_stat’ has no member named ‘cpustat’
Summary: net-wireless/ndiswrapper-1.57 with sys-kernel/{vanilla,gentoo}-sources-3.3.0 ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Christoph Mende (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-22 07:36 UTC by Bob Raitz
Modified: 2012-05-06 19:15 UTC (History)
2 users (show)

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


Attachments
A patch + ebuild allowing to compile (ndiswrapper-fix-build.tar.gz,2.27 KB, patch)
2012-05-01 11:18 UTC, Xavier Forestier
Details | Diff
ndiswrapper-1.57.ebuild : Same as previous but untar (ndiswrapper-1.57.ebuild,2.90 KB, text/plain)
2012-05-01 11:20 UTC, Xavier Forestier
Details
ndiswrapper-1.57-3.3.0-fix-build.patch : Same as previous but untar (ndiswrapper-1.57-3.3.0-fix-build.patch,1.42 KB, patch)
2012-05-01 11:21 UTC, Xavier Forestier
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bob Raitz 2012-03-22 07:36:27 UTC
ndiswrapper fails compilation phase when compiled against either vanilla or gentoo sources-3.3.0

Log below:

pappy-lap / # MAKEOPTS='-j1' FEATURES='-distcc' emerge -av ndiswrapper

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] net-wireless/ndiswrapper-1.57  USE="-debug -usb" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No] 

>>> Verifying ebuild manifests
>>> Running pre-merge checks for net-wireless/ndiswrapper-1.57
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/3.3.0-gentoo/build
 * Found sources for kernel version:
 *     3.3.0-gentoo
 * Checking for suitable kernel configuration options...                 [ ok ]

>>> Emerging (1 of 1) net-wireless/ndiswrapper-1.57
 * ndiswrapper-1.57.tar.gz RMD160 SHA1 SHA256 size ;-) ...               [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/3.3.0-gentoo/build
 * Found sources for kernel version:
 *     3.3.0-gentoo
>>> Unpacking source...
>>> Unpacking ndiswrapper-1.57.tar.gz to /var/tmp/portage/net-wireless/ndiswrapper-1.57/work
>>> Source unpacked in /var/tmp/portage/net-wireless/ndiswrapper-1.57/work
>>> Preparing source in /var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57 ...
 * Applying ndiswrapper-1.56-cflags.patch ...                            [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57 ...
make -j1 CC=i686-pc-linux-gnu-gcc 
i686-pc-linux-gnu-gcc -march=prescott -O2 -pipe -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=3.3.0-gentoo KBUILD=/lib/modules/3.3.0-gentoo/build DISABLE_USB=1 all 
make -C /lib/modules/3.3.0-gentoo/build M=/var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57/driver
make[1]: Entering directory `/usr/src/linux-3.3.0-gentoo'
  LD      /var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57/driver/built-in.o
  MKEXPORT /var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57/driver/crt_exports.h
  MKEXPORT /var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57/driver/hal_exports.h
  MKEXPORT /var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57/driver/ndis_exports.h
  MKEXPORT /var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57/driver/ntoskernel_exports.h
  MKEXPORT /var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57/driver/ntoskernel_io_exports.h
  MKEXPORT /var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57/driver/rtl_exports.h
  CC [M]  /var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57/driver/crt.o
  CC [M]  /var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57/driver/hal.o
  CC [M]  /var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57/driver/iw_ndis.o
  CC [M]  /var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57/driver/loader.o
  CC [M]  /var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57/driver/ndis.o
/var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57/driver/ndis.c: In function ‘NdisGetCurrentProcessorCounts’:
/var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57/driver/ndis.c:2657:24: error: ‘struct kernel_stat’ has no member named ‘cpustat’
/var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57/driver/ndis.c:2658:31: error: ‘struct kernel_stat’ has no member named ‘cpustat’
/var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57/driver/ndis.c:2659:17: error: ‘struct kernel_stat’ has no member named ‘cpustat’
make[2]: *** [/var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57/driver/ndis.o] Error 1
make[1]: *** [_module_/var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57/driver] Error 2
make[1]: Leaving directory `/usr/src/linux-3.3.0-gentoo'
make: *** [modules] Error 2
 * ERROR: net-wireless/ndiswrapper-1.57 failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of 'emerge --info =net-wireless/ndiswrapper-1.57',
 * the complete build log and the output of 'emerge -pqv =net-wireless/ndiswrapper-1.57'.
 * The complete build log is located at '/var/tmp/portage/net-wireless/ndiswrapper-1.57/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-wireless/ndiswrapper-1.57/temp/environment'.
 * S: '/var/tmp/portage/net-wireless/ndiswrapper-1.57/work/ndiswrapper-1.57'

>>> Failed to emerge net-wireless/ndiswrapper-1.57, Log file:

>>>  '/var/tmp/portage/net-wireless/ndiswrapper-1.57/temp/build.log'
Comment 1 Bob Raitz 2012-03-22 07:37:22 UTC
pappy-lap / # emerge --info
Portage 2.1.10.49 (default/linux/x86/10.0, gcc-4.5.3, glibc-2.14.1-r2, 3.2.12 i686)
=================================================================
System uname: Linux-3.2.12-i686-Intel-R-_Celeron-R-_M_CPU_440_@_1.86GHz-with-gentoo-2.1
Timestamp of tree: Thu, 22 Mar 2012 06:00:01 +0000
distcc 3.1 i686-pc-linux-gnu [enabled]
app-shells/bash:          4.2_p24
dev-lang/python:          2.7.2-r3
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.9.3
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.5.1-r1
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.2-r1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r2
Repositories: gentoo Local-Portage-Overlay
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA Broadcom dlj-1.1 AdobeFlash-10.3 Oracle-BCLA-JavaSE"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=prescott -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n --quiet-build=n"
FEATURES="assume-digests binpkg-logs distcc distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa ao apache2 apng aspell audiofile avi bash-completion berkdb bitmap-fonts bzip2 cairo cdr cgi cli consolekit cracklib crypt css cups cxx dbus declarative dlloader dri dts dv dvd dvdr dvdread eds encode fam fbcon ffmpeg fftw flac fontconfig foomaticdb fortran gdbm gif gimp gles2 glib gnutls gpm gsl gtk gudev handboook iconv jpeg kde ladspa lame libsamplerate lm_sensors mad mikmod mmx mng modules mp3 mp4 mpeg mudflap mysql nas ncurses nls nptl nptlonly objc ogg opengl openmp oss pam pcre pdf perl php png pppd pyqt4 python qt3support qt4 quicktime readline reflection samba sdl semantic-desktop session slang slp sndfile spell spl sql sqlite sse sse2 ssl startup-notification svg swat sysfs tcpd theora thunar tiff truetype udev unicode usb v4l v4l2 vaapi vhosts vidix vorbis webkit wifi win32codecs wxwindows x264 x86 xcb xine xml xorg xscreensaver xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Christophe PEREZ 2012-04-10 19:08:46 UTC
same here with gentoo-sources 3.3.1
Comment 3 Xavier Forestier 2012-05-01 11:18:42 UTC
Created attachment 310555 [details, diff]
A patch + ebuild allowing to compile

To apply patch ,as root :
create a folder:
# mkdir -p /usr/local/portage/net-wireless/ndiswrapper/files/

enter folder, and unzip attachment:
# cd /usr/local/portage/net-wireless/ndiswrapper/
# tar xfz ndiswrapper-fix-build.tar.gz

now install ebuild :
# ebuild ndiswrapper-1.57.ebuild digest
# ebuild ndiswrapper-1.57.ebuild install
Comment 4 Xavier Forestier 2012-05-01 11:20:46 UTC
Created attachment 310557 [details]
ndiswrapper-1.57.ebuild : Same as previous but untar

To be put in /usr/local/portage/net-wireless/ndiswrapper
Comment 5 Xavier Forestier 2012-05-01 11:21:22 UTC
Comment on attachment 310557 [details]
ndiswrapper-1.57.ebuild : Same as previous but untar

># Copyright 1999-2012 Gentoo Foundation
># Distributed under the terms of the GNU General Public License v2
># $Header: /var/cvsroot/gentoo-x86/net-wireless/ndiswrapper/ndiswrapper-1.57.ebuild,v 1.1 2012/02/19 11:10:51 angelos Exp $
>
>EAPI=4
>inherit base linux-mod toolchain-funcs eutils
>
>DESCRIPTION="Wrapper for using Windows drivers for some wireless cards"
>HOMEPAGE="http://ndiswrapper.sourceforge.net/"
>SRC_URI="mirror://sourceforge/${PN}/stable/${PV}/${P}.tar.gz"
>
>LICENSE="GPL-2"
>KEYWORDS="~amd64 ~x86"
>IUSE="debug usb"
>
>DEPEND="sys-apps/pciutils"
>RDEPEND="${DEPEND}
>	net-wireless/wireless-tools"
>
>PATCHES=( "${FILESDIR}"/${PN}-1.56-cflags.patch )
>MODULE_NAMES="ndiswrapper(misc:${S}/driver)"
>BUILD_TARGETS="all"
>MODULESD_NDISWRAPPER_ALIASES=("wlan0 ndiswrapper")
>
>pkg_pretend() {
>	CONFIG_CHECK="WEXT_PRIV"
>	use usb && CONFIG_CHECK="${CONFIG_CHECK} USB"
>	ERROR_USB="You need to enable USB support in your kernel to use usb support in ndiswrapper."
>	ERROR_WEXT_PRIV="Your kernel does not support WEXT_PRIV. To enable it you need to enable a wireless driver that enables it, for example PRISM54 or IPW2200"
>	linux-mod_pkg_setup
>}
>
>src_compile() {
>	local params
>
>	# Enable verbose debugging information
>	if use debug; then
>		params="DEBUG=3"
>		use usb && params="${params} USB_DEBUG=1"
>	fi
>
>	cd utils
>	emake CC=$(tc-getCC)
>
>	use usb || params="${params} DISABLE_USB=1"
>
>	BUILD_PARAMS="KSRC=${KV_DIR} KVERS=${KV_FULL} KBUILD='${KV_OUT_DIR}' ${params}"
>	linux-mod_src_compile
>}
>
>src_install() {
>	dodoc AUTHORS ChangeLog INSTALL README
>	doman ndiswrapper.8
>
>	keepdir /etc/ndiswrapper
>
>	linux-mod_src_install
>
>	cd utils
>	emake DESTDIR="${D}" install
>}
>
>src_unpack() {
>	unpack ${A}
>	cd "${S}"
>	epatch "${FILESDIR}"/ndiswrapper-1.57-3.3.0-fix-build.patch
>}
>
>pkg_postinst() {
>	linux-mod_pkg_postinst
>
>	echo
>	elog "NDISwrapper requires .inf and .sys files from a Windows(tm) driver"
>	elog "to function. Download these to /root for example, then"
>	elog "run 'ndiswrapper -i /root/foo.inf'. After that you can delete them."
>	elog "They will be copied to /etc/ndiswrapper/."
>	elog "Once done, please run 'update-modules'."
>	echo
>
>	elog "Please look at ${HOMEPAGE}"
>	elog "for the FAQ, HowTos, tips, configuration, and installation"
>	elog "information."
>	echo
>
>	for i in $(lspci -n | egrep '(0280|0200):' |  cut -d' ' -f1)
>	do
>		i_desc=$(lspci -nn | grep "$i" | awk -F': ' '{print $2}' | awk -F'[' '{print $1}')
>		if [[ -n "${i_desc}" ]] ; then
>			elog "Possible hardware: ${i_desc}"
>		fi
>	done
>
>	echo
>	elog "NDISwrapper devs need support (_hardware_, cash)."
>	elog "Don't hesitate if you can help."
>	elog "See ${HOMEPAGE} for details."
>	echo
>
>	if [[ ${ROOT} == "/" ]]; then
>
>		einfo "Attempting to automatically reinstall any Windows drivers"
>		einfo "you might already have."
>		echo
>
>		local driver
>		for driver in $(ls /etc/ndiswrapper) ; do
>			einfo "Driver: ${driver}"
>			mv "/etc/ndiswrapper/${driver}" "${T}"
>			ndiswrapper -i "${T}/${driver}/${driver}.inf"
>		done
>	fi
>}
Comment 6 Xavier Forestier 2012-05-01 11:21:58 UTC
Created attachment 310559 [details, diff]
ndiswrapper-1.57-3.3.0-fix-build.patch : Same as previous but untar
Comment 7 Xavier Forestier 2012-05-01 11:22:30 UTC
Comment on attachment 310557 [details]
ndiswrapper-1.57.ebuild : Same as previous but untar

To be put in folder /usr/local/portage/net-wireless/ndiswrapper
Comment 8 Bob Raitz 2012-05-04 05:27:29 UTC
Please forgive my tardiness in getting back to everyone on this. The ebuild/patch combination works for me, as evidenced by the fact that this is being posted with my wireless network device. 

Thanks.
Comment 9 emalele 2012-05-05 20:18:54 UTC
Hi,

the same problem also with the latest stable 3.2.12 and ndiwrapper 1.5.6.

Now I'll try the patch on 1.5.7.

My error is not about cpustat but something about net_priv.
Comment 10 Christoph Mende (RETIRED) gentoo-dev 2012-05-06 19:15:32 UTC
Just committed 1.58_rc1 which compiles fine against 3.3.4 here