You are here

How to build Xephem-3.7.1 on amd64

Topics: 
Linux

I just installed the latest Xephem-3.7.1 onto my debian amd64. The problem with the default deb package in the Debian repository is that the version is quite old, at 3.4.5. Unfortunately, building Xephem-3.7.1 isn't quite straightforward; here's a small howto to craft the binaries (no package, unfortunately) :

* download the source from the Xephem site
* unpack the tgz tarball
* create and run this script in the ./xephem-3.7.1 directory :

#!/bin/bash
# Fix gcc flags
for i in libastro/Makefile libip/Makefile \ 
 libjpegd/Makefile liblilxml/Makefile GUI/xephem/Makefile ; 
do
  echo "Fixing CFLAGS in ${i}"
  sed -e "s~^CFLAGS[ ]*=\(.*\)-O2\(.*\)~CFLAGS= \1 \2 \ 
  ${CFLAGS}~" -i ${i} || die "sed failed"
done
sed -e 's~^CFLAGS[ ]*=\(.*\)$(CLDFLAGS)\(.*\)~CFLAGS=\1 \2~' \ 
  -i GUI/xephem/Makefile

* Remove the ./xephem-3.7.1/libXm/linux86 directory, as it contains 32bit libraries
* Create a symlink ./xephem-3.7.1/libXm/linux86 towards /usr/lib
* Install the lesstif2 and lesstif2-dev packages
* Build as described in the INSTALL file

That's it ! Copy your binary to /usr/bin, and you're ready to rumble.

Comments

Tried to execute above script in a bash shell but trip up in line 8 with:

line 8: die: command not found

You could replace 'die' with an 'exit 1'. Your script will continue to fail, however, cause your sed command onthe same line is failing.

Hello,

I am a linux beginner. My OS is opensuse 10.2 x86_64, and I am trying to install xephem 3.7.2.
I wrote your srcipt, I saved it to "test", and I made it executable in xephem directory.
After I have a mistake answer:

thierry@linux-k2h5:~/Desktop/xephem-3.7.2> ./test
./test: line 4: syntax error near unexpected token `libjpegd/Makefile'
./test: line 4: ` libjpegd/Makefile liblilxml/Makefile GUI/xephem/Makefile ; '
thierry@linux-k2h5:~/Desktop/xephem-3.7.2>

Can you help me to find out what's wrong ?

Looks like bash doesn't recognize the '\' character on the end of line 3. In fact, this character tells bash that the next line is part of the current line. So line 3 and 4 are one line. Try to remove all '\' characters, and place the following lines on one line.

Hello,

I din't write your script, I only used copy and paste. For a mysterious reason (for me), there was a dot at the end of the 4th line. Your answer show me my mystake. Now the srcipt work fine, thank you.

I came across your Add new comment | Kristof.Willen.be website and wanted to let you know that we have decided to open our POWERFUL and PRIVATE website traffic system to the public for a limited time! You can sign up for our targeted traffic network with a free trial as we make this offer available again. If you need targeted traffic that is interested in your subject matter or products start your free trial today: http://insl.co/11 Unsubscribe here: http://stpicks.com/2ruse

I came across your Add new comment | Kristof.Willen.be website and wanted to let you know that we have decided to open our POWERFUL and PRIVATE website traffic system to the public for a limited time! You can sign up for our targeted traffic network with a free trial as we make this offer available again. If you need targeted traffic that is interested in your subject matter or products start your free trial today: http://stpicks.com/2rusd Unsubscribe here: http://xahl.de/q