[OpenAFS] 1.2.10 build problems on 'linux from scratch'

Derrick J Brashear shadow@dementia.org
Tue, 26 Aug 2003 17:52:15 -0400 (EDT)


On Tue, 26 Aug 2003, Kevin Coffman wrote:

> > > gcc  -O2 -fomit-frame-pointer -fno-strength-reduce -fno-strict-aliasing
> > > -fno-common -pipe -march=pentium -D__KERNEL__  -DCPU=586 -DKERNEL
> > > -D_KERNEL -DMODULE -DAFS_SMP    -I. -I../ -I/home/kwc/build/openafs-1.2.
> > > 10/src/config -c ../afs/osi_module.c
> > > ../afs/osi_module.c: In function `afs_init':
> > > ../afs/osi_module.c:325: `sys_exit' undeclared (first use in this
> > > function)
> > > ../afs/osi_module.c:325: (Each undeclared identifier is reported only
> > > once
> > > ../afs/osi_module.c:325: for each function it appears in.)
> > > ../afs/osi_module.c:327: warning: assignment from incompatible pointer
> > > type
> > > make[4]: *** [osi_module.o] Error 1
> > > make[4]: Leaving directory `/home/kwc/build/openafs-1.2.10/src/libafs/MO
> > > DLOAD-2.4.20-MP'
> > > make[3]: *** [linux_compdirs] Error 2
> > > make[3]: Leaving directory `/home/kwc/build/openafs-1.2.10/src/libafs'
> > > make[2]: *** [libafs] Error 2
> > > make[2]: Leaving directory `/home/kwc/build/openafs-1.2.10'
> > > make[1]: *** [build] Error 2
> > > make[1]: Leaving directory `/home/kwc/build/openafs-1.2.10'
> > > make: *** [all] Error 2
> > > -bash-2.05b$ ls
> > >
> > > The kernel header files are located in /usr/include/linux and I have
> >
> > It would be nicer if you could point at e.g. /usr/src/linux-whatever,
> > where the kernel was compiled.
>
> Yeah, it would be nice ...

Well, the "is sys_call_table exported" stuff might actually work right.

> > including the modversions crap which would be in
> > include/linux/modules/*.ver?
>
> OK, that reminds me.  /usr/include/linux/modules is empty on this
> system.  I applied this patch previously to the cvs head version and to
> 1.2.10.

Well, if nothing else is including it, it's needed. Are you using a
versioned kernel? Without this, you should get a module with refs to
sys_call_table and not sys_call_table_R12345678, which means the kernel
module just won't load, unless you use insmod -f. We don't want people to
use insmod -f.

Is something else including it now?

> -bash-2.05b$ diff -u src/config/param.i386_linux24.h.orig src/config/param.i386_linux24.h
> --- src/config/param.i386_linux24.h.orig   2003-07-16 16:41:17.000000000 -0400
> +++ src/config/param.i386_linux24.h        2003-07-16 16:32:03.000000000 -0400
> @@ -47,10 +47,12 @@
>  #define AFS_GLOBAL_SUNLOCK
>  #endif
>
> +/* KWC: This doesn't seem to be needed ???
>  #if defined(MODULE) && defined(CONFIG_MODVERSIONS)
>  #define MODVERSIONS
>  #include <linux/modversions.h>
>  #endif
> +   KWC */
>
>  #endif /* __KERNEL__  && !DUMP_KERNEL*/
>