LWJGL on Solaris

Started by Matzon, July 29, 2008, 13:58:48

Previous topic - Next topic

Matzon

This is just a small guide on how to get LWJGL running on Solaris - this is still work in progress, and is meant as a guide if you wish to help out. No work is bing done in SVN at this time.

* install solaris
* install blastwave
* pkg-get -i gcc4g++
* pkg-get -i ant
* pkg-get -i subversion
(* pkg-get -i bash)

Maybe unclean???
=================
* link /usr/ucb/cc to /opt/csw/gcc4/bin/gcc
* link /usr/ucb/ld to /opt/csw/bin/gld
* link /usr/jdk/instances/jdk1.5.0/include/solaris/jawt_md.h to /usr/jdk/instances/jdk1.5.0/include/jawt_md.h
* link /usr/jdk/instances/jdk1.5.0/include/solaris/jni_md.h to /usr/jdk/instances/jdk1.5.0/include/jni_md.h
* make sure that gas (which is here: /opt/csw/bin/gas) is on the path or create a symlink to it in /usr/ucb
* make sure that gstrip is on the path
-----------------
 
* checkout lwjgl
* cp -R platform_build/linux_ant platform_build/solaris_ant
* add solaris fileset in platform_build/build-definitions.xml
* add solaris sections to build.xml
* change output of build to solaris from linux (if you copied the linux parts)
* add <arg value="-I/usr/X11R6/include"/> to the cc command line section
* rename strip to gstrip  - stripping seems to be too aggressive - so delete from build file
* #include <X11/Xlib.h> in extgl_glx.h before Xutil.h
* remove --version script linker option

HACK
changed linker flags to: ${libs32} -G -o ${libname}
where libs32 = -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/j2se/jre/lib/i386 -lm -lX11 -lXext -lXcursor -lXrandr -lpthread -ljawt -lXxf86vm

This produces a library which works (!) but has the following issues:
* Dynamically linked - critical - needs to be statically linked with at least lXxf86vm ?
* Crashes on any keyboard input, due to missing Xutf8LookupString - critical, old X11 in solaris ?
* Build using gcc4.0.2 - rather old, might not be an issue.
* The produced binary is for the specific platform ONLY - we need to figure out how to handle x86, x64 and sparc - like we do on mac (though solaris doesn't have fat binaries).