Building Open64 on Ubuntu 12.04

Open64 is an interesting compiler.  Originally based on the old MIPSPro compiler by Silicon Graphics (RIP), it currently uses a GCC C/C++ frontend and runtime, a Cray Fortran 77/95 front-end and runtime, with its own custom optimizers and backends.  It saw heavy development in the early days of Intel’s Itanium processor, but it hasn’t seen as many updates recently.  It’s still a good reference compiler (especially on IA64 and MIPS) and is the only open source Fortran 95 implementation outside of GCC.

PathScale’s commercial EKOPath compiler suite has similar roots (SGI’s MIPSPro) but is not based on Open64 (thanks to C. Bergstrom at Pathscale for this correction), and version 4 is now open source as well.

The build process for Open64 is rather straightforward.

  1. There are a few basic dependencies that need to be installed first.

    $ sudo apt-get install gawk flex bison gfortran-multilib

  2. Get the Open64 source code next. The latest code is in a subversion repository.

    $ svn checkout https://svn.open64.net/svnroot/open64/trunk open64-trunk

  3. Configure and build Open64. Note that even on 64-bit systems, the compiler will be built as a 32-bit binary by default. To work around that, you need to specify –build=x86_64-unknown-linux-gnu to the configure script.

    If you are using the sources from 5.0 release tarball, make sure to edit open64-5.0/osprey/ipa/local/Makefile.gbase and remove the last line (it has the CG:all_sched=0 option on it).

    $ mkdir build-open64
    $ cd build-open64
    $ ../open64-trunk/configure –prefix=/usr/local/open64-trunk
    $ make -j4
    $ sudo make install

  4. Make Open64 (opencc/openCC) easily accessible. Unfortunately, you can’t use symlinks in /usr/local/bin to make opencc (or openCC) easy to call directly – it won’t be able to find the install tree correctly. I use a shell alias for that purpose.

    $ alias opencc-trunk=”/usr/local/open64-trunk/bin/opencc”
    $ alias openCC-trunk=”/usr/local/open64-trunk/bin/openCC”

Comments are closed.