Contents

Compiling Stampy v1.0.23 for use with cortex - error: unrecognized command line option ‘-Wl’

Contents

To assemble illumina sequence data I am currently trialling assembly with cortex. To be able to use their Perl script to automate the pipeline between reads in and variant calls requires vcftools and stampy to be installed, and you provide the installation paths as input to the script.

However when running make using the default downloaded stampy makefile I got the following error from g++ (v4.8.1):

g++ \`python2.7-config --ldflags\` -pthread -shared -Wl build/linux-x86\_64-2.7-ucs4/pyx/maptools.o build/linux-x86\_64-2.7-ucs4/c/map
utils.o build/linux-x86\_64-2.7-ucs4/c/alignutils.o build/linux-x86\_64-2.7-ucs4/readalign.o build/linux-x86\_64-2.7-ucs4/algebras.o build/linux-x86\_64-2.7-ucs4/frontend.o -o maptools.so
g++: error: unrecognized command line option ‘-Wl’

The solution was straightforward to find, as ever thanks to stackoverflow: http://stackoverflow.com/questions/21305309/g-doesnt-recognize-the-option-wl All you need to do is edit lines 44 and 46 in the makefile, replacing the space after -Wl with a comma:

 43 ifeq ($(platform),linux-x86\_64)
 44    g++ \`$(python)-config --ldflags\` -pthread -shared -Wl,$(objs) -o maptools.so
 45 else
 46    g++ \`$(python)-config --ldflags\` -pthread -dynamiclib -Wl,$(objs) -o maptools.so
 47 endif

As you can see from the surrounding if statement, this is only an issue on 64-bit linux platforms

I also tried compiling cortex with icc, but the compilation failed after a lot of errors. Rather than pursuing this further, I used gcc and only got warnings of unused variables in compilation