public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Problem compiling 2.4.28 [dn_neigh.c]
@ 2004-11-20 19:16 Linux Mailing Lists
  2004-11-23  7:27 ` Marcelo Tosatti
  0 siblings, 1 reply; 2+ messages in thread
From: Linux Mailing Lists @ 2004-11-20 19:16 UTC (permalink / raw)
  To: linux-kernel


Hello,

While compiling the lastest 2.4 kernel I stumbled on this error:

gcc -D__KERNEL__ -I/usr/src/linux-2.4.28/include -Wall -Wstrict-prototypes
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer
-pipe -mpreferred-stack-boundary=2 -march=i586  -DMODULE  -nostdinc
-iwithprefix include -DKBUILD_BASENAME=dn_dev  -c -o dn_dev.o dn_dev.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.28/include -Wall -Wstrict-prototypes
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer
-pipe -mpreferred-stack-boundary=2 -march=i586  -DMODULE  -nostdinc
-iwithprefix include -DKBUILD_BASENAME=dn_neigh  -c -o dn_neigh.o
dn_neigh.c
dn_neigh.c:584: `THIS_MODULE' undeclared here (not in a function)
dn_neigh.c:584: initializer element is not constant
dn_neigh.c:584: (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/net/decnet'
make[1]: *** [_modsubdir_decnet] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.28/net'
make: *** [_mod_net] Error 2

I followed the same steps as always to do the compilation:

- I copied linux-2.4.27/.config to linux-2.4.28/.config
- I made an "make oldconfig" in the 2.4.28 directory
- Then I tried to compile the kernel and the modules, as usual, with "make
dep; make clean; make bzImage; make modules"

I Googled the archives of the list to see if someone had reported this
error, but I didn't seem to find anything about it. I found a patch for a
similar error (from quite a while ago) and tried it, and the compilation
went fine.

The patch is very simple, I just added the line:

#include <linux/module.h>

To dn_neigh.c and ¡voilá! the compilation went without a single warning at
that point.

I got this error in three different Linux machines.

Greetings.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problem compiling 2.4.28 [dn_neigh.c]
  2004-11-20 19:16 Problem compiling 2.4.28 [dn_neigh.c] Linux Mailing Lists
@ 2004-11-23  7:27 ` Marcelo Tosatti
  0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2004-11-23  7:27 UTC (permalink / raw)
  To: Linux Mailing Lists; +Cc: linux-kernel

On Sat, Nov 20, 2004 at 08:16:17PM +0100, Linux Mailing Lists wrote:
> 
> Hello,
> 
> While compiling the lastest 2.4 kernel I stumbled on this error:
> 
> gcc -D__KERNEL__ -I/usr/src/linux-2.4.28/include -Wall -Wstrict-prototypes
> -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer
> -pipe -mpreferred-stack-boundary=2 -march=i586  -DMODULE  -nostdinc
> -iwithprefix include -DKBUILD_BASENAME=dn_dev  -c -o dn_dev.o dn_dev.c
> gcc -D__KERNEL__ -I/usr/src/linux-2.4.28/include -Wall -Wstrict-prototypes
> -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer
> -pipe -mpreferred-stack-boundary=2 -march=i586  -DMODULE  -nostdinc
> -iwithprefix include -DKBUILD_BASENAME=dn_neigh  -c -o dn_neigh.o
> dn_neigh.c
> dn_neigh.c:584: `THIS_MODULE' undeclared here (not in a function)
> dn_neigh.c:584: initializer element is not constant
> dn_neigh.c:584: (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/net/decnet'
> make[1]: *** [_modsubdir_decnet] Error 2
> make[1]: Leaving directory `/usr/src/linux-2.4.28/net'
> make: *** [_mod_net] Error 2
> 
> I followed the same steps as always to do the compilation:
> 
> - I copied linux-2.4.27/.config to linux-2.4.28/.config
> - I made an "make oldconfig" in the 2.4.28 directory
> - Then I tried to compile the kernel and the modules, as usual, with "make
> dep; make clean; make bzImage; make modules"
> 
> I Googled the archives of the list to see if someone had reported this
> error, but I didn't seem to find anything about it. I found a patch for a
> similar error (from quite a while ago) and tried it, and the compilation
> went fine.
> 
> The patch is very simple, I just added the line:
> 
> #include <linux/module.h>

Yep.

> 
> To dn_neigh.c and ¡voilá! the compilation went without a single warning at
> that point.
> 
> I got this error in three different Linux machines.

Fixed in 2.4 BK tree.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-11-23 12:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-20 19:16 Problem compiling 2.4.28 [dn_neigh.c] Linux Mailing Lists
2004-11-23  7:27 ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox