#400 Stage2.1.1: building on Solaris10 with SunStudio12 (tricky!)

Stage (103)

After two days of fighting, finally I was able to compile AND RUN Stage-2.1.1 on Solaris 10. Since compilation using gcc-2.95 compiler from CSW environment needs all C files in Stage to be rewritten in order to conform pre-C99 standards (it is possible and it works, lots of work to do), I've decided to build it using SunStudio12 SUNPRO compiler (less work to do).

First problem is that gcc is probably the only one compiler I know which allows the fact that not all symbols in the code are resolved. First thing I had to do was to fill missing pieces with stub code. Other thing was zero-sized structure, I've filled it with one field called '_' of type char. librtk2 problem with __FUNCTION__ known from main Player distribution also had to be fixed here. gui_menus.c code couldn't understand forward declaration of create_prefsdialog(), however it was easy to fix with some nasty hack ifdefed for SUNPRO_C compiler.

Another problem is caused by libtool. I couldn't spend more time on fighting with it (it fails silently while creating .so files, only static .a libraries are created), so I've written by own Makefile that has to be placed into stage-2.1.1/src directory (I've called it Makefile.sun). Also configure couldn't set HAVE_POLL properly (I don't want to know why), so I hardcoded -DHAVE_POLL (and -DHAVE_CONFIG_H) into the Makefile. Another bad thing is that all makefiles in Stage pass -Wall option to the compiler, this option is not accepted by SUNPRO compilers.

Procedure of installation Stage-2.1.1 on Solaris 10 with already installed Player-2.2 (SVN trunk) is:
1. Unpack Stage 2.1.1 tarball somewhere
2. Go there and apply stage-2.1.1-sunpro.patch
3. Type there (add other options you need, e.g. --prefix):
CC=suncc CXX=sunCC ./configure
4. Go to src directory, put Makefile.sun file there and type:
make -f Makefile.sun
5. after compilation process you should have libstage.a and libstageplugin.so files, copy them into the directory where your Player libraries are placed (e.g. /usr/local/lib)
6. copy worlds directory into its final location (e.g. /usr/local/share/stage)


  • Paul Osmialowski

    File Added: Makefile.sun

  • Paul Osmialowski

    • labels: --> Stage
    • assigned_to: nobody --> thjc
  • Toby Collett

    Toby Collett - 2009-03-22

    fixed/patches in release-2-1-patches

  • Toby Collett

    Toby Collett - 2009-03-22
    • status: open --> closed-accepted

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks