Problem compiling Celestia 1.3.0 on Solaris 9/gcc 3.2.3

Report bugs, bug fixes and workarounds here.
Topic author
cobaltjacket

Problem compiling Celestia 1.3.0 on Solaris 9/gcc 3.2.3

Post #1by cobaltjacket » 13.06.2003, 20:41

So I'm doing my build on Solaris. The only way I can do a configure is by doing --without-kde. I have the SFW build of KDE installed, and so I specify the kde includes/libs with --with-extra-includes/libs, and it does not detect KDE.

So then I go and do ./configure --without-kde, and get the following:

Code: Select all

make[3]: Entering directory `/export/home/soft/celestia-1.3.0/src/celengine'
if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I..    -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -fno-exceptions -fno-check-new  -O2 -Wall -ffast-math -fexpensive-optimizations -fomit-frame-pointer  -MT body.o -MD -MP -MF ".deps/body.Tpo" \
  -c -o body.o `test -f 'body.cpp' || echo './'`body.cpp; \
then mv ".deps/body.Tpo" ".deps/body.Po"; \
else rm -f ".deps/body.Tpo"; exit 1; \
fi
In file included from body.cpp:16:
body.h:146: syntax error before numeric constant
body.h:148: syntax error before numeric constant
body.h:151: syntax error before numeric constant
body.h:153: `float Body::getApparentMagnitude(...) const' and `float
   Body::getApparentMagnitude(...) const' cannot be overloaded
body.cpp:354: syntax error before numeric constant
body.cpp: In member function `float Body::getLuminosity(...) const':
body.cpp:358: request for member `getLuminosity' in `1', which is of
   non-aggregate type `int'
body.cpp:364: `distanceFromSun' undeclared (first use this function)
body.cpp:364: (Each undeclared identifier is reported only once for each
   function it appears in.)
body.cpp: At global scope:
body.cpp:376: syntax error before numeric constant
body.cpp: In member function `float Body::getApparentMagnitude(...) const':
body.cpp:381: `distanceFromViewer' undeclared (first use this function)
body.cpp: At global scope:
body.cpp:386: syntax error before numeric constant
body.cpp:389: redefinition of `float Body::getApparentMagnitude(...) const'
body.cpp:379: `float Body::getApparentMagnitude(...) const' previously defined
   here
body.cpp:389: no `float Body::getApparentMagnitude(...) const' member function
   declared in class `Body'
body.cpp: In member function `float Body::getApparentMagnitude(...) const':
body.cpp:390: `viewerPosition' undeclared (first use this function)
body.cpp:391: `sunPosition' undeclared (first use this function)
body.cpp:379: prior parameter's size depends on `const Body* const this'
body.cpp:379: prior parameter's size depends on `const Body* const this'
make[3]: *** [body.o] Error 1
make[3]: Leaving directory `/export/home/soft/celestia-1.3.0/src/celengine'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/export/home/soft/celestia-1.3.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/export/home/soft/celestia-1.3.0'
make: *** [all] Error 2

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #2by Christophe » 13.06.2003, 23:28

What version of KDE is provided with SFW? Celestia requires 3.1. Have you tried setting KDEDIR?

About the compilation error, I think it's the 'const Star& sun' that poses problem (pretty ironic for Solaris!), but I don't understand why. Maybe that's related to gcc 3.2.3, I'm using 3.2.2.
Christophe

jamarsa
Posts: 326
Joined: 31.03.2003
With us: 21 years 7 months
Location: San Sebastian (Spain)

Post #3by jamarsa » 13.06.2003, 23:43

Christophe wrote:About the compilation error, I think it's the 'const Star& sun' that poses problem (pretty ironic for Solaris!), but I don't understand why. Maybe that's related to gcc 3.2.3, I'm using 3.2.2.


Actually it could be a hint that Sun Microsystems is the maker of Solaris, maybe "sun" would be a defined name in one of the includes (well, maybe only :roll: ). It would be a silly name to use (systemwide), but possible in theory.

Something as "#define sun 0x87878" somewhere.

Guest

Post #4by Guest » 16.06.2003, 05:06

Christophe wrote:What version of KDE is provided with SFW? Celestia requires 3.1. Have you tried setting KDEDIR?

It appears that it uses 3.0. I tried to build the current rev, but it's a PITA. That's why I went with the SFW version. I'll see what I can do.

He subsquently wrote:About the compilation error, I think it's the 'const Star& sun' that poses problem (pretty ironic for Solaris!), but I don't understand why. Maybe that's related to gcc 3.2.3, I'm using 3.2.2.


...?

Guest

Post #5by Guest » 16.06.2003, 05:07

Christophe wrote:What version of KDE is provided with SFW? Celestia requires 3.1. Have you tried setting KDEDIR?


Oh, and I have not tried setting that variable. I should do so.


Return to “Bugs”