r9 - 13 Apr 2005 - 14:59:22 - BobKrzaczekYou are here: TWiki >  Help Web  >  AdminStuff > SoftwareInstalls > BuildingFromScratch > BuildingGlib
Tags:
create new tag
, view all tags
  • Version: 2.4.8
  • Summary: Core library for GTK and Gnome.

Prerequisites

Notes

There are two versions of glib that correspond to versions of GTK; one that corresponds to GTK 1.2, and another that corresponds to GTK 2.0. Don't fall into the version 1.3 trap; those were development-only versions that were prereleases for the version 2. We build both the version 1 and version 2 releases of glib, 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 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 glib-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 glib-1.2.10
   cd glib-1.2.10
   gzip -dc ../glib-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.
   mkdir obj-sol-cis64
   cd obj-sol-cis64
   MAKE=gmake \
   CC='cc -xtarget=ultra -xarch=v9a' CXX='CC -xtarget=ultra -xarch=v9a' \
   CFLAGS=-O CXXFLAGS=-O \
      ../glib-1.2.10/configure --prefix=/cis \
         --bindir=/cis/bin/sparcv9 --libdir=/cis/lib/sparcv9

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.
   mkdir obj-sol-cis
   cd obj-sol-cis
   MAKE=gmake \
   CC='cc -xtarget=ultra -xarch=v8plusa' CXX='CC -xtarget=ultra -xarch=v8plusa' \
   CFLAGS=-O CXXFLAGS=-O \
      ../glib-1.2.10/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 /cis.
   mkdir obj-sol-gnu64
   cd obj-sol-gnu64
   CC='gcc -mcpu=ultrasparc -m64' CXX='g++ -mcpu=ultrasparc -m64' \
   CFLAGS=-O CXXFLAGS=-O \
      ../glib-1.2.10/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 /cis.
   mkdir obj-sol-gnu
   cd obj-sol-gnu
   CC='gcc -mcpu=ultrasparc' CXX='g++ -mcpu=ultrasparc' \
   CFLAGS=-O CXXFLAGS=-O \
      ../glib-1.2.10/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.4.8

Obtain and Unpack

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

Solaris Packages

For Solaris, glib is built using the native iconv tools. Use pkginfo to ensure that the following packages are available on your Solaris systems.

  • SUNWuiu8
  • SUNWciu8
  • SUNWhiu8
  • SUNWjiu8
  • SUNWkiu8

You might use a command like the following. Ensure the 64 bit variants of those packages are installed. Typically, they are named with an extra x suffix to the package name (e.g. SUNWuiu8x).

   pkginfo |grep 'SUNW[a-z]*u8'

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 PERL=/cis/bin/perl \
   CC='cc -xtarget=ultra -xarch=v8plusa' CFLAGS=-O \
   CXX='CC -xtarget=ultra -xarch=v8plusa' CXXFLAGS=-O \
   F77='f77 -xtarget=ultra -xarch=v8plusa' F77FLAGS=-O \
   ../configure --prefix=/cis
LD_RUN_PATH=/cis/lib gmake

Skip down to the Test And Install section.

Solaris Forte 64 Bit Build

This should be 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:/cis/bin/sparcv9:/cis/bin:/cis/sbin=

Create a new build directory, and configure for an installation under /cis.

mkdir obj-sol-cis64
cd obj-sol-cis64
LD_RUN_PATH=/cis/lib/sparcv9 PERL=/cis/bin/perl \
   CC='cc -xtarget=ultra -xarch=v9a' CFLAGS=-O \
   CXX='CC -xtarget=ultra -xarch=v9a' CXXFLAGS=-O \
   F77='f77 -xtarget=ultra -xarch=v9a' F77FLAGS=-O \
   ../configure --prefix=/cis \
      --bindir=/cis/bin/sparcv9 --libdir=/cis/lib/sparcv9
gmake

Skip down to the Test And Install section.

Test and Install

Test your new build. If you get any errors other than the ones below, you'll have to ensure that they won't cause existing applications to fail (remember, you're installing shared libraries, and thus affecting other applications automatically).

  • You might get one error involving strtod.
  • If you get an error during io-channel testing, be sure it it only involves failed conversions because certain language kits aren't installed.
   gmake check

If tests pass in a way that you trust, install the build.

   sudo gmake install

Fix some documentation links while you're at it. Glib puts itself into a GTK hierarchy, so just symlink it over.

   ln -s /cis/share/gtk-doc /cis/share/doc/gtk

Edit the following files; ensure that a proper Perl interpreter is named to run the scripts. Unless you have a reason otherwise, set it to /cis/bin/perl. Leave the -w option present.

  • /cis/bin/glib-mkenums
  • /cis/bin/sparcv9/glib-mkenums
  • /gnu/bin/glib-mkenums
  • /gnu/bin/sparcv9/glib-mkenums

Version 2.2.3

Obtain and Unpack

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

Solaris Packages

For Solaris, glib is built using the native iconv tools. Use pkginfo to ensure that the following packages are available on your Solaris systems.

  • SUNWuiu8
  • SUNWciu8
  • SUNWhiu8
  • SUNWjiu8
  • SUNWkiu8

You might use a command like the following. Ensure the 64 bit variants of those packages are installed. Typically, they are named with an extra x suffix to the package name (e.g. SUNWuiu8x).

   pkginfo |grep 'SUNW[a-z]*u8'

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 ahead of /cis/bin in your PATH.
   mkdir obj-sol-cis64
   cd obj-sol-cis64
   LD_RUN_PATH=/cis/lib/sparcv9 PERL=/cis/bin/perl \
      CC='cc -xtarget=ultra -xarch=v9a' CFLAGS=-O \
      CXX='CC -xtarget=ultra -xarch=v9a' CXXFLAGS=-O \
      F77='f77 -xtarget=ultra -xarch=v9a' F77FLAGS=-O \
      ../glib-2.2.3/configure --prefix=/cis \
         --bindir=/cis/bin/sparcv9 --libdir=/cis/lib/sparcv9

Skip down to the Test And Install section.

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 PERL=/cis/bin/perl \
      CC='cc -xtarget=ultra' CFLAGS=-O \
      CXX='CC -xtarget=ultra' CXXFLAGS=-O \
      F77='f77 -xtarget=ultra' F77FLAGS=-O \
      ../glib-2.2.3/configure --prefix=/cis

Skip down to the Test And Install section.

Solaris Gnu 64 Bit Build

Ensure that gcc and friends are in your path. Create a new build directory, and configure for an installation under /gnu. Ensure that /gnu/bin/sparcv9 is ahead of /gnu/bin in your PATH.
   mkdir obj-sol-gnu64
   cd obj-sol-gnu64
   LD_RUN_PATH=/gnu/lib/sparcv9 PERL=/cis/bin/perl \
      CC='gcc -mcpu=ultrasparc -m64' CFLAGS=-O \
      CXX='g++ -mcpu=ultrasparc -m64' CXXFLAGS=-O \
      F77='g77 -mcpu=ultrasparc -m64' F77FLAGS=-O \
      ../glib-2.2.3/configure --prefix=/gnu \
         --bindir=/gnu/bin/sparcv9 --libdir=/gnu/lib/sparcv9

Skip down to the Test And Install section.

Solaris Gnu 32 Bit Build

Ensure that gcc and friends are in your path. 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
   LD_RUN_PATH=/gnu/lib PERL=/cis/bin/perl \
      CC='gcc -mcpu=ultrasparc' CFLAGS=-O \
      CXX='g++ -mcpu=ultrasparc' CXXFLAGS=-O \
      F77='g77 -mcpu=ultrasparc' F77FLAGS=-O \
      ../glib-2.2.3/configure --prefix=/gnu

Skip down to the Test And Install section.

Test and Install

Test your new build. If you get any errors other than the ones below, you'll have to ensure that they won't cause existing applications to fail (remember, you're installing shared libraries, and thus affecting other applications automatically).

  • You might get one error involving strtod.
  • If you get an error during io-channel testing, be sure it it only involves failed conversions because certain language kits aren't installed.
   gmake check

If tests pass in a way that you trust, install the build.

   sudo gmake install

Fix some documentation links while you're at it. Glib puts itself into a GTK hierarchy, so just symlink it over.

   ln -s /cis/share/gtk-doc /cis/share/doc/gtk

Edit the following files; ensure that a proper Perl interpreter is named to run the scripts. Unless you have a reason otherwise, set it to /cis/bin/perl. Leave the -w option present.

  • /cis/bin/glib-mkenums
  • /cis/bin/sparcv9/glib-mkenums
  • /gnu/bin/glib-mkenums
  • /gnu/bin/sparcv9/glib-mkenums
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r9 < r8 < r7 < r6 < r5 | 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