User:Dzonatas Sol/Cross compiling the viewer (i686-mingw32)

From Second Life Wiki
Jump to navigation Jump to search

Listed below is the process to cross compile the Second Life viewer on Linux with a Win32 target. This process has only been used on debian and debian based systems like ubuntu. For other platforms, see Get source and compile.

This process is not trivial.

Installation

These instructions are intended for those already familiar on how to compile the viewer on Windows and Linux environments. Please refer to those pages for additional help on how to retrieve and setup dependencies to the related host and target platform.

SDKs

Under Windows or WINE, you will need to install these Software Development Kits:

We'll use the C/C++ includes and code libraries of these packages.

GCC (i686-mingw32)

Under Linux, we'll use the Minimalist GNU for Windows Compiler to cross compile. We can recompile binutils and GCC for the i686 and win32, and mingw32 adds the compatible headers, libraries, and compiler support as normally found under the Windows environment.

SLViewer

Patches are being made for the slviewer source to let this compilation happen. You can help!

OSLCC Project

The Open Second Life Cross Compiler project is a collection of scripts and patches to help automate the build of mingw32 and Second Life.

Download and run "build.sh" from this archive, under Linux: oslcc-20070307.tar.bz2

The script will download the files to automatically build the cross compiler. A future version will also build the viewer source.

Libraries

The dependencies of the code libraries are dependent on compile-time libraries and run-time libraries. A few of the run-time libraries you will not be able to cross compiler do to copyright restrictions on the source distribution. Use the pre-built code libraries of the target platform (Win32 DLLs) for those that you cannot cross compile from the host build environment.

Known Issues

There are some known issues with the source in relation to cross compilation: