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
Code: Select all
bool isRoot() const
{
return bodyParent == NULL; <--Offending line, assuming I interpreted that output correctly
}
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