back to index

AIX: libmpdec/libmpdec++ install instructions

Package information

Troubleshooting

If your final application exhibits sporadic issues, please refer to the list of general AIX issues. These issues can affect any application and are not specific to libmpdec or libmpdec++.

Common instructions

All instructions assume the following working directory:


# AIX tar is not posix compliant:
gtar xvzf mpdecimal-4.0.0.tar.gz
cd mpdecimal-4.0.0

# If you switch to a different build type, clean the directory:
gmake distclean

# After building the library, test the build. The more thorough tests
# download the IBM tests (text files):
gmake check

# If there is no network conection, skip the IBM tests:
gmake check_local

32-bit directory structure:


# Combined static and shared libraries: /opt/freeware/lib/libmpdec.a
# Import file for the shared library:   /opt/freeware/lib/libmpdec.imp
# 32-bit libmpdec header:               /opt/freeware/include/mpdecimal.h
# Multilib libmpdec++ header:           /opt/freeware/include/decimal.hh

64-bit directory structure:


# Combined static and shared libraries: /opt/freeware/lib64/libmpdec.a
# Import file for the shared library:   /opt/freeware/lib64/libmpdec.imp
# 64-bit libmpdec header:               /opt/freeware/include/mpdecimal.h
# Multilib libmpdec++ header:           /opt/freeware/include/decimal.hh

Multilib directory structure:


# 32-bit: Combined static and shared libraries: /opt/freeware/lib/libmpdec.a
# 32-bit: Import file for the shared library:   /opt/freeware/lib/libmpdec.imp
# 64-bit: Combined static and shared libraries: /opt/freeware/lib64/libmpdec.a
# 64-bit: Import file for the shared library:   /opt/freeware/lib64/libmpdec.imp
# Multilib libmpdec header:                     /opt/freeware/include/mpdecimal.h
# Multilib libmpdec++ header:                   /opt/freeware/include/decimal.hh

Naturally one can use other directory structures by using --prefix, --libdir, --includedir or similar configure options.

gcc

The instructions install libmpdec and libmpdec++. If g++ is not present on the system, add --disable-cxx to the configure options. Use one of the following ABI choices:

32-bit only


./configure CC=gcc CXX=g++ --prefix=/opt/freeware
gmake
gmake install

64-bit only


./configure CC=gcc CXX=g++ MACHINE=uint128 --prefix=/opt/freeware --libdir=/opt/freeware/lib64
gmake
gmake install

Multilib


./configure CC=gcc CXX=g++ MACHINE=universal --prefix=/opt/freeware
gmake
gmake install

gmake distclean

./configure CC=gcc CXX=g++ CFLAGS=-maix64 LDFLAGS=-maix64 CXXFLAGS=-maix64 LDXXFLAGS=-maix64 AR="ar -X64" MACHINE=universal --prefix=/opt/freeware --libdir=/opt/freeware/lib64
gmake
gmake install

xlc

xlC cannot handle some C++11 features, so libmpdec++ cannot be built. Use one of the following ABI choices:

32-bit only


./configure CC=xlc_r --prefix=/opt/freeware --disable-cxx
gmake
gmake install

64-bit only


./configure CC=xlc_r MACHINE=ansi64 --prefix=/opt/freeware --libdir=/opt/freeware/lib64 --disable-cxx
gmake
gmake install

Multilib


./configure CC=xlc_r MACHINE=universal --prefix=/opt/freeware --disable-cxx
gmake
gmake install

gmake distclean

./configure CC=xlc_r CFLAGS=-q64 LDFLAGS=-q64 CXXFLAGS=-q64 LDXXFLAGS=-q64 AR="ar -X64" MACHINE=universal --prefix=/opt/freeware --libdir=/opt/freeware/lib64 --disable-cxx
gmake
gmake install

Contact:

Stefan Krah <website @ bytereef.org>