[OpenAFS] Re: Adding -fPIC to openafs rpms builds?

Russ Allbery rra@stanford.edu
Mon, 03 Nov 2008 17:45:38 -0800

Ansgar Burchardt <ansgar@2008.43-1.org> writes:
> Jason Edgecombe <jason@rampaginggeek.com> writes:

>> We have been wrestling with mod_waklog on at work, and now it complains
>> that the openafs libraries weren't compiled with the -fPIC compiler
>> option. Since we're using the openafs rhel5 x86_64 rpms from
>> openafs.org, I was wondering about adding -fPIC to the rpms builds. Is
>> -fPIC enabled in the openafs.org rpms? Should it be added to the
>> openafs.org rpms?

> The AFS Perl module also seems to have this problem.  It is currently
> not supported on AMD64 and the Debian BTS indicates this is (also?)
> because no PIC libraries are provided.

The problem with the AFS Perl module is more serious, since it doesn't
just use the libafsrpc and libafsauthent libraries.  It wants to use just
about every library that AFS builds, including a bunch that are only
static and are never built PIC except on platforms where all code is built
PIC.  In order to get it to link properly on systems that require PIC code
for shared objects, you'd have to build substantially larger portions of
OpenAFS PIC.  This is already done on a few platforms, but not on the ones
that people most often care about (x86_64, for example).

The build system makes it tricky (or at least tedious) to build only the
libraries PIC without building things like the fileserver PIC.

Just building everything PIC will have performance impacts, although it's
not clear that they're substantial enough to care about.  I've never
benchmarked it.

Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>