[OpenAFS-devel] Compiling for Usermode-Linux?

Brian C. DeRocher brian.derocher@mitretek.org
Thu, 6 Mar 2003 15:14:57 -0500


--Boundary-02=_Sx6Z+F01hFfjIrV
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Description: signed data
Content-Disposition: inline

Marcus,

I'm afraid i can't answer your question directly, but i think our problems=
=20
stem from the same source.

I'm also trying to compile openafs for user mode linux (UML) before i deplo=
y=20
it into a production environment.  I'm getting used to UML, but OpenAFS is=
=20
all new to me.

These are the commands i use:
% tar xjf kernel-source-2.4.20.tar.bz2
% tar xzf openafs.tar.gz
% cd kernel-source-2.4.20
% make-kpkg --added_patches uml --arch um configure
% make-kpkg --added_patches uml --arch um modules_image

I though i can get away without building the entire kernel, but please corr=
ect=20
me if i'm wrong.

The error i get is:
=2E....
Building in directory: MODLOAD-2.4.20-1um-MP
make[6]: Entering directory=20
`/usr/src/modules/openafs/src/libafs/MODLOAD-2.4.20-1um-MP'
gcc   -O2 -fomit-frame-pointer -fno-strength-reduce -fno-strict-aliasing=20
=2Dfno-common -pipe -march=3Dpentium -D__KERNEL__  -DCPU=3D586 -DKERNEL -D_=
KERNEL=20
=2DDMODULE -DAFS_SMP    -I. -I../ -I/usr/src/modules/openafs/src/config -c=
=20
=2E./afs/afs_atomlist.c;
gcc   -O2 -fomit-frame-pointer -fno-strength-reduce -fno-strict-aliasing=20
=2Dfno-common -pipe -march=3Dpentium -D__KERNEL__  -DCPU=3D586 -DKERNEL -D_=
KERNEL=20
=2DDMODULE -DAFS_SMP    -I. -I../ -I/usr/src/modules/openafs/src/config -c=
=20
=2E./afs/afs_lhash.c;
gcc   -O2 -fomit-frame-pointer -fno-strength-reduce -fno-strict-aliasing=20
=2Dfno-common -pipe -march=3Dpentium -D__KERNEL__  -DCPU=3D586 -DKERNEL -D_=
KERNEL=20
=2DDMODULE -DAFS_SMP    -I. -I../ -I/usr/src/modules/openafs/src/config -c=
=20
=2E./afs/afs_analyze.c;
In file included from ../linux/prefetch.h:13,
                 from ../linux/list.h:6,
                 from ../linux/wait.h:14,
                 from ../afs/sysincludes.h:51,
                 from ../afs/afs_analyze.c:19:
=2E./asm/processor.h:56: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not i=
n a=20
function)
=2E./asm/processor.h:56: requested alignment is not a constant
In file included from ../linux/wait.h:16,
                 from ../afs/sysincludes.h:51,
                 from ../afs/afs_analyze.c:19:
=2E./linux/spinlock.h:165: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not=
 in a=20
function)
=2E./linux/spinlock.h:166: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not=
 in a=20
function)
=2E./linux/spinlock.h:166: requested alignment is not a constant
make[6]: *** [afs_analyze.o] Error 1
make[6]: Leaving directory=20
`/usr/src/modules/openafs/src/libafs/MODLOAD-2.4.20-1um-MP'
make[5]: *** [linux_compdirs] Error 2
make[5]: Leaving directory `/usr/src/modules/openafs/src/libafs'
make[4]: *** [libafs] Error 2
make[4]: Leaving directory `/usr/src/modules/openafs'
make[3]: *** [build] Error 2
make[3]: Leaving directory `/usr/src/modules/openafs'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/modules/openafs'
make[1]: *** [build-modules-stamp] Error 2
make[1]: Leaving directory `/usr/src/modules/openafs'
Module /usr/src/modules/openafs failed.
Hit return to Continue

So i check out asm/processor.h, but asm links to asm-um, and asm-um doesn't=
=20
have a processor.h!

Oddly enough, i notice that /usr/src/modules/openafs/src/libafs/asm is link=
ed=20
directly to /usr/src/kernel-source-2.4.20/include/asm-i386, which doesn't=20
seem right, but i'm no kernel expert.

any guesses?

thanks,
Brian

--Boundary-02=_Sx6Z+F01hFfjIrV
Content-Type: application/pgp-signature
Content-Description: signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iQCVAwUAPmesUm5Q6fdPj+zIAQL7SgP9Gz89WCQwpG/5uTN1zc1t7+bePQHzGNB0
tVvEqK8C2vNo5DGCpYgk6J13bXlYeZq1awyFfnORatRevYi/eUxy/YrK89dbzxzh
NyCvjinzCDjFMVvPJryU5u3sNVnfdbphUl/+azzizWJbZ6T7t3yF+tbSPF2i0RrB
CSfHfnh+H1A=
=XUnI
-----END PGP SIGNATURE-----

--Boundary-02=_Sx6Z+F01hFfjIrV--