logo_kerberos.gif

Difference between revisions of "Solaris Build Environment"

From K5Wiki
Jump to: navigation, search
Line 36: Line 36:
   
 
cd /usr/local/src/gcc-5.4.0
 
cd /usr/local/src/gcc-5.4.0
./configure --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --disable-shared
+
./configure --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local
 
gmake && gmake install
 
gmake && gmake install

Revision as of 00:18, 12 November 2016

This page contains notes on the setup of a Solaris buildbot worker.

Our current Solaris build hardware is a Sun Fire V240 running Solaris 10 U10.

Solaris 10 includes a variety of free software tools in /usr/sfw, but not the full set of dependencies needed to checkout, build, and test the krb5 tree. Our chosen approach to building these additional dependencies is to use the NetBSD pkgsrc collection.

Building a newer gcc

/usr/sfw contains gcc 3.4.3, which is adequate for building most free software but has several problems for building new packages: it defaults to the gnu89 standards environment, which leads to build failures when including C99 Solaris headers such as <stdbool.h>. It also does not understand the -pthread or -print-multiarch options, which some pkgsrc packages rely on. Therefore, we begin by building gcc 5.4 into /usr/local, using the following steps:

1. Set up a shell with a path containing the needed system utilities:

   /bin/bash
   export PATH=/usr/sbin:/usr/bin:/usr/sfw/bin:/usr/ccs/bin

2. Create /usr/local/src:

   mkdir /usr/local/src
   cd /usr/local/src

3. From ftp.gnu.org, fetch the latest versions of gmp, mpfr, and mpc, and fetch gcc 5.4.0. Untar them in /usr/local/src.

4. Build gmp, mpfr, and mcc as follows. Without "ABI=32" in the configure line, gmp chooses the 64-bit ABI over the default 32-bit ABI for performance reasons.

   cd /usr/local/src/gmp-version
   ./configure --disable-shared ABI=32
   gmake && gmake install
   cd /usr/local/src/mpfr-version
   ./configure --disable-shared LDFLAGS=-L/usr/local/lib
   gmake && gmake install
   cd /usr/local/src/mcc-version
   ./configure --disable-shared LDFLAGS=-L/usr/local/lib
   gmake && gmake install

5. Build gcc as follows. This build takes many hours.

   cd /usr/local/src/gcc-5.4.0
   ./configure --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local
   gmake && gmake install