[OpenAFS-devel] Compiling openafs on arm64/aarch64 architecture
Micheal Waltz
mwaltz@qualcomm.com
Tue, 2 Sep 2014 12:55:31 -0700
I have a Ubuntu 14.04 aarch64 VM and am trying to compile openafs on it.
I'm using the Ubuntu/Debian source packages (tried both 1.6.7 and
1.6.9), and after modifying the source to recognize aarch64 it begins to
compile but eventually fails with an error of,
gcc -I/home/mwaltz/debian/openafs-1.6.9/src/config
-I/home/mwaltz/debian/openafs-1.6.9/include -I. -I.
-D_LARGEFILE64_SOURCE -o rmtsysd rmtsysd.o libsys.a
/home/mwaltz/debian/openafs-1.6.9/lib/librx.a libsys.a
/home/mwaltz/debian/openafs-1.6.9/lib/liblwp.a
/home/mwaltz/debian/openafs-1.6.9/lib/util.a -lresolv
/home/mwaltz/debian/openafs-1.6.9/lib/liblwp.a(lwp.o): In function
`Abort_LWP':
/home/mwaltz/debian/openafs-1.6.9/src/lwp/./lwp.c:796: undefined
reference to `savecontext'
/home/mwaltz/debian/openafs-1.6.9/lib/liblwp.a(lwp.o): In function
`Dispatcher':
/home/mwaltz/debian/openafs-1.6.9/src/lwp/./lwp.c:982: undefined
reference to `returnto'
/home/mwaltz/debian/openafs-1.6.9/lib/liblwp.a(lwp.o): In function
`LWP_QWait':
/home/mwaltz/debian/openafs-1.6.9/src/lwp/./lwp.c:246: undefined
reference to `savecontext'
/home/mwaltz/debian/openafs-1.6.9/lib/liblwp.a(lwp.o): In function
`LWP_CreateProcess':
/home/mwaltz/debian/openafs-1.6.9/src/lwp/./lwp.c:302: undefined
reference to `savecontext'
/home/mwaltz/debian/openafs-1.6.9/src/lwp/./lwp.c:361: undefined
reference to `savecontext'
/home/mwaltz/debian/openafs-1.6.9/src/lwp/./lwp.c:372: undefined
reference to `savecontext'
/home/mwaltz/debian/openafs-1.6.9/src/lwp/./lwp.c:411: undefined
reference to `savecontext'
/home/mwaltz/debian/openafs-1.6.9/lib/liblwp.a(lwp.o):/home/mwaltz/debian/openafs-1.6.9/src/lwp/./lwp.c:420:
more undefined references to `savecontext' follow
collect2: error: ld returned 1 exit status
make[5]: *** [rmtsysd] Error 1
make[5]: Leaving directory `/home/mwaltz/debian/openafs-1.6.9/src/sys'
I did some research into this error, and found a thread on this list
from 2009 regarding the ppc architecture [1] and appears it's related to
the aarch64 glibc not having support for ucontext. Looking at
src/config/param.arm_linux26.h, it specifically says that glibc doesn't
implement getcontext/savecontext for arm. The ppc thread mentioned lwp
vs pthreads, and I'm wondering if for aarch64 there needs to be
something updated to use pthreads instead of lwp.
I'm not really a developer and this is about the limit of my
understanding of the problem, so any help on how to work around this
error and getting openafs to compile on aarch64 (particularly via the
debian packages) would be appreciated.
I've also opened a bug with Ubuntu regarding this [2].
1. https://lists.openafs.org/pipermail/openafs-devel/2009-June/016791.html
2. https://bugs.launchpad.net/ubuntu/+source/openafs/+bug/1364544
Thank you,
--
Micheal Waltz
Unix Configuration Management (go/ucm)
Qualcomm Inc.