stellarium 0.5.2 compiling issues

IRIX/Nekoware development, porting and related topics.
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
Posts: 93
Joined: Sun Feb 02, 2003 5:49 pm
Location: Germany

stellarium 0.5.2 compiling issues

Unread postby andreas@rootprompt » Mon Feb 23, 2004 6:52 pm


I just tried to compile stellarium 0.5.2 (, but ran into problems even before I could edit the makefile. During ./configure it

a) isn't able to compile the SDL test file (though SDL ist properly installed), however, this could be bypassed by passing --disable-sdltest to configure
b) it complains about a missing glEnable... looking at the config.log I see that it's trying to use the libGL in /usr/lib which is o32 and not the n32 version that should live in /usr/lib32

I alread passed /usr/freeware/lib32 as LDFLAGS before configure (that's needed if using the freeware libraries), but I'm really clueless how to convince that damn thing to use the n32 version of libGL additionally.

I compiled stellarium 0.5 before without too much problems (see the notes on ), so I'm uncertain if there's something wrong on my side (using another SGI this time) or if the configure script is even more broken than before.

I'm sitting in front of my Mac currently, but if needed I could post every output configure creates ;)

User avatar
Posts: 754
Joined: Mon Jul 21, 2003 6:19 am

Unread postby canavan » Wed Feb 25, 2004 12:49 pm

Aside from the system libraries, I've used only libraries from /usr/freeware and nothing that I compiled myself. Configure command line was:

Code: Select all

rm -f config.cache; CFLAGS=" -O3 -mips4 -mtune=r5k -ffast-math -funroll-loops -mabi=n32 -finline-functions "  CPPFLAGS="-I/usr/freeware/include" CCFLAGS=" -O3 -mips4 -mtune=r5k -ffast-math -funroll-loops -mabi=n32 -finline-functions "  CXXFLAGS=" -O3 -mips4 -mtune=r5k -ffast-math -funroll-loops -mabi=n32 -finline-functions "  ./configure

If you want the compiler flags to actually be used, you will have to edit ./configure and remove the lines
CFLAGS="-s -Wall -O2 -ffast-math -fexpensive-optimizations"
CXXFLAGS="-s -Wall -O2 -ffast-math -fexpensive-optimizations"

The reading of hipparcos coordinates is still broken with gcc and strict aliasing but can be fixed with the following patch:

Code: Select all

--- hip_star.cpp        Thu Mar 20 17:15:51 2003
+++ ../../../stellarium-0.5.2/src/hip_star.cpp  Mon Feb 23 21:36:32 2004
@@ -42,26 +42,26 @@
 int Hip_Star::Read(FILE * catalog)
 // Read datas in binary catalog and compute x,y,z;
-    float RA=0, DE=0;
-    fread((char*)&RA,4,1,catalog);
+    float RA=0, DE=0, xDE, xRA;
+    fread(&xRA,4,1,catalog);
-    fread((char*)&DE,4,1,catalog);
+    fread(&xDE,4,1,catalog);
     RA/=12./PI;     // Convert from hours to rad
     DE/=180./PI;    // Convert from deg to rad
-    unsigned short int mag;
-    fread((char*)&mag,2,1,catalog);
-    LE_TO_CPU_INT16(mag, mag);
+    unsigned short int mag, xmag;
+    fread(&xmag,2,1,catalog);
+    LE_TO_CPU_INT16(mag, xmag);
     Mag = (5. + mag) / 256.0;
     if (Mag>250) Mag = Mag - 256;
-    unsigned short int type;
-    fread((char*)&type,2,1,catalog);
-       LE_TO_CPU_INT16(type, type);
+    unsigned short int type, xtype;
+    fread(&xtype,2,1,catalog);
+       LE_TO_CPU_INT16(type, xtype);
     // Calc the Cartesian coord with RA and DE

The position of the Moon is still off, and the current 0.6 beta version that's supposed to fix this segfaults here.

User avatar
Posts: 2781
Joined: Thu Feb 20, 2003 6:57 am
Location: Zoetermeer, The Netherlands

Unread postby dexter1 » Thu Feb 26, 2004 2:02 am

Actually MIPSPro will compile stellarium 0.5.2, but 7.4.1 craps out. You just need to tweak the configure file as canavan said (SDL needs an include path fix)

I will try and make a full optimisation of stellarium and maybe bundle a tardist.
Just gave it a spin. Nice!

User avatar
Posts: 2781
Joined: Thu Feb 20, 2003 6:57 am
Location: Zoetermeer, The Netherlands

Unread postby dexter1 » Mon Mar 01, 2004 2:12 pm


A stellarium-0.5.2-mips3.tardist is sitting in your incoming directory waiting to be touched. :)
Build for mips3 and optimized with -IPA. Only dep is libSDL. Not a neko_ build, but i already arranged relnotes, dist files and source+patches so everybody can redo what i've done.
I accidentally tripped a MIPSPro 7.4.1 compiler bug while compiling, which SGI support was able to solve for me. Fab!

This is a first of a series of my MIPSPro tardist shootouts. Expect qt-3.3.0 (12 build hours on my R4K4 Challenge S! And packaging 60 megs is a nightmare) aRts-1.2.0 and xmame/xmess 0.79.1 once i get the color mangling fixed.

Return to “SGI: Development”

Who is online

Users browsing this forum: No registered users and 2 guests