Difference between revisions of "FS2 Open on Solaris"

From FreeSpace Wiki
Jump to: navigation, search
(Install needed dependencies: Added gnu-make to be safe)
m (+category)
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Grab a copy of Solaris ==
 
== Grab a copy of Solaris ==
  
Download the Oracle Solaris 11.1 x86 VirtualBox Appliance, update the guest additions, or install Solaris 11.1 for x86 on a desktop PC.
+
Download the Oracle Solaris 11.2 x86 VirtualBox Appliance, update the guest additions, or install Solaris 11.2 for x86 on a desktop PC.
  
 
== Install needed dependencies ==
 
== Install needed dependencies ==
 
<ul>
 
<ul>
<li>developer/gcc-45</li>
+
<li>developer/gcc (currently installs 4.8.2)</li>
<li>system/library/gcc-45-runtime</li>
+
<li>Make sure the matching gcc runtime is installed</li>
<li>developer/build/autoconf</li>
+
<li>developer/build/autoconf (currently 2.68)</li>
<li>developer/build/automake</li>
+
<li>developer/build/automake (currently 1.11.2)</li>
<li>developer/build/gnu-make</li>
+
<li>developer/build/gnu-make (Appliance already has this)</li>
<li>library/readline</li>
+
<li>developer/build/libtool (currently 2.4.2)</li>
<li>runtime/lua</li>
+
<li>library/readline (Appliance already has this)</li>
<li>developer/versioning/subversion</li>
+
<li>runtime/lua (Appliance already has this)</li>
<li>library/sdl</li>
 
 
<li>developer/versioning/git</li>
 
<li>developer/versioning/git</li>
<li>developer/build/cmake</li>
+
<li>library/sdl (currently 1.2.14)</li>
 +
<li>developer/versioning/git (currently 1.7.9.2)</li>
 +
<li>developer/build/cmake (currently 2.8.6)</li>
 
</ul>
 
</ul>
 +
 +
On OpenSXCE (OpenIndiana based distro for Sparc) I had to install CSWautoconf (included 2.63 is too old), CSWpkgconfig (very important to fix parse error in configure script), and uninstalled the original autoconf program.  I still had to install OpenAL and Jansson, but OpenAL Soft had to be version 1.11.753 because no newer version would compile due to some opcode errors, and newer versions from git would not configure due to a pthread.h issue which doesn't seem to occur in the last release version or prior.  Also, that openal soft's "gmake install" command ignored the cmake install prefix, so I had to install it by manually copying files to their destinations.  The latest official Solaris from Oracle doesn't seem to have that problem with the newest versions of OpenAL Soft in git.  OpenSXCE did not need a newer gcc though.
  
 
== Install OpenAL ==
 
== Install OpenAL ==
This is why git and cmake were installed while you had the package manager open.  Clone the latest openal-soft from http://kcat.strangesoft.net/openal.html, follow its build instructions, except use the following command instead of 'cmake ..':<br />
+
This is why git and cmake were installed while you had the package manager open.  Download OpenAL Soft 1.15.1 (1.16 and latest git currently fail with a PThreads error) from http://kcat.strangesoft.net/openal-releases/, follow the build instructions on http://kcat.strangesoft.net/openal.html, except use the following command instead of 'cmake ..':<br />
 
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
 
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
 +
 +
== Install Jansson ==
 +
[http://www.digip.org/jansson/ Jansson] is the JSON library for C that is needed for the new WebUI dedicated server code.  There is currently no Solaris package, so you will have to compile this from source.  The latest version I can get working out of the box on Solaris 11.2 is from their Git repo, as 2.6 will not compile with a complaint about the isnan macro.  Clone the source repo to a new directory and cd into that directory, then:
 +
<ul>
 +
<li>cmake -DCMAKE_INSTALL_PREFIX=/usr ..</li>
 +
<li>gmake</li>
 +
<li>gmake check</li>
 +
<li>sudo gmake install</li>
 +
</ul>
 +
That will give you an installation of Jansson which pkg-config can find with no other environment editing required.  Keep the jansson git folder around if you think you might want to run 'sudo gmake uninstall' at some point down the line, like if jansson ever gets into the package manager, or you want to upgrade.
 +
 +
== Install OpenCSW packages ==
 +
Installing these packages will fix the linking errors with libjpeg and libGL.  bzflag bring mesa, libglew, and probably some other stuff that's needed and it was easier to get it all in one go.  Yes, Solaris will indicate that jpeg, mesa, etc are already installed, but they don't link correctly for some reason.  Installing the CSW versions fixes that.
 +
<ul>
 +
<li>sudo pkgadd -d http://get.opencsw.org/now</li>
 +
<li>sudo pkgutil -U</li>
 +
<li>sudo pkgutil -y -i CSWlibjpeg-dev</li>
 +
<li>sudo pkgutil -y -i CSWbzflag</li>
 +
<li>sudo ln -s /opt/csw/lib/libjpeg.so.7 /usr/lib/  (might be needed to fix issue with finding libjpeg after these packages are installed)</li>
 +
</ul>
  
 
== Compile FS2 ==
 
== Compile FS2 ==
 
<ul>
 
<ul>
<li>svn co svn://svn.icculus.org/fs2open/trunk/fs2_open/</li>
+
<li>git clone https://github.com/scp-fs2open/fs2open.github.com.git fs2_open</li>
 
<li>cd fs2_open</li>
 
<li>cd fs2_open</li>
 
<li>./autogen.sh</li>
 
<li>./autogen.sh</li>
<li>make</li>
+
<li>gmake</li>
<li>TODO:  Figure out why it can't find libGL.so.1 in the virtual machine.  See if a full blown desktop install has similar issues.</li>
 
 
<li>cp code/fs2_open_* ../</li>
 
<li>cp code/fs2_open_* ../</li>
 
</ul>
 
</ul>
Line 35: Line 57:
 
[http://rsaxvc.net/blog/2010/9/30/Building%20FS2_Open%20on%20OpenSolaris.html Building FS2_Open on OpenSolaris]<br />
 
[http://rsaxvc.net/blog/2010/9/30/Building%20FS2_Open%20on%20OpenSolaris.html Building FS2_Open on OpenSolaris]<br />
 
[http://rsaxvc.net/blog/2010/9/19/Building%20OpenAL%20on%20Solaris.html Building OpenAL on Solaris]
 
[http://rsaxvc.net/blog/2010/9/19/Building%20OpenAL%20on%20Solaris.html Building OpenAL on Solaris]
 +
 +
[[Category:Source Code Project]]

Latest revision as of 13:03, 28 September 2022

Grab a copy of Solaris

Download the Oracle Solaris 11.2 x86 VirtualBox Appliance, update the guest additions, or install Solaris 11.2 for x86 on a desktop PC.

Install needed dependencies

  • developer/gcc (currently installs 4.8.2)
  • Make sure the matching gcc runtime is installed
  • developer/build/autoconf (currently 2.68)
  • developer/build/automake (currently 1.11.2)
  • developer/build/gnu-make (Appliance already has this)
  • developer/build/libtool (currently 2.4.2)
  • library/readline (Appliance already has this)
  • runtime/lua (Appliance already has this)
  • developer/versioning/git
  • library/sdl (currently 1.2.14)
  • developer/versioning/git (currently 1.7.9.2)
  • developer/build/cmake (currently 2.8.6)

On OpenSXCE (OpenIndiana based distro for Sparc) I had to install CSWautoconf (included 2.63 is too old), CSWpkgconfig (very important to fix parse error in configure script), and uninstalled the original autoconf program. I still had to install OpenAL and Jansson, but OpenAL Soft had to be version 1.11.753 because no newer version would compile due to some opcode errors, and newer versions from git would not configure due to a pthread.h issue which doesn't seem to occur in the last release version or prior. Also, that openal soft's "gmake install" command ignored the cmake install prefix, so I had to install it by manually copying files to their destinations. The latest official Solaris from Oracle doesn't seem to have that problem with the newest versions of OpenAL Soft in git. OpenSXCE did not need a newer gcc though.

Install OpenAL

This is why git and cmake were installed while you had the package manager open. Download OpenAL Soft 1.15.1 (1.16 and latest git currently fail with a PThreads error) from http://kcat.strangesoft.net/openal-releases/, follow the build instructions on http://kcat.strangesoft.net/openal.html, except use the following command instead of 'cmake ..':
cmake -DCMAKE_INSTALL_PREFIX=/usr ..

Install Jansson

Jansson is the JSON library for C that is needed for the new WebUI dedicated server code. There is currently no Solaris package, so you will have to compile this from source. The latest version I can get working out of the box on Solaris 11.2 is from their Git repo, as 2.6 will not compile with a complaint about the isnan macro. Clone the source repo to a new directory and cd into that directory, then:

  • cmake -DCMAKE_INSTALL_PREFIX=/usr ..
  • gmake
  • gmake check
  • sudo gmake install

That will give you an installation of Jansson which pkg-config can find with no other environment editing required. Keep the jansson git folder around if you think you might want to run 'sudo gmake uninstall' at some point down the line, like if jansson ever gets into the package manager, or you want to upgrade.

Install OpenCSW packages

Installing these packages will fix the linking errors with libjpeg and libGL. bzflag bring mesa, libglew, and probably some other stuff that's needed and it was easier to get it all in one go. Yes, Solaris will indicate that jpeg, mesa, etc are already installed, but they don't link correctly for some reason. Installing the CSW versions fixes that.

  • sudo pkgadd -d http://get.opencsw.org/now
  • sudo pkgutil -U
  • sudo pkgutil -y -i CSWlibjpeg-dev
  • sudo pkgutil -y -i CSWbzflag
  • sudo ln -s /opt/csw/lib/libjpeg.so.7 /usr/lib/ (might be needed to fix issue with finding libjpeg after these packages are installed)

Compile FS2

References

Building FS2_Open on OpenSolaris
Building OpenAL on Solaris