Underworld
a long term geodynamics simulation platform
Libpng Download and Installation
What is libpng and do I need to install it?
libpng is used by gLucifer and is the default image output format.
- Linux and Unix - usually have libpng already installed.
- macs - while a libpng library exists on macs, it is not the development version so it doesn't have the headers that gLucifer needs to compile, which means that Mac users will need to download and install libpng from the source, either using Fink or manually (see below).
Downloading and Installing libpng using Fink (mac only)
Type the following (from any directory, assuming you have Fink in your path):
fink install libpng3 libpng3-shlibsThis will install in the /sw/ directory, hence there should not be any need to set up environment variables.
Downloading and Installing libpng using MacPorts (mac only)
Note: If you intend to use Macports packages to install the dependencies required by Underworld and gLucifer, we recommend you use Macports for all dependencies (except PETSc). This will avoid problems of confusion between Macports-installed and default system libraries suchas X11, which can cause run-time issues.
Type the following (from any directory, assuming you have MacPorts in your path):port install xorg-server port install xorg-libXmu port install libxml2 port install libpng
Downloading and Installing libpng Manually
These instructions apply to any Linux, Unix or Mac operating system.
1. The latest source archive for libpng can be downloaded from http://libpng.sourceforge.net/. Look for a file like libpng-1.2.24.tar.gz. 2. Once downloaded, unzip the file which will decompress the file into its own directory:tar zxvf libpng-1.2.24.tar.gzIf you require multiple users to have access to it, install it in a place like /usr/local, for which superuser or administrator access may be required. 3. Navigate into the libpng directory:
cd libpng-1.2.24/and then configure and install it into a suitable directory, for example:
./configure --prefix=/usr/localand then type (root or administrator access may be required; on macs type "sudo make install" in place of the "make install" step):
make make install
Setting up Environment Variables Manually
Add the following environment variable to your ~/.bashrc (if you are using bash) or ~/.tcshrc (if you are using tcsh), where /usr/local/ is the directory in which you installed libpng:
bash:
export PNG_DIR=/usr/local
tcsh:
setenv PNG_DIR /usr/local
-- Wendy Mason - 28 October 2010
-- Patrick Sunter - 21 October 2010
-- Wendy Sharples - 21 October 2010
-- Alan Lo - 05 Jan 2006