[OpenAFS-devel] Re: [OpenAFS] jafs et al

Marcus Watts mdw@umich.edu
Fri, 16 Mar 2007 04:24:43 -0500


Russ Allbery <rra@stanford.edu> wrote:
> The current set of libraries required by the AFS Perl module are:
> 
>     -lbos
>     -lvolser
>     -lvldb
>     -lafsrpc
>     -lafsauthent
>     -lcmd
>     -lusd
>     -laudit
>     -lutil
>     -lutil -lafsrpc -lutil
>     -lutil -lafsauthent -lutil

That works?  How?  bos, vldb, volser, are presumably all lwp
versions; afsrpc & afsauthent should be pthread versions -- and
I have no idea what -lutil gets in your environment; that should be -lafsutil
In my environment, /usr/lib/libutil.a gets me some part of "libc6-dev".
Do all the various functions of AFS::* actually work?  Mixing
pthread & lwp versions of openafs functions will likely result
in core dumps, hangs, or other dysfunctional behavior.

I just built a copy of "AFS-2.4.0", which is apparently the last update
posted to cpan 20 feb 2006.  It wanted this:
-L/tmp/m40/usr/lib \
-L/tmp/m40/usr/lib/afs \
-lkauth \
-lprot \
-lbos \
-lrx \
-lvolser \
-lvldb \
-lcmd \
-lubik \
-lauth \
-lrxkad \
-lrxstat \
-lrx \
-lsys \
-ldes \
-llwp \
/tmp/m40/usr/lib/afs/libcom_err.a \
/tmp/m40/usr/lib/afs/util.a \
-lusd \
-laudit \
-lresolv
That's not the right order, but it's very close to right.

Here's a simpler order that should be right:
-L/tmp/m40/usr/lib \
-L/tmp/m40/usr/lib/afs \
-lkauth \
-lprot \
-lbos \
-lvolser \
-lvldb \
-lcmd \
-lubik \
-lauth \
-lrxkad \
-lrxk5 \
-lsys \
-lrx \
-ldes \
-llwp \
/tmp/m40/usr/lib/afs/libcom_err.a \
-lafsutil \
-lusd \
-L/usr/local/mit-k5/lib \
-lkrb5 \
-lk5crypto \
-lresolv

-lrx can be supplied exactly once after -lsys.
-lrxk5 is because I linked against openafs 1.5.15 + m40.
-lcmd is only because -lvolser contains vsprocs.o which
	references "initialize_CMD_error_table".  This doesn't
	need to be there.
-lrxstat shouldn't be at all necessary,
	I don't know why that was there.
-laudit is only necessary to pick up osi_audit().  A local dummy
	copy of that can be supplied (it's only used in server code,
	and will never be called in client side code like AFS::).
	With any recent copy of openafs, it can be left out entirely.
-lafsutil can be used in place of afs/util.a.
-lkrb5 -lk5crypto are bits of k5 needed by rxk5.  Some
	versions of k5 might need -lkrb5support.

				-Marcus Watts