This wiki is archived and useful information is being migrated to the main bzflag.org website
Compiling/Solaris Notes
Moved from build page. really should be refactored into a proper format, not a blob of code
Solaris 10 (Oct, 2009)
This is what I had to do to get bzflag-2.0.12 to compile and run on Solaris 10
Install Sparc packages (in /opt) from Sunfreeware
You don't necessarily have to install in /opt. If not, skip all the "opt" stuff or substitute the correct location instead. Most of these packages will install in /usr/local. /usr/local was not available to me.
curl-7.19.6-sol10-sparc-local.gz libidn-1.14-sol10-sparc-local.gz libssh2-1.2-sol10-sparc-local.gz openssl-0.9.8k-sol10-sparc-local.gz libintl-3.4.0-sol10-sparc-local.gz libiconv-1.11-sol10-sparc-local.gz
If you get an error saying that a library has moved, you might have to go into the library's .la file and update its location.
You will also have to update the *.la files if you get errors like this:
libtool: link: cannot find the library `/usr/local/lib/libidn.la' or unhandled argument `/usr/local/lib/libidn.la'
You will have to update these lines in SMCliconv/lib/libiconv.la, etc:
dependency_libs=' -R/usr/local/lib -R/usr/lib -R/usr/openwin/lib -R/opt/SMCossl/ssl/lib -R/usr/local/BerkeleyDB.4.7/lib -R/usr/local/BerkeleyDB.4.2/lib -R/usr/X11R6/lib -L/usr/local/lib -L/usr/lib -L/usr/openwin/lib -L/opt/SMCossl/ssl/lib -L/usr/local/BerkeleyDB.4.2/lib </b> /opt/SMClibidn/lib/libidn.la </b> -L/usr/local/pgsql/lib -L/usr/X11R6/lib /opt/SMClintl/lib/libintl.la -lsec -lc /opt/SMClssh2/lib/libssh2.la /opt/SMCliconv/lib/libiconv.la -lssl -lcrypto -lsocket -lnsl -lz'
Fix missing links
ln -s /usr/sfw/bin/gmake /usr/sfw/bin/make ln -s /usr/xpg4/bin/ar /usr/bin/ar
Modify environment variables
export CPPFLAGS="-I/opt/SMClintl/include -I/opt/SMCossl/ssl/include -I/opt/SMCcurl/include -I/opt/SMClssh2/include" export CPPFLAGS="$CPPFLAGS -I/opt/SMClibidn/include -L/opt/SMClintl/lib -L/opt/SMCossl/ssl/lib -L/opt/SMCcurl/lib " export CPPFLAGS="$CPPFLAGS -L/opt/SMClssh2/lib -L/opt/SMClibidn/lib -L/opt/c-ares/lib -L/pt/SMCossl/ssl/lib -I/usr/openwin/include/GL" export LDFLAGS="-L/usr/lib -L/opt/SMClintl/lib -L/opt/SMClibidn/lib -L/opt/SMClssh2/lib" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/SMCcurl/lib:/opt/SMClibidn/lib:/opt/SMClintl/lib:/opt/SMClssh2/lib:/opt/SMCliconv/lib:/opt/SMCossl/lib:/opt/SMCossl/ssl/lib"
Run configure
./configure --with-libcurl=/opt/SMCcurl --prefix=/opt/bzflag --build=sun4
Edit sources
In include/SceneNode.h, change "glColor" to myColor": (Solves the "Expected ')' before '->' token" error) #define myColor3f(r, g, b) SceneNode::myColor3f(r, g, b) #define myColor4f(r, g, b, a) SceneNode::myColor4f(r, g, b, a) #define myColor3fv(rgb) SceneNode::myColor3fv(rgb) #define myColor4fv(rgba) SceneNode::myColor4fv(rgba) static void myColor3f(GLfloat r, GLfloat g, GLfloat b) #ifdef __MINGW32__ {if (!colorOverride) ::myColor3f(r, g, b); }; #else { (*color3f)(r, g, b); } #endif static void myColor4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a) #ifdef __MINGW32__ {if (!colorOverride) ::myColor4f(r, g, b, a); }; #else { (*color4f)(r, g, b, a); } #endif static void myColor3fv(const GLfloat* rgb) #ifdef __MINGW32__ {if (!colorOverride) ::myColor3fv(rgb); }; #else { (*color3fv)(rgb); } #endif static void myColor4fv(const GLfloat* rgba) #ifdef __MINGW32__ {if (!colorOverride) ::myColor4fv(rgba); }; #else
Fix Makefiles
Add -lresolv to LIBS in src/bzfs/Makefile, src/bzflag/Makefile, src/bzadmin/Makefile (Solves the inet_aton unresolved symbol error) LIBS = -lsocket -lm -lresolv In src/platform edit the Makefile and uncomment the Solaris stuff: am_libPlatform_la_OBJECTS = PlatformFactory.lo \ BzfDisplay.lo \ BzfJoystick.lo \ BzfVisual.lo \ BzfWindow.lo \ BzfMedia.lo \ wave.lo \ SolarisPlatformFactory.lo \ SolarisMedia.lo \ XDisplay.lo \ XVisual.lo \ XWindow.lo (Makes sure platform.a gets built - this can probably be done with a configure switch, but I couldn't find it)
Make and test!
make; src/bzflag/bzflag