r12 - 15 Apr 2005 - 19:17:45 - BobKrzaczekYou are here: TWiki >  Help Web  >  AdminStuff > SoftwareInstalls > BuildingFromScratch > BuildingGtk
Tags:
create new tag
, view all tags
  • Version: 2.4.14
  • Summary: Multi-platform toolkit for creating GUIs.

Table Of Contents

Prerequisites

Notes

There are two versions of GTK, 1 and 2. The latest GTK version 1 release was 1.2.10; don't be fooled by the 1.3 series, those were development-only prereleases for version 2. We build both the version 1 and version 2 releases of GTK, and keep them more or less up to date. There's a lot of software that still relies on the old builds and releases.

Version 2.4.14

Obtaining

Visit ftp://ftp.gtk.org/pub/gtk/ and look for the latest version. As of this topic's writing, version 2.4.14 could be found in the v2.4 directory.

   cd /cis/src/imaging
   <... download gtk+-2.4.14.tar.bz2 ...>
   bzip2 -dc gtk+-2.4.14.tar.bz2 |tar xf -
   cd gtk+-2.4.14

Solaris Forte 64 bit

Use this for your PATH
PATH=/bin/sparcv9:/bin:/sbin:/usr/bin:/usr/sbin:/usr/openwin/bin:/usr/dt/bin:/usr/ccs/bin/sparcv9:/usr/ccs/bin:/opt/SUNWspro/bin/sparcv9:/opt/SUNWspro/bin:/usr/java/bin:/cis/bin/sparcv9:/cis/bin:/cis/sbin

Create a unique build directory and configure it there. LIBS needs to have one of the pango libraries named in it, otherwise the configure script will think it can't link Pango. sigh

mkdir obj-sol-cis64
cd obj-sol-cis64
CC='cc -xtarget=ultra -xarch=v9a' \
   CXX='CC -xtarget=ultra -xarch=v9a' \
   CFLAGS=-O CXXFLAGS=-O \
   CPPFLAGS=-I/cis/include \
   LDFLAGS='-L/cis/lib/sparcv9 -R/cis/lib/sparcv9' \
   MAKE=gmake PERL=/cis/bin/perl \
   LIBS=-lpango-1.0 \
      ../configure --prefix=/cis \
         --bindir=/cis/bin/sparcv9 \
         --libdir=/cis/lib/sparcv9 \
         --sbindir=/cis/sbin/sparcv9
gmake
gmake check
gmake install
ln -s /cis/share/gtk-doc /cis/share/doc/pango

Version 1.2.10

Obtain and Unpack

Head out to ftp://ftp.gtk.org/pub/gtk, and look for the latest version 1.2 release. At the time of this writing, it was version 1.2, release 10. Download gtk-1.2.10.tar.gz into /cis/src/imaging. Unpack it one directory lower than usual so we can build other archs next to it.
   mkdir gtk-1.2.10
   cd gtk-1.2.10
   gzip -dc ../gtk-1.2.10.tar.gz |tar xf

Solaris Forte 64 Bit Build

Ensure that gcc and friends are not in your path. cc and CC should be found in /opt/SUNWspro/bin. Create a new build directory, and configure for an installation under /cis. Ensure that /cis/bin/sparcv9 is in your path, ahead of /cis/bin.
   mkdir obj-sol-cis64
   cd obj-sol-cis64
   CC='cc -xtarget=ultra -xarch=v9a' CXX='CC -xtarget=ultra -xarch=v9a' \
   LD_RUN_PATH=/cis/lib/sparcv9 CFLAGS=-O CXXFLAGS=-O \
      ../configure --prefix=/cis \
         --bindir=/cis/bin/sparcv9 --libdir=/cis/lib/sparcv9
   gmake
   gmake check

If all tests pass, then go ahead with the installation.

   sudo gmake install
   ln -s /cis/share/gtk-doc /cis/share/doc/gtk
   ln -s /cis/share/gtk-doc /cis/share/doc/glib

Solaris Forte 32 Bit Build

Ensure that gcc and friends are not in your path. cc and CC should be found in /opt/SUNWspro/bin. Create a new build directory, and configure for an installation under /cis. Ensure that /cis/bin/sparcv9 is not in your path.
mkdir obj-sol-cis
cd obj-sol-cis
LD_RUN_PATH=/cis/lib \
   CC='cc -xtarget=ultra -xarch=v8plusa' \
   CXX='CC -xtarget=ultra -xarch=v8plusa' \
   CFLAGS=-O CXXFLAGS=-O \
   ../configure --prefix=/cis
gmake
gmake check

If all tests pass, then go ahead with the installation.

   sudo gmake install
   ln -s /cis/share/gtk-doc /cis/share/doc/gtk
   ln -s /cis/share/gtk-doc /cis/share/doc/glib

Solaris Gnu 64 Bit Build

Ensure that /gnu/bin is early in your path; gcc and friends should come from there. Create a new build directory, and configure for an installation under /gnu. Ensure that /gnu/bin/sparcv9 is in your path, and ahead of /gnu/bin.
   mkdir obj-sol-gnu64
   cd obj-sol-gnu64
   CC='gcc -mcpu=ultrasparc -m64' CXX='g++ -mcpu=ultrasparc -m64' \
   LD_RUN_PATH=/gnu/lib/sparcv9 CFLAGS=-O CXXFLAGS=-O \
      ../configure --prefix=/gnu \
         --bindir=/gnu/bin/sparcv9 --libdir=/gnu/lib/sparcv9
   gmake
   gmake check

If all tests pass, then go ahead with the installation.

   sudo gmake install
   ln -s /gnu/share/gtk-doc /gnu/share/doc/gtk
   ln -s /gnu/share/gtk-doc /gnu/share/doc/glib

Solaris Gnu 32 Bit Build

Ensure that /gnu/bin is early in your path; gcc and friends should come from there. Create a new build directory, and configure for an installation under /gnu. Ensure that /gnu/bin/sparcv9 is not in your path.
   mkdir obj-sol-gnu
   cd obj-sol-gnu
   CC='gcc -mcpu=ultrasparc' CXX='g++ -mcpu=ultrasparc' \
   LD_RUN_PATH=/gnu/lib CFLAGS=-O CXXFLAGS=-O \
      ../configure --prefix=/gnu
   gmake
   gmake check

If all tests pass, then go ahead with the installation.

   sudo gmake install
   ln -s /gnu/share/gtk-doc /gnu/share/doc/gtk
   ln -s /gnu/share/gtk-doc /gnu/share/doc/glib

Version 2.2.2

Obtaining

Visit ftp://ftp.gtk.org/pub/gtk/ and look for the latest version. As of this topic's writing, version 2.2.2 could be found in the v2.2 directory.

   cd /cis/src/imaging
   <... download gtk+-2.2.2.tar.bz2 ...>
   bzip2 -dc gtk+-2.2.2.tar.bz2 |tar xf -
   cd gtk+-2.2.2

Solaris

Build GTK with flags similar to those used in BuildingPango.

First, perform a 64 bit build for /cis. Ensure that your PATH starts with /cis/bin/sparcv9:/cis/bin

   CC='cc -xtarget=ultra -xarch=v9a' CXX='CC -xtarget=ultra -xarch=v9a' \
      F77='f77 -xtarget=ultra -xarch=v9a' \
      CFLAGS=-O CXXFLAGS=-O CPPFLAGS=-I/cis/include \
      FFLAGS='-O -I/cis/include' F77FLAGS='-O -I/cis/include' \
      LDFLAGS=-L/cis/lib/sparcv9 \
      LD_RUN_PATH=/cis/lib/sparcv9 LD_LIBRARY_PATH=/cis/lib/sparcv9 \
      MAKE=gmake PERL=/cis/bin/perl \
         ./configure --prefix=/cis --bindir=/cis/bin/sparcv9 \
            --libdir=/cis/lib/sparcv9 --sbindir=/cis/sbin/sparcv9
   LD_RUN_PATH=/cis/lib/sparcv9:/usr/openwin/lib/sparcv9 \
      LD_LIBRARY_PATH=/cis/lib/sparcv9:/usr/openwin/lib/sparcv9 \
         gmake
   gmake check
   gmake install
   gmake clean

Then, do a 32 bit build for /cis. Remove /cis/bin/sparcv9 from your PATH.

   CC='cc -xtarget=ultra' CXX='CC -xtarget=ultra' \
      F77='f77 -xtarget=ultra' \
      CFLAGS=-O CXXFLAGS=-O CPPFLAGS=-I/cis/include \
      FFLAGS='-O -I/cis/include' F77FLAGS='-O -I/cis/include' \
      LDFLAGS=-L/cis/lib \
      LD_RUN_PATH=/cis/lib LD_LIBRARY_PATH=/cis/lib \
      MAKE=gmake PERL=/cis/bin/perl \
         ./configure --prefix=/cis
   LD_RUN_PATH=/cis/lib:/usr/openwin/lib \
      LD_LIBRARY_PATH=/cis/lib:/usr/openwin/lib \
         gmake
   gmake check
   gmake install
   gmake clean
   ln -s /cis/share/gtk-doc /cis/share/doc/atk

Next, build a 64 bit version into /gnu. Insert /gnu/bin/sparcv9:/gnu/bin at the front of your PATH.

   CC='gcc -mcpu=ultrasparc -m64' CXX='g++ -mcpu=ultrasparc -m64' \
      F77='g77 -mcpu=ultrasparc -m64' \
      CFLAGS=-O CXXFLAGS=-O CPPFLAGS=-I/gnu/include \
      FFLAGS='-O -I/gnu/include' F77FLAGS='-O -I/gnu/include' \
      LD_RUN_PATH=/gnu/lib/sparcv9 \
      MAKE=gmake PERL=/cis/bin/perl \
         ./configure --prefix=/gnu --bindir=/gnu/bin/sparcv9 \
            --libdir=/gnu/lib/sparcv9 --sbindir=/gnu/sbin/sparcv9
   LD_RUN_PATH=/gnu/lib/sparcv9 gmake
   gmake check
   gmake install
   gmake clean

Finally, make a 32 bit build for /gnu. Remove /gnu/bin/sparcv9 from your PATH.

   CC='gcc -mcpu=ultrasparc' CXX='g++ -mcpu=ultrasparc' F77='g77 -mcpu=ultrasparc' \
      CFLAGS=-O CXXFLAGS=-O CPPFLAGS=-I/gnu/include \
      FFLAGS='-O -I/gnu/include' F77FLAGS='-O -I/gnu/include' \
      LD_RUN_PATH=/gnu/lib \
      MAKE=gmake PERL=/cis/bin/perl \
         ./configure --prefix=/gnu
   LD_RUN_PATH=/gnu/lib gmake
   gmake check
   gmake install
   gmake clean
   ln -s /gnu/share/gtk-doc /gnu/share/doc/atk
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r12 < r11 < r10 < r9 < r8 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback