Troubles Compiling Celestia

Have a question about using Celestia? Check here first for FAQs and helpful advice.
Forum rules
Please help to make this forum more useful by checking the FAQs before posting! Keep it clean, keep it civil, keep it truthful, stay on topic, be responsible, share your knowledge.
Topic author
jvellos
Posts: 1
Joined: 24.10.2012
With us: 12 years

Troubles Compiling Celestia

Post #1by jvellos » 25.10.2012, 18:49

Hello!

I'm trying to compile Celestia on Bodhi Linux, a 64-bit Ubuntu 12.04-based distro. The compilation failed initially, and I did some troubleshooting to get the right versions of GTK and LUA installed. Now, though, the compiler displays the following error:

Code: Select all

make[3]: Entering directory `/home/rothen/Packages/celestia-1.6.1/src/celengine'
g++ -DHAVE_CONFIG_H -I. -I../.. -I..   -I/usr/include/lua5.1    -DLUA_VER=0x050100 -DCELX  -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -g -O2 -ffast-math -fexpensive-optimizations -fomit-frame-pointer -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common  -MT libcelengine_a-timeline.o -MD -MP -MF .deps/libcelengine_a-timeline.Tpo -c -o libcelengine_a-timeline.o `test -f 'timeline.cpp' || echo './'`timeline.cpp
In file included from timeline.cpp:15:0:
../celengine/frametree.h: In member function ‘bool FrameTree::isRoot() const’:
../celengine/frametree.h:52:30: error: ‘NULL’ was not declared in this scope
make[3]: *** [libcelengine_a-timeline.o] Error 1
make[3]: Leaving directory `/home/rothen/Packages/celestia-1.6.1/src/celengine'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/rothen/Packages/celestia-1.6.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/rothen/Packages/celestia-1.6.1'
make: *** [all] Error 2
Checking the contents of frametree.h, I find the following code in and surrounding the offending line:

Code: Select all

    bool isRoot() const
    {
        return bodyParent == NULL; <--Offending line, assuming I interpreted that output correctly
    }
I don't happen to know anything about C++, but I'm familiar with scripting in PHP, Perl, BASH, and a few others. How would I go about determining the cause of the problem?

Thank you,
Dylan

EDIT: As an update, I Googled, "NULL was not declared in this scope," and found someone saying to add the include <cstddef>. It got past the error, and seems to be compiling now.

EDIT 2: New problem, the output it fails on now is:

Code: Select all

/bin/bash ../../libtool --tag=CXX   --mode=link g++ -I/usr/include/lua5.1    -DLUA_VER=0x050100 -DCELX   -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -g -O2 -ffast-math -fexpensive-optimizations -fomit-frame-pointer -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common    -o celestia celestia-celestiacore.o celestia-configfile.o celestia-destination.o celestia-eclipsefinder.o celestia-favorites.o celestia-imagecapture.o celestia-url.o celestia-celx.o celestia-celx_celestia.o celestia-celx_frame.o celestia-celx_gl.o celestia-celx_object.o celestia-celx_observer.o celestia-celx_phase.o celestia-celx_position.o celestia-celx_rotation.o celestia-celx_vector.o    -Wl,--export-dynamic -pthread -L/usr/local/lib -lgtkglext-x11-1.0 -lgdkglext-x11-1.0 -lGLU -lGL -lgtk-x11-2.0 -lpangox-1.0 -lX11 -lgmodule-2.0 -lrt -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0   gtk/libgtkgui.a -ldl -llua5.1    ../celengine/libcelengine.a ../celtxf/libceltxf.a ../cel3ds/libcel3ds.a ../celmath/libcelmath.a ../celutil/libcelutil.a  -lpng -ljpeg -lGLU -lz
libtool: link: g++ -I/usr/include/lua5.1 -DLUA_VER=0x050100 -DCELX -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -g -O2 -ffast-math -fexpensive-optimizations -fomit-frame-pointer -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -o celestia celestia-celestiacore.o celestia-configfile.o celestia-destination.o celestia-eclipsefinder.o celestia-favorites.o celestia-imagecapture.o celestia-url.o celestia-celx.o celestia-celx_celestia.o celestia-celx_frame.o celestia-celx_gl.o celestia-celx_object.o celestia-celx_observer.o celestia-celx_phase.o celestia-celx_position.o celestia-celx_rotation.o celestia-celx_vector.o -Wl,--export-dynamic -pthread  -L/usr/local/lib /usr/local/lib/libgtkglext-x11-1.0.so /usr/local/lib/libgdkglext-x11-1.0.so -lGL -lgtk-x11-2.0 -lpangox-1.0 -lX11 -lgmodule-2.0 -lrt -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 /usr/lib/x86_64-linux-gnu/libcairo.so -lpango-1.0 /usr/lib/x86_64-linux-gnu/libfreetype.so -lfontconfig -lgobject-2.0 -lglib-2.0 gtk/libgtkgui.a -ldl -llua5.1 ../celengine/libcelengine.a ../celtxf/libceltxf.a ../cel3ds/libcel3ds.a ../celmath/libcelmath.a ../celutil/libcelutil.a -lpng /usr/lib/x86_64-linux-gnu/libjpeg.so -lGLU -lz -pthread
/usr/bin/ld: ../celengine/libcelengine.a(libcelengine_a-glext.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld: note: 'dlclose@@GLIBC_2.2.5' is defined in DSO /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libdl.so so try adding it to the linker command line
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libdl.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[4]: *** [celestia] Error 1
make[4]: Leaving directory `/home/rothen/Packages/celestia-1.6.1/src/celestia'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/rothen/Packages/celestia-1.6.1/src/celestia'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/rothen/Packages/celestia-1.6.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/rothen/Packages/celestia-1.6.1'
make: *** [all] Error 2
Any insights?

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 2 months

Re: Troubles Compiling Celestia

Post #2by John Van Vliet » 26.10.2012, 00:22

--- edit ---

g3rb
Posts: 1
Joined: 24.02.2017
With us: 7 years 8 months

Post #3by g3rb » 24.02.2017, 10:12

Hi. I don't really know where to put this information but I think it will help someone.

I compiled the celestia-g2 in Linux mint 18.1 (I think you can apply this procedure to ubuntu 16.04 too)

download Celestia-g2 sources and extract it
https://github.com/bgodard/celestia-g2


apt-get install qtcreator qt4-dev-tools libqt4-dev liblua5.1-0-dev libtheora-dev libpng16-dev libqglviewer-dev-qt4

download cspice
https://naif.jpl.nasa.gov/naif/toolkit_C_PC_Linux_GCC_64bit.html
extract and move it to /opt

cd celestia-g2/celestia

qmake (if all is ok qmake print nothing)

make
make install


Return to “Help Central”