Compiling XEphem on a 64-bit Linux (Fedora 13) 29 jul 2010

To compile XEphem on a 64-bit Linux, you can’t use the 32-bit libXm it comes with. This worked for me:

  1. Get and install the 64-bit openmotif and openmotif-devel packages.
  2. 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.a

  3. 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

    and the bottom should look like this:

    testzlib: testzlib.o libz.a
    gcc $(LDFLAGS) -o testzlib testzlib.o libz.a

  4. Compile XEphem using the new 64-bit libXm:

    make MOTIF=/usr/lib64/openmotif

  5. ./xephem should run now.

tagged linux and fedora