Sunday, December 2, 2007

Installing parallel versions of GCC.

I needed a GCC.version 3.3 c/c++ compiler to build Mical so I googled and found the following guides on how to install parallel versions of GCC.:
I decided to build the compiler using a modified approach. First I downloaded gcc-3.3.6.tar.bz2. Extracted the source in ~/tmp and made a build directory. Then from the build directory configured with: ../gcc-3.3.6/configure --prefix=/opt/gcc/3.3.6 --enable-languages=c,c++. Did make; sudo make install | tee install.log.

Next to test it out I downloaded mical-0.1.0.tar.gz to ~/tmp. I extracted the files and then did export PATH=/opt/gcc/3.3.6/bin:$PATH; configure;make. I didn't do a make install. I'm not comfortable installing something that will need the parallel version of GCC in /local or /opt yet. But I did plink with the algorithm tests and they seemed to work correctly.

For some reason the PATH approach above didn't seem to stick so now I'm building mical by specifying the version of gcc/g++ to as a parameter to the configure script:
configure CC=/opt/gcc/3.3.6/bin/gcc CXX=/opt/gcc/3.3.6/bin/g++.

No comments: