Sunday, March 1, 2009

Open64-4.2.1 Installation Guide on Ubuntu

As promised, the next GSoC post dedicated to Open64 is here. The latest version is 4.2.1 available in both precompiled binaries (tar.gz file and rpm) and the source. Installation is pretty much easy and straight-forward but because of compatibility problem of the open64 C++ compiler and the gcc-4.3 version, which comes as the default gcc in Intrepid Ibex, I faced a lot of problem while installation. It actually took me three days (which I am ashamed to admit) before a successful installation on my Ubuntu Intrepid Ibex running on I386 arch processor.
While installing I found quite a few installation guides, some dedicated specifically to Ubuntu installation but found none of them to be helpful enough. Also few of the files in the source file of the version were missing a few headers because of which it was giving errors while running . So I am posting here, a step-by-step guide on successful and hassle-free installation of Open64-4.2.1 on Intrepid Ibex systems.
  • Download the binary depending on the architecture of your own; I had downloaded the I386 arch binary. (Also do not download the src file which is buggy. However, if you are able to perform a successful installation using the src, please inform me too.)
  • Add the following lines to your ~/.bashrc file. Save and exit.
  • export TOOLROOT=~/compiler
    export PATH=$TOOLROOT/bin:$PATH

  • Now, source the updated bashrc file by the command.
  • source ~/.bashrc
  • Make a new directory compiler in the home directory.
  • mkdir ~/compiler
  • As the gcc-version pre installed in Intrepid is version 4.3 and Open64-4.2.1 has compatibility issues with it, we need to uninstall gcc-4.3 and install gcc-4.1. The easiest way is using Synaptic Packet Manager (System>Administration>Synaptic Packet Manager, of the desktop panel).

  • In the same manner, mark gcc-4.1 for installation, in the Synaptic and Click on Apply. The changes will take place.
  • Similarly, follow the above process to remove g++-4.3 and install g++-4.1
  • Now in order to make the commands and work, we need to link them to the 4.1 version compilers.
  • sudo ln -s gcc-4.1 gcc
    sudo ln -s g++-4.1 g++

  • Now extract the binary using the tar xjvf name-of-the-tar-file.tar.bz2 command. to the extracted directory and run ./
  • Now opencc (C compiler), openCC (C++ compiler) and openf90 (Fortran compiler) are installed and can be used.
  • Optionally, gcc-4.3 and g++-4.3 can be installed again. The compilers will work regardless :D
The above mentioned steps perfectly installed Open64 compilers on my system. So if anyone faces a problem while installation or any error, feel free to discuss on the mailing-list or join us at #open64 at

Hopefully, a Fedora installation guide will come up very soon by l0nwlf. Will be back with more developments on both the projects when any significant progress will be made.
So, Happy GSoC-ing to all potential applicants. Indeed, life is good!


Anonymous said...

Thankyou for your post. I was looking for something along these lines.

Any ideas on when the build will support GXX4.3 natively?

kr0y said...

After talking to the Open64 developers, I got the info that the new gcc4.3 version compatible build will be ready in approx. 3 months and they are working on it currently :)