Xavier Fernández-i-Marín wrote to ask me about compiling JAGS with the EKOPath 4 compiler from PathScale (a.k.a path64) which has recently become open source. Pathscale has a reputation for producing very high performance compilers, so I wanted to see how it would work with JAGS.
Building the path64 compiler on Fedora 14 Linux was not easy, but I managed to collect enough hints from the BSD forums and the github site for the path64 compiler. I am putting my instructions here in case anyone else wants to try building the path64 compiler on Fedora.
- The path64 compiler is 64-bit only. There is a hint is in the name, but if you try to compile it on 32-bit Linux you currently get a segmentation fault, not an informative error message
- Use version 4.0.1 of the path64 compiler. This is the last stable version, which can be obtained as follows
- You need to compile path64 with gcc 4.2.4. Later versions will not work as gcc complains about vector type mismatches. I installed gcc 4.2.4 by hand with the following configure options
git clone https://github.com/path64/compiler.git
git checkout 4.0.10
./configure --prefix=/opt/gcc-4.2.4 --enable-languages=c,c++,fortran
Having done this, the incantation required to configure the path64 compiler is
cmake -DCMAKE_BUILD_TYPE=Debug \
This is followed by the usual “make” and “make install” steps. The build process is long but it prints the percent progress as it goes, which is nice. Parallel make with two processes (i.e. “make -j2”) allowed a faster compile but highly parallel make (-j4) tended to fail.
After this, you can use the installed path64 compiler to build a “release” version. The configuration is the same but with the flag
To use the path64 compiler, you need to add both
/opt/gcc-4.2.4/bin to the path. The latter ensures that you are using the right preprocessor for the version of the standard C++ library that comes with gcc 4.2.4. If you don’t do this, then the compiler will use the headers for the 4.5.1 version of the C++ library that comes with with Fedora 14, but these are incompatible.