[OpenAFS-devel] Re: Building OpenAFS on SmartOS

Harald Barth haba@kth.se
Thu, 08 May 2014 06:08:39 +0200 (CEST)


> gcc  -I/home/hile/openafs/src/config -I/home/hile/openafs/include -I. -I. -m64  -o rmtsysd rmtsysd.o libsys.a /home/hile/openafs/lib/librx.a libsys.a /home/hile/openafs/lib/liblwp.a /home/hile/openafs/lib/util.a -lresolv -lsocket -lnsl -lintl -ldl
> Undefined                       first referenced
>  symbol                             in file
> savecontext                         /home/hile/openafs/lib/liblwp.a(lwp.o)
> returnto                            /home/hile/openafs/lib/liblwp.a(lwp.o)
> ld: fatal: symbol referencing errors. No output written to rmtsysd
> collect2: error: ld returned 1 exit status

LWP is the old non-pthreads threads package that some parts of openafs
still uses. Here it is missing the context switching routines. IIrc
these should be in liblwp.a as well, so my guess is that someting went
wrong when liblwp.a was created. That is put together by the hideous
Makefile in src/lwp/. Savecontext is in assembler in one of the
process*.s files. From that process.o should be created via
process.ss. That can only happen if the sysname you are building for
is matched by the logic in the Makefile. So my guess is that the
combination of sysname and assembler you have does not lead to any
useful content in process.o and then the system builds a liblwp.a
where the essential parts are missing. Sorry if I sound fuzzy, was
a long time ago I was looking into that corner of the openafsbuild.

It might be useful to know what sysname you have configured and
what symbols are in your process.o.

> Is there something simple that I¢ve missed here?

I would not call it "simple" ;-)

Harald.