Page 1 of 1

Getting Celestia to compile in Ubuntu 11.10 (Oneiric Ocelot)

Posted: 23.11.2011, 23:49
by ajtribick
Two reasons why Celestia doesn't compile in Ubuntu 11.10:

gcc 4.6
Ubuntu now passes --as-needed by default, which breaks the linker.

Current version of Eigen doesn't work with gcc-4.6, so we need to update to the latest EIgen 2.0 (currently 2.0.16) and replace the contents of thirdparty/Eigen. Get Eigen from here.

Also we need to update frametree.h to have #include <cstddef> otherwise gcc-4.6 doesn't like it either (thanks to Nils Larsson for pointing this out on the developer list)

To solve the linker problem, need to add -Wl,--no-as-needed to the *_CXXFLAGS in the src/celestia/Makefile.am and src/celestia/qt/Makefile.am. There is probably a more elegant way of doing this involving reordering the command line, but I am not an autotools expert.

Attached patch is for src directory, it does not do the Eigen update. Now compiling trunk should work via the usual

autoreconf -ivf
./configure --with-qt
make

Re: Getting Celestia to compile in Ubuntu 11.10 (Oneiric Oce

Posted: 24.11.2011, 17:01
by chris
Please check in these patches; it seems more important to get Celestia compiling on the new Ubuntu now than to figure out the most elegant g++ command line.

(At some point, we should investigate upgrading to Eigen 3.0, since that is where new development is happening. I don't think it will be too difficult--mostly just adjustments to spots where we use component-wise arithmetic.)

--Chris