Skip to main content Skip to navigation

Building Tophat and Cufflinks on Windows

The following describes the process that allowed me to build tophat and cufflinks on windows using cygwin64.

The tophat source should be downloaded from http://ccb.jhu.edu/software/tophat/index.shtml cufflinks source should be downloaded from http://cufflinks.cbcb.umd.edu/.

I suggest that both should be unpacked into C:\cygwin64\usr\local\src (adjust cywin install root as necessary)

The normal build process for each on cygwin, as with any platform is essentially

./configure
make
make install

If no builds have previously been done on cygwin then various additional cygwin pakages will need to be installed. There are additional changes and installs that may/will be required for tophat and cufflinks at each stage. I suggest that changes marked (*) are not done unless the error is seen as they may be fixed in new releases of cygwin or cufflinks

Running ./configure

This checks for the presence of various installed libraries. Potential/almost certain problems include:

  • (*) You may get a "error: cannot guess build type; you must specify one" error message. This is because the config.guess and config.sub files in the build-aux directory are very old and do not know about 64 bit Windows 7. These two files should be replaced by the most recent versions that can be found at:

http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD

  • It may find that the boost library is missing: Run the cygwin setup program and install libboost and libboost-devel
  • It will almost certainly find the bamtools library is missing. This is fixed not by downloading and installing bamtools as might be expected but by downloading and building samtools. The Makefile is already provided and the software can be built using make. I suggest this is also done in the C:\cygwin64\usr\local directory (I used samtools 0.1.19 from http://sourceforge.net/projects/samtools/files/samtools/0.1.19/, the latest version at the time). Once this is done:
    • Copy libbam.a to C:\cygwin64\usr\local\lib
    • Copy all of the header files into C:\cygwin64\usr\local\include\bam
    • Copy samtools.exe into C:\cygwin64\usr\local\bin

Building using make

Potential/almost certain problems include:

Tophat

  • (*) Fails to find aio.h. It only needs the declaration of a struct, so aio.h can be downloaded from http://code.metager.de/source/xref/gnu/glibc/rt/aio.h and put in C:\cygwin64\usr\local\include. The line containing '#include <bits/siginfo.h>' in aio.h should be changed to use <sys/signal.h> instead to make it compatible with cygwin, ie
//#include <bits/siginfo.h>
#include <sys/signal.h>

Also, the following three lines need to be added at about line 33 before __BEGIN_DECLS

#define __ssize_t ssize_t
#define __off64_t off_t
#define __restrict_arr __restrict
  • (*) There nay be compile problems involving seqan/string_external.h. This header is not needed for tophat, so seqan/file.h line 109 can be editted to remove the reference to this file as follows:
//#include <seqan/file/string_external.h>

Cufflinks

  • Fails to find <Eigen/Dense>: Install the Eigen library (http://eigen.tuxfamily.org/dox/GettingStarted.html ) As it says on the installer page, this is a header only library, and can be installed by copying the Eigen subdirectory to C:\cygwin64\usr\local\include
  • (*) Differential.cpp may fail to compile at line 272: Use the <double> rather than <long double> version of the lgamma function
lgamma_k = boost::math::lgamma<double>(gamma_k);
  • (*) Errors linking logl and sqrtl functions which are not defined in the cygwin gcc library: Add the following lines after the initial includes in src/common.h
#define logl(X) log(X)
#define sqrtl(X) sqrt(X)