Compiling PHAST under OS X Yosemite or higher

The PHAST (stands for PHylogenetic Analysis with Space/Time models) package implements a number of methods related to comparative and evolutionary genomics. PHAST depends on the LAPACK library and, when compiled under OS X, uses its built-in version. However, the compilation of PHAST under OS X Yosemite or higher stops showing the following error:

fatal error: 'vecLib/clapack.h' file not found

The reason the compilation fails is that the vecLib framework that had been considered deprecated in earlier OS X versions was removed starting from OS X Yosemite. Instead of vecLib, one should use the Accelerate framework embedded in OS X. For that purpose, the files include/external_libs.h and src/make-include.mk should be modified in the following way.

-#include <vecLib/clapack.h>
+#include <Accelerate/Accelerate.h>
-LIBS = -lphast -framework vecLib -lc -lm
+LIBS = -lphast -framework Accelerate -lc -lm

Besides, the FSHIFT macro in the file src/util/clean_genes.c should be replaced with another one (e.g., FRAMESHIFT) because the Accelerate framework contains the macro of the same name but with different meaning.

The changes described above are included in my fork of the original PHAST repository on GitHub: https://github.com/gtamazian/phast.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s