Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 99005 - linux-mod.eclass should warn about wrong vermagic
Summary: linux-mod.eclass should warn about wrong vermagic
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-14 06:51 UTC by David Faulkner
Modified: 2005-10-22 09:57 UTC (History)
1 user (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 David Faulkner 2005-07-14 06:51:04 UTC
I have a working Gentoo 2005.0 installation with kernel version
2.6.11-gentoo-r9. A reemerge of ndiswrapper (long story) caused modprobe
ndiswrapper to fail -- it was working perfectly well before. The symbolic link
/usr/src/linux points to the right place, and the emerge runs without incidence.
Further attempts to emerge fail in the same manner. Although this emerge log
occurred while the net8180 driver was installed, I have tried it without. Below
is a log of everything.

error message
---------------------------------------------
djf4slaptop djf4s # modprobe ndiswrapper
FATAL: Error inserting ndiswrapper
(/lib/modules/2.6.11-gentoo-r9/misc/ndiswrapper.ko): Invalid module format

emerge output
---------------------------------------------
djf4slaptop djf4s # emerge ndiswrapper
Calculating dependencies ...done!
>>> emerge (1 of 1) net-wireless/ndiswrapper-1.1-r1 to /
>>> md5 files   ;-) ndiswrapper-1.1-r1.ebuild
>>> md5 files   ;-) ndiswrapper-1.2.ebuild
>>> md5 files   ;-) files/digest-ndiswrapper-1.2
>>> md5 files   ;-) files/digest-ndiswrapper-1.1-r1
>>> md5 files   ;-) files/ndiswrapper-1.2-suspend2.patch
>>> md5 src_uri ;-) ndiswrapper-1.1.tar.gz
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     2.6.11-gentoo-r9
 * Checking for suitable kernel configuration options
>>> Unpacking source...
>>> Unpacking ndiswrapper-1.1.tar.gz to /var/tmp/portage/ndiswrapper-1.1-r1/work
* Converting ndiswrapper-1.1/driver/Makefile to use M= instead of SUBDI  [ ok
]>>> Source unpacked.
cc -Wall -g -DNDISWRAPPER_VERSION=\"1.1\"    -c -o loadndisdriver.o loadndisdriver.c
gcc -o loadndisdriver loadndisdriver.o
 * Preparing ndiswrapper module
make -C //usr/src/linux
M=/var/tmp/portage/ndiswrapper-1.1-r1/work/ndiswrapper-1.1/driver \
        NDISWRAPPER_VERSION=1.1 \
        EXTRA_VERSION= modules
make[1]: Entering directory `/usr/src/linux-2.6.11-gentoo-r9'
  CC [M]  /var/tmp/portage/ndiswrapper-1.1-r1/work/ndiswrapper-1.1/driver/hal.o
  CC [M]  /var/tmp/portage/ndiswrapper-1.1-r1/work/ndiswrapper-1.1/driver/iw_ndis.o
  CC [M]  /var/tmp/portage/ndiswrapper-1.1-r1/work/ndiswrapper-1.1/driver/loader.o
  CC [M] 
/var/tmp/portage/ndiswrapper-1.1-r1/work/ndiswrapper-1.1/driver/misc_funcs.o
  CC [M]  /var/tmp/portage/ndiswrapper-1.1-r1/work/ndiswrapper-1.1/driver/ndis.o
 CC [M] 
/var/tmp/portage/ndiswrapper-1.1-r1/work/ndiswrapper-1.1/driver/ntoskernel.o
  CC [M] 
/var/tmp/portage/ndiswrapper-1.1-r1/work/ndiswrapper-1.1/driver/pe_linker.o
  CC [M]  /var/tmp/portage/ndiswrapper-1.1-r1/work/ndiswrapper-1.1/driver/proc.o
 CC [M]  /var/tmp/portage/ndiswrapper-1.1-r1/work/ndiswrapper-1.1/driver/wrapper.o
  CC [M]  /var/tmp/portage/ndiswrapper-1.1-r1/work/ndiswrapper-1.1/driver/usb.o
  CC [M]  /var/tmp/portage/ndiswrapper-1.1-r1/work/ndiswrapper-1.1/driver/divdi3.o
  LD [M] 
/var/tmp/portage/ndiswrapper-1.1-r1/work/ndiswrapper-1.1/driver/ndiswrapper.o
  Building modules, stage 2.
  MODPOST
  CC     
/var/tmp/portage/ndiswrapper-1.1-r1/work/ndiswrapper-1.1/driver/ndiswrapper.mod.o
  LD [M] 
/var/tmp/portage/ndiswrapper-1.1-r1/work/ndiswrapper-1.1/driver/ndiswrapper.ko
make[1]: Leaving directory `/usr/src/linux-2.6.11-gentoo-r9'
>>> Test phase [not enabled]: net-wireless/ndiswrapper-1.1-r1

>>> Install ndiswrapper-1.1-r1 into /var/tmp/portage/ndiswrapper-1.1-r1/image/
category net-wireless
 * Installing ndiswrapper module
 * Preparing file for modules.d ...                                       [ ok ]man:
prepallstrip:
strip: i686-pc-linux-gnu-strip --strip-unneeded
strip: i686-pc-linux-gnu-strip --strip-unneeded
   sbin/loadndisdriver
>>> Completed installing ndiswrapper-1.1-r1 into
/var/tmp/portage/ndiswrapper-1.1-r1/image/

>>> Merging net-wireless/ndiswrapper-1.1-r1 to /
--- /etc/
--- /etc/ndiswrapper/
>>> /etc/ndiswrapper/.keep
--- /etc/modules.d/
>>> /etc/modules.d/ndiswrapper
--- /lib/
--- /lib/modules/
--- /lib/modules/2.6.11-gentoo-r9/
--- /lib/modules/2.6.11-gentoo-r9/misc/
>>> /lib/modules/2.6.11-gentoo-r9/misc/ndiswrapper.ko
--- /usr/
--- /usr/sbin/
>>> /usr/sbin/ndiswrapper
>>> /usr/sbin/ndiswrapper-buginfo
--- /usr/share/
--- /usr/share/doc/
--- /usr/share/doc/ndiswrapper-1.1-r1/
>>> /usr/share/doc/ndiswrapper-1.1-r1/README.gz
>>> /usr/share/doc/ndiswrapper-1.1-r1/INSTALL.gz
>>> /usr/share/doc/ndiswrapper-1.1-r1/AUTHORS.gz
>>> /usr/share/doc/ndiswrapper-1.1-r1/ChangeLog.gz
--- /usr/share/man/
--- /usr/share/man/man8/
>>> /usr/share/man/man8/ndiswrapper.8.gz
--- /sbin/
>>> /sbin/loadndisdriver
>>> Safely unmerging already-installed instance...
--- !mtime obj /usr/share/man/man8/ndiswrapper.8.gz
--- !mtime obj /usr/share/doc/ndiswrapper-1.1-r1/README.gz
--- !mtime obj /usr/share/doc/ndiswrapper-1.1-r1/INSTALL.gz
--- !mtime obj /usr/share/doc/ndiswrapper-1.1-r1/ChangeLog.gz
--- !mtime obj /usr/share/doc/ndiswrapper-1.1-r1/AUTHORS.gz
--- !mtime obj /usr/sbin/ndiswrapper-buginfo
--- !mtime obj /usr/sbin/ndiswrapper
--- !mtime obj /sbin/loadndisdriver
--- cfgpro obj /lib/modules/2.6.11-gentoo-r9/misc/ndiswrapper.ko
--- cfgpro dir /lib/modules/2.6.11-gentoo-r9/misc
--- cfgpro dir /lib/modules/2.6.11-gentoo-r9
--- cfgpro obj /etc/ndiswrapper/.keep
--- cfgpro dir /etc/ndiswrapper
--- cfgpro obj /etc/modules.d/ndiswrapper
--- cfgpro dir /etc/modules.d
--- !empty dir /usr/share/man/man8
--- !empty dir /usr/share/man
--- !empty dir /usr/share/doc/ndiswrapper-1.1-r1
--- !empty dir /usr/share/doc
--- !empty dir /usr/share
--- !empty dir /usr/sbin
--- !empty dir /usr
--- !empty dir /sbin
--- !empty dir /lib/modules
--- !empty dir /lib
--- !empty dir /etc
 * Removing net-wireless/ndiswrapper-1.1-r1 from moduledb.
>>> original instance of package unmerged safely.
 * Updating module dependencies for 2.6.11-gentoo-r9 ...                  [ ok ]
* Updating modules.conf ...                                              [ ok ]
* Adding module to moduledb.
 * If you would like to load this module automatically upon boot
 * please type the following as root:
 *     # echo "ndiswrapper" >> /etc/modules.autoload.d/kernel-2.6
 *

 * ndiswrapper requires .inf and .sys files from a Windows(tm) driver
 * to function. Download these to /root for example, then
 * run 'ndiswrapper -i /root/foo.inf'. After that you can delete them.
 * They will be copied to the proper location.
 * Once done, please run 'update-modules'.

 * check http://ndiswrapper.sf.net/phpwiki/index.php/List for drivers
 * Look for the following on that page for your driver:
 * Possible Hardware: 10b7:6056
10ec:8180

 * Please have a look at http://ndiswrapper.sourceforge.net/wiki/
 * for the FAQ, HowTos, Tips, Configuration, and installation
 * information.

 * Attempting to automatically reinstall any Windows drivers
 * you might already have.
 * Driver: net8180
mv: cannot overwrite directory `/tmp/net8180'
net8180 is already installed. Use -e to remove it
>>> Regenerating /etc/ld.so.cache...
>>> net-wireless/ndiswrapper-1.1-r1 merged.

>>> clean: No packages selected for removal.

>>> Auto-cleaning packages ...

>>> No outdated packages were found on your system.


 * GNU info directory index is up-to-date.



Reproducible: Always
Steps to Reproduce:
1.emerge ndiswrapper
2.modprobe ndiswrapper
3.

Actual Results:  
Error message seen above.

Expected Results:  
Loaded the ndiswrapper module.

djf4slaptop djf4s # emerge info
Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r0,
2.6.11-gentoo-r9 i686)
=================================================================
System uname: 2.6.11-gentoo-r9 i686 Pentium III (Coppermine)
Gentoo Base System version 1.6.12
dev-lang/python:     2.3.5, 2.4.1-r1
sys-apps/sandbox:    1.2.10
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O2 -pipe -fPIC -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-march=pentium3 -O2 -pipe -fPIC -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="x86 X alsa apm arts avi berkdb bitmap-fonts cdb crypt doc dvd emacs emboss
encode foomaticdb fortran gdbm gif gpm gtk gtk2 imap imlib ipv6 java jpeg libg++
libwww mad mikmod motif mozilla mp3 mpeg ncurses nls oggvorbis opengl oss pam
pcmcia pdflib perl pic png python quicktime readline sdl spell ssl tcltk tcpd
tetex truetype truetype-fonts type1-fonts usb vorbis xine xml2 xmms xv zlib
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-07-14 07:38:46 UTC
Does 1.2 work for you? Don't you have CONFIG_4KSTACKS enabled in kernel?
Comment 2 David Faulkner 2005-07-14 08:00:55 UTC
ndiswrapper-1.2 does not work, with the same error message. The kernel does not have 
CONFIG_4KSTACKS configured... I will rebuild with this option, but I did have a working 
ndiswrapper installation with this kernel (although I do not know the number now). 
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2005-07-14 08:08:31 UTC
(In reply to comment #2)
> The kernel does not have CONFIG_4KSTACKS configured... I will rebuild with
this option, but I did have a working 

No, don't!!! It usually freezes your system, that's why I asked.
Comment 4 Henrik Brix Andersen 2005-07-14 08:13:48 UTC
Did you upgrade gcc between kernel compilation and ndiswrapper compilation? If
so, you will need to re-compile the kernel with the new gcc.
Comment 5 David Faulkner 2005-07-14 10:25:54 UTC
Recompiling my kernel fixes this. Is there anyway to modify a kernel module e-build to detect if 
this is going to be a problem (i.e., emerge ndiswrapper would produce an error message 'Kernel 
compiled under gcc-x.x.x, current gcc version is y.y.y.)? Thanks.
Comment 6 Henrik Brix Andersen 2005-07-14 16:01:15 UTC
Not a bad idea... John, what do you think? If you agree, I'll try to come up
with a patch for linux-mod.eclass for this.
Comment 7 John Mylchreest (RETIRED) gentoo-dev 2005-10-13 06:20:53 UTC
We spoke about this ages ago.
Its been sat on my list now for ages.. and I really need to just do this :)

Just wanted to update the bug... I've bumped it up my todo list.
Comment 8 John Mylchreest (RETIRED) gentoo-dev 2005-10-22 09:57:35 UTC
This has now been comitted. Can yoiu please test and report?