Getting Celestia to compile in Ubuntu 11.10 (Oneiric Ocelot)
Posted: 23.11.2011, 23:49
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
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