To compile XEphem on a 64-bit Linux, you can’t use the 32-bit libXm it comes with. This worked for me:
Since a libXm.a file is required, I created a symbolic link to the actual 64-bit library in /usr/lib64/openmotif (as superuser):
ln -s libXm.so.4.0.3 libXm.a
I don’t know if this is necessary, but I followed Paul Bramscher’s advice to modify the libz/Makefile (in the XEphem source directory) to use gcc.
The header should read:
CC = gcc
CLDFLAGS = -g
CFLAGS = $(CLDFLAGS) -Wall -O2
LDFLAGS =
and the bottom should look like this:
testzlib: testzlib.o libz.a
gcc $(LDFLAGS) -o testzlib testzlib.o libz.a
Compile XEphem using the new 64-bit libXm:
make MOTIF=/usr/lib64/openmotif
./xephem should run now.