Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 59872 - Obsolete include file in ppc-sources (include/linux/module.h) creates unloadable modules with gcc-3.3.3
Summary: Obsolete include file in ppc-sources (include/linux/module.h) creates unloada...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: PPC Linux
: High major (vote)
Assignee: PPC Porters
URL: http://function.linuxpower.ca/patches...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-09 09:28 UTC by Olivier Castan
Modified: 2004-08-19 17:06 UTC (History)
0 users

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 Olivier Castan 2004-08-09 09:28:51 UTC
Recently when trying to build a new 2.4 kernel or add-ons like alsa, I was not able to insmod any module :
# modprobe vfat
/lib/modules/2.4.26-ppc-r4/kernel/fs/fat/fat.o: couldn't find the kernel version the module was compiled for
/lib/modules/2.4.26-ppc-r4/kernel/fs/fat/fat.o: insmod /lib/modules/2.4.26-ppc-r4/kernel/fs/fat/fat.o failed
/lib/modules/2.4.26-ppc-r4/kernel/fs/fat/fat.o: insmod vfat failed

The modules don't have any kernel_version information in. This is due to gcc-3.3.3 which discards unusued static variables (see url).
Looking at linux-2.4 Changelog on BitKeeper include/linux/module.h changed 4 months ago to cope with this problem :
http://linux.bkbits.net:8080/linux-2.4/hist/include/linux/module.h?nav=index.html|src/|src/include|src/include/linux

The url can be used to create a patch to solve this problem.

Reproducible: Always
Steps to Reproduce:
emerge -v ppc-sources
[...]
make oldconfig
make dep && make vmlinux modules modules_install
[... after reboot with new kernel ..]
modprobe usb-storage (or any module)
Actual Results:  
Can't load any module

Expected Results:  
Load kernel modules

# LC_ALL=C gcc -v
Reading specs from /usr/lib/gcc-lib/powerpc-unknown-linux-gnu/3.3.3/specs
Configured with:
/home/portage/tmp/portage/gcc-3.3.3_pre20040408-r1/work/gcc-20040408/configure
--prefix=/usr --enable-shared --host=powerpc-unknown-linux-gnu
--enable-languages=c,c++,f77,objc,java --enable-threads=posix --enable-long-long
--disable-checking --enable-__cxa_atexit
--with-gxx-include-dir=/usr/lib/gcc-lib/powerpc-unknown-linux-gnu/3.3.3/include/g++-v3
--with-local-prefix=/usr/local --enable-shared --enable-nls
--without-included-gettext --x-includes=/usr/X11R6/include
--x-libraries=/usr/X11R6/lib --enable-interpreter --enable-java-awt=xlib
--with-x --disable-multilib --with-system-zlib --enable-cstdio=stdio
--enable-clocale=generic --enable-version-specific-runtime-libs
--target=powerpc-unknown-linux-gnu
--bindir=/usr/powerpc-unknown-linux-gnu/gcc-bin/3.3
--includedir=/usr/lib/gcc-lib/powerpc-unknown-linux-gnu/3.3.3/include
--datadir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/3.3
--mandir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/3.3/man
--infodir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/3.3/info
Thread model: posix
gcc version 3.3.3 (Gentoo Linux 3.3.3_pre20040408-r1)

# emerge info
Portage 2.0.50-r9 (default-ppc-2004.1, gcc-3.3.3, glibc-2.3.3.20040420-r0,
2.4.26-ppc-r4)
=================================================================
System uname: 2.4.26-ppc-r4 ppc 7455, altivec supported
Gentoo Base System version 1.5.2
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="ppc ~ppc"
AUTOCLEAN="yes"
CFLAGS="-O2 -pipe -mcpu=7400 -maltivec -mabi=altivec"
CHOST="powerpc-unknown-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config
/usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -mcpu=7400 -maltivec -mabi=altivec"
DISTDIR="/home/portage/distfiles"
FEATURES="ccache"
GENTOO_MIRRORS="http://gentoo.mirror.sdv.fr http://128.213.5.34/gentoo/
http://gentoo.inode.at/ http://ds.thn.htu.se/linux/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/home/portage/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.fr.gentoo.org/gentoo-portage"
USE="X X509 aalib alsa altivec arts berkdb bonobo cdr crypt cups dga dillo
directfb dv dvd dvdr encode esd faad fbcon ffmpeg flash foomaticdb gd gdbm ggi
gif gnome gnome-libs gphoto2 gpm gstreamer gtk gtk2 gtkhtml imagemagick imlib
java javascript jpeg libcaca libwww mad matroska mitshm motif mozilla
moznocompose moznoirc moznomail mpeg mpeg4 ncurses nls odbc offensive oggvorbis
opengl oss pam pdflib perl pg-hier png ppc ppds python quicktime radeon readline
sdl slang spell ssl tcltk tcpd theora tiff truetype video_cards_radeon wmf xface
xine xmms xv xvid zlib"
Comment 1 Pieter Van den Abeele (RETIRED) gentoo-dev 2004-08-19 17:06:56 UTC
We have deprecated the 2.4 kernel. A workaround is to downgrade your gcc to 3.2.