Unfortunately, the GNU Compiler for Java (gcj) is only supported on PA-RISC platforms, so PA-RISC 2.0 HP-UX 11.11, 11.23 and 11.31 users are the only ones who can use the binary depot packages containing all three compilers (gcc, g++ and gcj). Itanium 2 HP-UX 11.23 and 11.31 users can use their platform's binary depot, but it only contains two compilers (gcc and g++).
Users of other HP-UX versions must build gcc, g++ and gcj (the latter is PA-RISC only remember) from the source code. The reason for this is that modified system includes are present in the binary packages that won't work with other OS releases. Note that, at this point in time, gcc, g++ and gcj on HP-UX 10.20, 11.00, 11.20 or 11.22 have not been built/tested by us and there may be include file incompatibilities that prevent such builds.
Important note: gcc/g++ are no longer our default compilers for building
From Monday 13th November 2006 onwards, we now use HP's optional ANSI C and C++ compilers ("cc" and "aCC") by default to build binary packages from the equivalent source code. Whilst source code packages from that date may build with gcc/g++, we cannot guarantee this and hence can't provide help support for such builds. Further information on our HP compilers' setup is available.
Note that we may occasionally use gcj - possibly in combination with gcc/g++ - to build a package (e.g. pdftk) because there is no equivalent HP compiler product that can generate object files from Java source code.
There are three packages that you must install as well in order to use the gcc binary depot ("run-time dependencies"):
- GNU gettext (a dependency of gcc)
- GNU libiconv (a dependency of gettext)
- zlib (a dependency of PA-RISC gcj)
This however is the bare minimum just to run the binaries - if you intend to build gcc, g++ and gcj from source code, you will also additionally need the following packages ("build-time dependencies"):
- GNU autoconf (for the autoheader command)
- GNU bison (a dependency of flex)
- db (a dependency of autoconf and perl)
- GNU flex (a dependency of gcc)
- GNU gawk (a dependency of autoconf)
- GNU gdbm (a dependency of perl)
- GNU m4 (a dependency of bison)
- GNU make (aka "gmake" - you cannot use HP"s make)
- perl (a dependency of autoconf)
- GNU sed (a dependency of tcltk)
- tcltk (for testing the db build)
- GNU termcap (a dependency of texinfo)
- GNU texinfo (for the makeinfo command)
- zip (PA-RISC build of gcj requires it)
If you are building from source, please read the HPUX.Install inside each .tar.gz package, because the instructions for building may not be normal for some packages. Please note that gcc 4.X and most of its dependencies require an ANSI C compiler to be used if they are built from source code (e.g. use a pre-built gcc binary depot release or HP's optional ANSI C compiler). Since gmake is used exclusively throughout our archive for building packages, you are strongly recommended to install gmake, even if you aren't intending to build gcc, g++ and gcj from source.
Finally, you'll need the gcc/g++/gcj package itself:
- GNU gcc 4.2.3 for 11.11 (PA-RISC 2.0), 11.23 (PA-RISC 2.0 or Itanium 2) or 11.31 (PA-RISC 2.0 or Itanium 2)
The GNU binutils 2.18 package (originally released in August 2007) is incorporated into the latest gcc package and is built automatically as part of the build of that package. Please note that both gcc and binutils are GPL 3 licensed.
Special libgcc dependency package
Because any software built with g++ or gcj will depend on the libstdc++ or libgcj shared libraries respectively, we have created a new libgcc package containing those two libraries. Hence, should you wish to install a binary depot package of g++-built or gcj-built software, simply ensure that libgcc is installed first (although if you already have the gcc binary depot installed, you don't need libgcc of course). Note that libgcc will be updated at the same time as the main gcc package and will, of course, have the same version as the gcc package.