[OpenAFS] Building OpenAFS 1.4.1 on SLES 9.0

David Werner david.werner@iws.uni-stuttgart.de
Wed, 9 Aug 2006 02:31:15 +0200


Hello all,

Today I tried to build OpenAFS on SUSE Linux Enterprise 9 Server. 
Unfortunately the afs-rpms they ship with it contain an old version 
which made it accidently into the distribution, you can read the story
here: 
	http://support.novell.com/techcenter/sdb/en/2005/02/openafs.html

I just want to shortly write down of what one has to done to compile it.
I haven't tested it yet. the build had been made on a x86_64 system. 
I tried to build a module for the kernel thus installed paket 
kernel-source, I also thought it is a good idea to have 
packet kernel-syms on it, but its likely not needed.
For simplicity my kernel-version is "2.6.5-7.267-smp", one has to adapt
that if one wants to make similiar steps on a different version. 

Step 1) 
~~~~~~~

The Link '/lib/modules/2.6.5-7.267-smp/build' pointing to 
'/usr/src/linux-2.6.5-7.267-obj/x86_64/smp' causing troubles
someone on the mailing lists pointed it already out.
I'm not very familiar with meaning of that scheme,
the following worked for me: 

rename the link: 
#	cd /lib/modules/2.6.5-7.267-smp/
#	mv build build.old

I use move in order to restore if needed the original state later more easily.
create a different build-link pointing to the directory where the sources
lies unpacked:

#	ln -s /usr/src/linux-2.6.5-7.267 build

prepare those sources for building with actual configuration: 
#	cd /usr/src/linux-2.6.5-7.267
#	make cloneconfig
#	make prepare

Remark: the more simpler way just to set '--with-linux-kernel-headers=path'
option of configure to the "right" value did not work for me.


Step 2)
~~~~~~~
Unpack the OpenAFS and build it. 
We wanted to have a version with kerberos and SLES-9 ships heimdal natively. 
So I installed the rpm 'heimdal-devel' to have the include and libraries.
The original configure-script of openafs-1.4.1
is not suitable for that heimdal-version. I made small adaptions:
Change of line 8199 from:

<line 8199> for ac_hdr in kerberosV/heim_err.h

into 

<line 8199> for ac_hdr in heim_err.h

This comes as heim_err.h is not in the directory kerberosV.
Change also line 8315 from: 

<line 8315> if test "$ac_cv_header_kerberosV_heim_err_h" = "yes"; then

into

<line 8315> if test "$ac_cv_header_heim_err_h" = "yes"; then

This has the effect that the script does not build the tool "asetkey" 
which is not needed for openafs in conjunction with heimdal
(someone pointed that already out).

Step 3)
~~~~~~~
Building stopped for some reason missing libcrypto:
Thus I created the following links directly, I doubt whether this
is a good idea.

# cd /usr/lib
# ln -s libcrypto.so.0 libcrypto.so
# cd /usr/lib64
# ln -s libcrypto.so.0 libcrypto.so

# /etc/init.d/boot.ldconfig restart

For me at least now runs then the "make" after the "configure". 
Other possibility would be to fix 'aclocal.m4' rebuild configure.
I dont know whether this applies to other heimdal installation to
or whether it specific to the "sles9-version".

The configure-script issues still a warning:

"Cannot determine sys_call_table status. assuming it isn't exported"

I hope i don't need to patch the kernel.
Does anyone knows something about it?  In March and April there 
were some messages on this list regarding "sys_call_table"-issues, 
but i dont really know whether they apply in my case.

It took me some time to find those small things, I hope some readers can
take a small advantage of that desciption.

Greetings,
	David