Trouble compilig Celestia on Linux, help needed

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
Guckytos
Posts: 439
Joined: 01.06.2004
With us: 20 years 5 months
Location: Germany

Trouble compilig Celestia on Linux, help needed

Post #1by Guckytos » 08.06.2010, 16:56

Hi guys,

just wanted to compile Celestia on Fedora 11 and rann into an error. And being the programming noob that I am, I don't really understand, what make is throwing here at me.

The svn checkout is a totally fresh directory from just 5 minutes ago
CSpice was downloaded from here ftp://naif.jpl.nasa.gov/pub/naif/toolkit//C/PC_Linux_GCC_32bit/packages/ and imported as described.

I ran configure with

Code: Select all

./configure --with-gnome --with-cspice-dir=/usr/local/cspice

then came "make" and that threw the following at me:

Code: Select all

Front-End: Gnome
Use Cairo: yes
Use Lua: yes
Use Theora: yes

[celestia]$ make
make  all-recursive
make[1]: Entering directory `/home/trunk/celestia'
Making all in src
make[2]: Entering directory `/home//trunk/celestia/src'
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DGLEW_STATIC -DUSE_SPICE -DEIGEN_NO_DEBUG -DEIGEN_NO_DEBUG -DNDEBUG -DNO_DEBUG -DCELX -DLUA_VER=0x050100 -DQT_NO_DEBUG -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Trolltech/qt/mkspecs/linux-g++ -I. -I/usr/local/Trolltech/qt/include/QtCore -I/usr/local/Trolltech/qt/include/QtGui -I/usr/local/Trolltech/qt/include/QtOpenGL -I/usr/local/Trolltech/qt/include/QtXml -I/usr/local/Trolltech/qt/include -I.. -I../.. -I. -I../thirdparty/glew/include -I../thirdparty/Eigen -I../thirdparty/curveplot/include -I/usr/local/cspice/include -I/usr/X11R6/include -I. -Icelestia/qt/ui -o modelfile.o celmodel/modelfile.cpp
In file included from /usr/lib/gcc/i586-redhat-linux/4.4.1/../../../../include/c++/4.4.1/cstdio:46,
                 from celmodel/modelfile.cpp:18:
/usr/include/stdio.h:367: Fehler: Deklaration von »int snprintf(char*, size_t, const char*, ...) throw ()« wirft andere Ausnahmen
../config.h:264: Fehler: von vorheriger Deklaration »int snprintf(char*, size_t, const char*, ...)«
/usr/include/stdio.h:371: Fehler: Deklaration von »int vsnprintf(char*, size_t, const char*, char*) throw ()« wirft andere Ausnahmen
../config.h:260: Fehler: von vorheriger Deklaration »int vsnprintf(char*, size_t, const char*, char*)«
make[2]: *** [modelfile.o] Fehler 1
make[2]: Leaving directory `/home//trunk/celestia/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home//trunk/celestia'
make: *** [all] Fehler 2


Can someone help me out and tell me where the error lies and what I can do to get around it?

Regards,

Guckytos

BTW: I was able to compile Celestia 1.6.1 (without spice) on the same machine without problems some days ago.

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 8 months
Location: Hamburg, Germany

Re: Trouble compilig Celestia on Linux, help needed

Post #2by t00fri » 08.06.2010, 17:44

Christian,

I really don't understand what you are doing (cf our previous, extensive email correspondence...).

As another check, I downloaded precisely that cspice package from your above link, installed it in /usr/local, deleted all the previous celestia object files, reconfigured and built the latest SVN code.

RESULT:
+++++++++++++++++++++++
NO problems whatsoever!
+++++++++++++++++++++++

I even did TWO independent test compilations:

1) KDE:
======
./configure --prefix=/usr/local --with-kde --with-lua --with-cspice-dir=/usr/local/cspice CXXFLAGS="-I /opt/kde3/include"

2) GNOME:
=========
./configure --prefix=/usr/local --with-gnome --with-lua --with-cspice-dir=/usr/local/cspice CXXFLAGS="-I /opt/kde3/include"

However, there are some things that struck my eye in your above compiler output:

I have a suspicion that somewhere you are using a mix of library versions and|or an incorrect ./configure step!? That multi-repeated error concerning your vsnprintf() declaration reinforces my suspicion...

For instance, why do I see all these Qt directory assignments in your above output. They have no reason to be there in a pure GNOME compile.

Here is an example for the compilation of spiceorbit.cpp in my installation
++++++++++++++++++++++++++++++++++++++++++++++++++++++

g++ -DHAVE_CONFIG_H -I. -I../.. -I.. -I../../thirdparty/Eigen -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -I /opt/kde3/include -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -I/usr/local/cspice/include -DUSE_SPICE -O2 -Wall -ffast-math -fexpensive-optimizations -fomit-frame-pointer -DORBIT2=1 -pthread -I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/gtkglext-1.0 -I/usr/lib/gtkglext-1.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -DLUA_VER=0x050100 -DCELX -MT spiceorbit.o -MD -MP -MF .deps/spiceorbit.Tpo -c -o spiceorbit.o spiceorbit.cpp
++++++++++++++++++++++++++++++++++++++++++++++++++++

No Qt-stuff whatsoever. I suspect, for some reason you still have a Qt configuration set up by qmake and incorrectly use the respective, generated Makefiles for your gnome compile...

Moreover, I am surprised why I see the g++ compiler referring to a RedHat subdirectory despite your German compiler output?

/usr/lib/gcc/i586-redhat-linux/4.4.1/

Did you install such crucial components from different Linux distributions??

Fridger
Last edited by t00fri on 08.06.2010, 18:02, edited 1 time in total.
Image

Topic author
Guckytos
Posts: 439
Joined: 01.06.2004
With us: 20 years 5 months
Location: Germany

Re: Trouble compilig Celestia on Linux, help needed

Post #3by Guckytos » 08.06.2010, 18:01

t00fri wrote:Christian,

I really don't understand what you are doing (cf our previous, extensive email correspondence...).

As another check, I downloaded precisely that cspice package from your above link, installed it in /usr/local, deleted all the previous celestia object files, reconfigured and built the latest SVN code.

RESULT:
+++++++++++++++++++++++
NO problems whatsoever!
+++++++++++++++++++++++

I even did TWO independent test compilations:

1) KDE:
======
./configure --prefix=/usr/local --with-kde --with-lua --with-cspice-dir=/usr/local/cspice CXXFLAGS="-I /opt/kde3/include"

2) GNOME:
=========
./configure --prefix=/usr/local --with-gnome --with-lua --with-cspice-dir=/usr/local/cspice CXXFLAGS="-I /opt/kde3/include"

No Qt-stuff whatsoever. I suspect, for some reason you still have a Qt configuration set up by qmake and incorrectly use the respective, generated Makefiles for your gnome compile...

Moreover, I am surprised why I see the g++ compiler referring to a RedHat subdirectory despite your German compiler output?

/usr/lib/gcc/i586-redhat-linux/4.4.1/

Did you install such crucial components from different Linux distributions??

Fridger

Well, seems like I still don't totally understand what I am doing too :oops: :oops:

Your suspicion was right on the spot. For some reason a Qt configuration was still used by qmake as it seems.

Just killed the trunk directory reloaded the svn, used your configure line and presto, everthing compiled alright. I just feel like sinking through to the center of the earth :oops:

And nope, I did not mix any compilers from different Linux distributions, I don't even know enough Linux to know how to do it.

Regards and Thanks,

Guckytos

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 8 months
Location: Hamburg, Germany

Re: Trouble compilig Celestia on Linux, help needed

Post #4by t00fri » 08.06.2010, 18:05

Congratulations... so our long private correspondence finds it's happy end at last...

Fridger
Image

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

Re: Trouble compilig Celestia on Linux, help needed

Post #5by John Van Vliet » 10.06.2010, 07:42

--- edit ---


Return to “Help Central”