Compiling Wine 1.2.3 on Solaris 10 (x86)

2011-05-06

Wine compiles without many problems on Solaris 10. The only caveat is that winebuild might not be happy with Solaris ld. I found that it operates flawlessly with GNU ld though (this has nothing to do with the ld the compiler uses).

I used the following tools for the build (installation directories might of course vary):

Prerequisite packages

Wine makes use of a number of prerequisite packages. Many of them are optional and enable additional features if available.

PackageCompiler usedBuild notes
flex-2.5.35 Solaris Studio 12.2 uneventful
openal-soft-1.13 gcc-4.5.2 See here
llcms-1.19 Solaris Studio 12.2 uneventful
makedepend-1.0.1 Sun Studio 12 uneventful
sane-backends-1.0.20 gcc-3.4.3

Configuration:

CFLAGS="-I/usr/sfw/include" \
CPPFLAGS="-I/usr/sfw/include" \
LD_LIBRARY_PATH=/usr/sfw/lib:$LD_LIBRARY_PATH \
LDFLAGS="-L/usr/sfw/lib -R/usr/sfw/lib -lusb" ./configure
fontforge-20110222 gcc-4.5.2

I used it with freetype-2.3.7 off an older Mozilla source tree. A standalone Freetype source tree obviously would work equally well.

I built it with GNU utilities first in the PATH.

Configuration example for installation as /usr/local/dist/bin/fontforge:

./configure --prefix=/usr/local/dist \
LDFLAGS='-L/usr/local/dist/lib -R/usr/local/dist/lib -lrt -lintl' \
--without-iconv \
--without-pango \
--with-freetype-src=$HOME/src/mozilla-1.9.2/modules/freetype2 
gmake
gmake install
freetype-2.4.4 Solaris Studio 12.2

Configuration:

GNUMAKE=gmake ./configure CC=cc --prefix=/usr/local/dist
icoutils-0.29.1gcc-3.4.3uneventful
OpenSSL 0.9.8ngcc-4.5.2

Configuration and build:

./Configure --prefix=/usr/local/dist --shared 'solaris-x86-gcc'
LD_OPTIONS='-R/usr/local/dist/lib' make install

Wine

In this example, Wine is built in a separate object directory next to the source tree. The PATH is set so that gcc-4.5.2, GNU ld, and the tools built above can be found.

mkdir wine-obj
cd wine-obj

export PATH=/usr/local/dist/gcc-4.5.2/bin\
:/usr/local/dist/gnu/i386-pc-solaris2.10/bin\
:/usr/local/dist/bin\
:$PATH

../wine-1.2.3/configure \
--prefix=/usr/local/dist/wine-1.2.3 \
LDFLAGS=\
"-L/usr/local/dist/lib -R/usr/local/dist/lib "\
"-L/usr/openwin/sfw/lib -R/usr/openwin/sfw/lib "\
"-R/usr/sfw/lib "\
"-R/usr/local/dist/wine-1.2.3/lib "\
"-lsocket -lnsl -lxml2" \
CPPFLAGS=\
"-I/usr/local/dist/include "\
"-I/usr/local/dist/include/openssl "\
"-I/usr/openwin/sfw/include "\
"-I/usr/include/libxml2" \
--disable-win16

gmake depend
gmake
gmake install


Last update 2011-05-08