[OpenAFS-devel] Re: Building OpenAFS on SmartOS

Coy Hile coy.hile@coyhile.com
Thu, 8 May 2014 22:08:54 -0400


I=92ve made some further progress here, building against master; I =
managed to get the LWP stuff to build, but I had to hack up =
src/lwp/Makefile to hard-code=20
=9764 rather than $(ASFLAGS) in the assembler line to create process.o; =
my attempts to get ASFLAGS set to =9764 if using gcc (and thus gas) have =
so far failed.

It appears to build the user land fine, but then gleefully errors out =
when attempting to build the kernel module, thusly:

Building directory: MODLOAD64
gmake[4]: Entering directory `/home/hile/openafs/src/libafs/MODLOAD64'
gcc -I. -I.. -I../nfs -I/home/hile/openafs/src/crypto/hcrypto/kernel =
-I/home/hile/openafs/src -I/home/hile/openafs/src/afs =
-I/home/hile/openafs/src/afs/SOLARIS -I/home/hile/openafs/src/config =
-I/home/hile/openafs/src/rx/SOLARIS =
-I/home/hile/openafs/src/external/heimdal -I/home/hile/openafs/src =
-I/home/hile/openafs/src/afs -I/home/hile/openafs/src/afs/SOLARIS =
-I/home/hile/openafs/src/config -I/home/hile/openafs/src/fsint =
-I/home/hile/openafs/src/vlserver -I/home/hile/openafs/src/auth =
-I/home/hile/openafs/include -I/home/hile/openafs/include/afs    -I. =
-I.. -I/home/hile/openafs/src/config  -DAFSDEBUG -DKERNEL -DAFS -DVICE =
-DNFS -DUFS -DINET -DQUOTA -DGETMOUNT -D_KERNEL -DSYSV -dn -xarch=3Damd64 =
-xmodel=3Dkernel    -o afs_atomlist.o -c =
/home/hile/openafs/src/util/afs_atomlist.c
gcc: error: language model=3Dkernel not recognized
gcc: error: language model=3Dkernel not recognized
gmake[4]: *** [afs_atomlist.o] Error 1
gmake[4]: Leaving directory `/home/hile/openafs/src/libafs/MODLOAD64'
gmake[3]: *** [solaris_compdirs] Error 2
gmake[3]: Leaving directory `/home/hile/openafs/src/libafs'
gmake[2]: *** [libafs] Error 2

In src/libafs/Makefile, I see this;

KDEFS_64 =3D -xarch=3Damd64 -xmodel=3Dkernel

What does -xmodel=3Dkernel accomplish, and what=92s the relevant gccism =
there? I can=92t glean anything obvious from looking at, e.g., =
MakefileProto.LINUX.in

I=92ve pushed the first round of my changes to gerrit as:

Change-Id: Ief9026c36b4843f929e2fcf9ba05fa88618c9d98=94

remote: New Changes:
remote:   http://gerrit.openafs.org/11132
remote:
To ssh://gerrit.openafs.org/openafs.git
 * [new branch]      HEAD -> refs/for/master/build-with-gcc-on-illumos

so any help fine-tuning this is welcome.  If somebody needs a SmartOS =
box to build on, I will spin up an internet-facing instance and create =
logins as needed.

-c