Celestia (neko mips4)
From Nekoware
| neko_celestia | |
| Internal Version: | 1 |
|---|---|
| Download: | neko_celestia-1.3.2.tardist |
| Current release: | 1.3.2 / December 9 2004 |
| Use: | Unknown |
| Licence: | Unknown |
| Website: | |
Contents |
[edit] Installing the package
Download and install the neko_celestia-1.3.2 (version 1) tardist package from the Nekoware repository.
Installation of the precompiled binary package can be achieved using either Software Manager or inst: In the case of inst, all that's required is the command:
~ $ inst -f /path/to/neko_celestia-1.3.2.tardist install all keep *.opt.src go quit
You will need "root" privileges to install the software.
A list of all files is installed by this package is available.
[edit] Package Dependencies
The following additional packages are required to run this software correctly:
[edit] Package Incompatibilities
The following packages are marked as incompatible.
- No incompatibilities.
[edit] Package Layout
Default indicates whether the subsystem will be installed if "install standard" (or similar) is used. Order is used if any given subsystem must be installed before others.
| Name | Size [Kbytes] | Default | Order | Description |
|---|---|---|---|---|
| neko_celestia.sw.eoe | 2,060 | Yes | 9999 | execution only env |
| neko_celestia.sw.celestia | 15,541 | Yes | 9999 | celestia shared data files |
| neko_celestia.sw.fonts | 921 | Yes | 9999 | texture font files |
| neko_celestia.sw.textures | 7,284 | Yes | 9999 | textures |
| neko_celestia.man.html | 4 | Yes | 9999 | html documentation |
| neko_celestia.opt.relnotes | 5 | No | 9999 | release notes |
| neko_celestia.opt.dist | 48 | No | 9999 | distribution files |
| neko_celestia.opt.src | 17,667 | No | 9999 | original source code |
| neko_celestia.opt.patches | 17 | No | 9999 | source code patches |
[edit] Compiling
As for the majority of Nekoware packages, the 7.4.x release of SGI's MIPSpro Compiler suite has been used to build this package.
[edit] Environment
setenv CC cc setenv CXX CC setenv CFLAGS '-O3 -mips4 -n32' setenv CXXFLAGS '-O3 -mips4 -n32 -woff 1171,1174,1552,3624 -LANG:std' setenv CPPFLAGS '-I/usr/nekoware/include' setenv LDFLAGS '-L/usr/nekoware/lib -Wl,-rpath -Wl,/usr/nekoware/lib' setenv GNUMAKE '/usr/nekoware/bin/make' setenv PERL '/usr/nekoware/bin/perl'
[edit] Patches
You may need to apply the following patches: celestia132irix.patch celestia132txfimpact.patch
[edit] Configure
hide IRIX libjpeg and libpng .so libs patch -p0 < celestia132irix.patch patch -p0 < celestia132txfimpact.patch ./configure --prefix=/usr/nekoware --with-glut gmake gmake install
[edit] Release Notes
Click on the "show" link to expand the contents of the package's 'relnotes' file.
| The original "relnotes" File. |
|---|
SOURCE/VERSION
--------------
celestia-1.3.2
ENVIRONMENT VARIABLES
---------------------
setenv CC cc
setenv CXX CC
setenv CFLAGS '-O3 -mips4 -n32'
setenv CXXFLAGS '-O3 -mips4 -n32 -woff 1171,1174,1552,3624 -LANG:std'
setenv CPPFLAGS '-I/usr/nekoware/include'
setenv LDFLAGS '-L/usr/nekoware/lib -Wl,-rpath -Wl,/usr/nekoware/lib'
setenv GNUMAKE '/usr/nekoware/bin/make'
setenv PERL '/usr/nekoware/bin/perl'
CONFIGURE FLAGS
---------------
hide IRIX libjpeg and libpng .so libs
patch -p0 < celestia132irix.patch
patch -p0 < celestia132txfimpact.patch
./configure --prefix=/usr/nekoware --with-glut
gmake
gmake install
KNOWN DEPENDANCIES
------------------
neko_glut.sw.lib
neko_libjpeg.sw.lib
neko_libpng.sw.lib
neko_zlib.sw.lib
ERRORS/MISCELLANEOUS
--------------------
Hello bro'
Celestia is a major bitch to port. I started with version 1.3.0 in late summer 2003 and only now i can see the end of the tunnel :) Most problems vanished with the use of MIPSPro 7.4.2 and the newer version 1.3.2. (1.3.1 was a total dud. The main archive omitted the entire frontend gtk/glut/KDE part. No Compileee..)I had builds with 7.3.1.3 + CC headers but 7.4.2 has some extra namespace magic that made digging through the headers files not necessary anymore. Phew.
First note that there are still bugs:
1) The most obvious one was that i had to fix texturefonts on Impact/MGRAS systems because of the inability to render GL_ALPHA or GL_LUMINANCE, so all the text came out as rectangles... As an unwanted side effect of the celestia132txfimpact.patch, Phobos and Deimos, the two satellites of Mars, have a most interesting texture. check it out :) :) :)
2) Console and overlay HUD are broken. See below for more explanation.
3) Colors flacker wildly when rotating planets. Must have something to do with either incorrect bump mapping or some other odd texture limitation. I've noticed this on I2 Impact and O2 CRM graphics...
4) No idea what the "libpng error: incorrect data check" error means
So this makes it a beta release at best... :/
One of the problems in porting was the linuxism glXGetProcAddressARB function of which i had to revert to a general way of getting the address of a shared object function. Code lives in src/celengine/glext.cpp:
+#include <stdio.h>
+#include <dlfcn.h>
+typedef void (*FUNCS) (void);
+FUNCS sgiGetProcAddress(const char *procName) {
+ void *libHandle;
+ FUNCS myPtr = NULL;
+ libHandle = dlopen("libGL.so", RTLD_LAZY);
+ myPtr = (FUNCS) dlsym(libHandle, procName);
+ dlclose(libHandle);
+ return myPtr;
+}
+#define GET_GL_PROC_ADDRESS(name) sgiGetProcAddress(name)
+/*
I just nicked it from google somewhere :)
Evidence of the compiler not totally out-developed was this change in /src/celengine/observer.cpp :
- return frame.toUniversal(situation, getTime()).translation;
+ RigidTransform p = frame.toUniversal(situation, getTime());
+ return p.translation;
MIPSPro 7.4.2 bombs with an internal compiler error in the backend if you do not make that change.
Other stupid mistakes were the exclusion of $AR in the configure command, because they hardcoded ar in the Makefile.in . And CC is not happy with archives not being instantiated! Tssk :
-libceltxf_a_AR = $(AR) cru
+libceltxf_a_AR = $(AR)
.
-AR = ar
+AR = CC -ar -WR,-suv -o
The most flabbergasting bug is however the stream implementation in /src/celengine/console.cpp and src/celengine/overlay.cpp
Console::Console(int _nRows, int _nColumns) :
- ostream(&sbuf),
+ ostream(NULL),
Overlay::Overlay() :
- ostream(&sbuf),
+ ostream(NULL),
This is an obvious gcc-ism which actually goes away when you recompile the entire app with g++ ! My guess is that g++ gives out a different pointer address for the ostream. Apparently this does not comply to ANSI standards although nobody has made a stance against this bug. I may have to rewrite this streambuf implementation, or it could be as simple as a forgotten cast. Either way, console output and overlay (HUD) output are disabled by using the NULL pointer. Sorry. Any smart people who want to fix this are most welcome :)
Some extra cleaning i did with:
find . -name "ii_files" -exec rm -r {} \;
My way of making a global patch file from a hacked celestia source code tree:
diff -ru celestia-1.3.2 celestia-1.3.2-good | grep -v "Only in celestia" | grep -v "diff -ru" /tmp/celestia132irix.patch | sed 's/celestia-1.3.2-good\///g' | sed 's/celestia-1.3.2\///g' > celestia-1.3.2/celestia132irix.patch
Adding this to my CXXFLAGS helped in dodgy casts. It will show them as errors:
-diag_error 1516
Tardist created by Frank Everdij
|
[edit] Errors/Miscellaneous
Hello bro'
Celestia is a major bitch to port. I started with version 1.3.0 in late summer 2003 and only now i can see the end of the tunnel :) Most problems vanished with the use of MIPSPro 7.4.2 and the newer version 1.3.2. (1.3.1 was a total dud. The main archive omitted the entire frontend gtk/glut/KDE part. No Compileee..)I had builds with 7.3.1.3 + CC headers but 7.4.2 has some extra namespace magic that made digging through the headers files not necessary anymore. Phew.
First note that there are still bugs: 1) The most obvious one was that i had to fix texturefonts on Impact/MGRAS systems because of the inability to render GL_ALPHA or GL_LUMINANCE, so all the text came out as rectangles... As an unwanted side effect of the celestia132txfimpact.patch, Phobos and Deimos, the two satellites of Mars, have a most interesting texture. check it out :) :) :) 2) Console and overlay HUD are broken. See below for more explanation. 3) Colors flacker wildly when rotating planets. Must have something to do with either incorrect bump mapping or some other odd texture limitation. I've noticed this on I2 Impact and O2 CRM graphics... 4) No idea what the "libpng error: incorrect data check" error means
So this makes it a beta release at best... :/
One of the problems in porting was the linuxism glXGetProcAddressARB function of which i had to revert to a general way of getting the address of a shared object function. Code lives in src/celengine/glext.cpp: +#include <stdio.h> +#include <dlfcn.h> +typedef void (*FUNCS) (void); +FUNCS sgiGetProcAddress(const char *procName) { + void *libHandle; + FUNCS myPtr = NULL; + libHandle = dlopen("libGL.so", RTLD_LAZY); + myPtr = (FUNCS) dlsym(libHandle, procName); + dlclose(libHandle); + return myPtr; +} +#define GET_GL_PROC_ADDRESS(name) sgiGetProcAddress(name) +/* I just nicked it from google somewhere :)
Evidence of the compiler not totally out-developed was this change in /src/celengine/observer.cpp : - return frame.toUniversal(situation, getTime()).translation; + RigidTransform p = frame.toUniversal(situation, getTime()); + return p.translation; MIPSPro 7.4.2 bombs with an internal compiler error in the backend if you do not make that change.
Other stupid mistakes were the exclusion of $AR in the configure command, because they hardcoded ar in the Makefile.in . And CC is not happy with archives not being instantiated! Tssk : -libceltxf_a_AR = $(AR) cru +libceltxf_a_AR = $(AR) . -AR = ar +AR = CC -ar -WR,-suv -o
The most flabbergasting bug is however the stream implementation in /src/celengine/console.cpp and src/celengine/overlay.cpp
Console::Console(int _nRows, int _nColumns) :
- ostream(&sbuf), + ostream(NULL),
Overlay::Overlay() :
- ostream(&sbuf), + ostream(NULL),
This is an obvious gcc-ism which actually goes away when you recompile the entire app with g++ ! My guess is that g++ gives out a different pointer address for the ostream. Apparently this does not comply to ANSI standards although nobody has made a stance against this bug. I may have to rewrite this streambuf implementation, or it could be as simple as a forgotten cast. Either way, console output and overlay (HUD) output are disabled by using the NULL pointer. Sorry. Any smart people who want to fix this are most welcome :)
Some extra cleaning i did with: find . -name "ii_files" -exec rm -r {} \;
My way of making a global patch file from a hacked celestia source code tree: diff -ru celestia-1.3.2 celestia-1.3.2-good | grep -v "Only in celestia" | grep -v "diff -ru" /tmp/celestia132irix.patch | sed 's/celestia-1.3.2-good\///g' | sed 's/celestia-1.3.2\///g' > celestia-1.3.2/celestia132irix.patch
Adding this to my CXXFLAGS helped in dodgy casts. It will show them as errors: -diag_error 1516
[edit] Older Versions
- None
[edit] External Links
None.
