Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 77181 - gentoo-sources-2.4.28-r[457] "modules" target does not compile
Summary: gentoo-sources-2.4.28-r[457] "modules" target does not compile
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Tim Yamin (RETIRED)
URL:
Whiteboard:
Keywords:
: 78611 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-01-08 15:36 UTC by John Altstadt
Modified: 2005-02-20 09:45 UTC (History)
1 user (show)

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


Attachments
log from the kernel build (genkernel.log,983.44 KB, text/plain)
2005-01-08 22:35 UTC, John Altstadt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Altstadt 2005-01-08 15:36:25 UTC
Compiling gentoo-sources-2.4.28-r4 failed to compile the "modules" target when using genkernel-3.1.0c. Checking /var/log/genkernel.log, it looks like the compile failed at dn_neigh.c with an undeclared constant.


Reproducible: Always
Steps to Reproduce:
1. emerge gentoo-sources
2. cd /usr/src
3. rm linux
4. ln -s linux-2.4.28-gentoo-r4 linux
5. genkernel --bootsplash all

Actual Results:  
piste src # genkernel --bootsplash all
* Gentoo Linux Genkernel; Version 3.1.0c
* Compiling Linux Kernel 2.4.28-gentoo-r4 for x86...

* mount: /boot mounted successfully!
* kernel: >> Running mrproper...
* config: Using config from /usr/share/genkernel/x86/kernel-config-2.4
*         Previous config backed up to .config.bak
*         >> Running oldconfig...
* kernel: >> Cleaning...
* kernel: >> Making dependencies...
*         >> Compiling 2.4.28-gentoo-r4 bzImage...
*         >> Compiling 2.4.28-gentoo-r4 modules...
* ERROR: Failed to compile the "modules" target...

* -- Grepping log... --
...
[many, many pages of deleted text]
...
* -- End log... --

* Please consult /var/log/genkernel.log for more information and any
* errors that were reported above.

* Report any genkernel bugs to bugs.gentoo.org and
* assign your bug to genkernel@gentoo.org. Please include
* as much information as you can in your bug report; attaching
* /var/log/genkernel.log so that your issue can be dealt with effectively.
* 
* Please do *not* report compilation failures as genkernel bugs!
* 

The errors listed in /var/log/genkernel.log were:
...
gcc -D__KERNEL__ -I/usr/src/linux-2.4.28-gentoo-r4/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe
-mpreferred-stack-boundary=2 -march=i586  -DMODULE  -nostdinc -iwithprefix
include -DKBUILD_BASENAME=dn_neigh  -c -o dn_neigh.o dn_neigh.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.28-gentoo-r4/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe
-mpreferred-stack-boundary=2 -march=i586  -DMODULE  -nostdinc -iwithprefix
include -DKBUILD_BASENAME=eepro100  -c -o eepro100.o eepro100.c
dn_neigh.c:584: error: `THIS_MODULE' undeclared here (not in a function)
dn_neigh.c:584: error: initializer element is not constant
dn_neigh.c:584: error: (near initialization for `dn_neigh_seq_fops.owner')
make[2]: *** [dn_neigh.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.4.28-gentoo-r4/net/decnet'
make[1]: *** [_modsubdir_decnet] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.28-gentoo-r4/net'
make: *** [_mod_net] Error 2
make: *** Waiting for unfinished jobs....
...

All other occurances of the word "error" in the log file were either comments,
file names, or compiler directives.


Expected Results:  
Compiled the new kernel.


piste root # emerge info
Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.4.20040808-r1,
2.4.26-gentoo-r14 i686)
=================================================================
System uname: 2.4.26-gentoo-r14 i686 AMD Duron(tm) Processor
Gentoo Base System version 1.4.16
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.90.0.1.1-r3
Headers:  sys-kernel/linux-headers-2.4.19-r1,sys-kernel/linux-headers-2.4.21-r1
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=athlon-xp -funroll-loops -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown
/usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=athlon-xp -funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distcc distlocks maketest sandbox severe
sfperms strict userpriv"
GENTOO_MIRRORS="http://128.213.5.34/gentoo/ http://cudlug.cudenver.edu/gentoo/
http://gentoo.noved.org/ http://mirror.tucdemonic.org/gentoo/
http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow X acl alsa apache2 apm arts artswrappersuid avi berkdb
bitmap-fonts bonobo cdr cjk crypt cups curl dga directfb divx4linux doc dvb dvd
dvdread emacs encode esd ethereal fam fastcgi fbcon foomaticdb fortran gb gd
gdbm gif gnome gpm gtk gtk2 gtkhtml guile imap imlib innodb ipv6 java jpeg kde
libwww live mad maildir mailwrapper mikmod mmx motif mozilla mpeg mysql nas
ncurses network nls odbc ofx oggvorbis opengl oss pam pda pdflib perl png python
qt quicktime quotes readline ruby samba sasl sdl slang slp spell sse ssl svga
tcltk tcpd tetex theora tiff truetype unicode usb wmf xml xml2 xmms xv xvid zeo
zlib"

piste root #
Comment 1 John Altstadt 2005-01-08 22:35:27 UTC
Created attachment 47998 [details]
log from the kernel build
Comment 2 Tim Yamin (RETIRED) gentoo-dev 2005-01-09 01:07:30 UTC
If you add #include <linux/module.h> to net/decnet/dn_neigh.c does that fix the issue?
Comment 3 John Altstadt 2005-01-09 08:44:58 UTC
Yes, it does fix the problem.

Oddly enough, there are many other files that have similar source code, i.e. use THIS_MODULE but do not include <linux/module.h>. Perhaps they include the file through another .h file. To see a list of these files, run this command from the linux-2.4.28-gentoo-r4 directory:
  grep -L 'linux\/module\.h' `grep -rl THIS_MODULE *` | egrep -v '(\.o|\.h)'
Comment 4 John Altstadt 2005-01-09 17:33:12 UTC
Oops. Sorry if I was a bit obtuse there.

The problem has been completely fixed by the addition of the single line of code. On two different machines even. They are both happily running with the new kernel.

My further comments were just implying that I don't understand why the build worked now, because there are plenty of other files that use the same identifier without explicitly including the definition. I have searched the new log files and they only contain the string "error" (in any mix of case) inside comment strings, file names, and compiler directives.
Comment 5 John Altstadt 2005-01-12 18:36:18 UTC
The same problem exists for gentoo-sources-2.4.28-r5 and the same solution fixes it.
Comment 6 Tim Yamin (RETIRED) gentoo-dev 2005-01-19 07:43:42 UTC
*** Bug 78611 has been marked as a duplicate of this bug. ***
Comment 7 Sérgio Curto 2005-01-20 18:00:47 UTC
this isn't a genkernel bug, tryed to compile without genkernel and had the same problem
Comment 8 Tim Yamin (RETIRED) gentoo-dev 2005-02-17 10:14:24 UTC
Fixed in 2.4.28-r6; thanks!
Comment 9 John Altstadt 2005-02-19 11:32:50 UTC
Sorry to be the bearer of bad news, but the last emerge sync didn't download 2.4.28-r6. Instead it delivered 2.4.28-r7, which is missing the line:
	${FILESDIR}/${PN}-2.4.28.77181.patch
from UNIPATCH_LIST.

I added this line back in and now everything builds properly.
Comment 10 Tim Yamin (RETIRED) gentoo-dev 2005-02-19 13:23:15 UTC
Oops, fixed now. Thanks; sorry that I forgot to add that in.
Comment 11 John Altstadt 2005-02-20 09:45:43 UTC
Verified that the build works.

Thanks.