Dear, I have sequence reads in a fastq-files which I would like to align against a reference fasta file. For this, people suggested bwa (for example, in this biostar tutorial https://www.biostars.org/p/41951/). Therefore, I downloaded the tar of bwa from sourceforge.
However, when I run the make command I get the following error at the end:
In function 'bwt_cal_width'
bwtaln.c:63 undefined reference to 'bwt_2occ'
In function 'bwt_match_gap'
bwtgap.c:201: undefined reference to 'bwt_2occ4'
In function 'bsw2_connectivity':
bwtsw2_core.c:104: undefined reference to 'bwtl_2occ4'
In function 'bsw2_core'
bwtsw2_core.c:476: undefined reference to 'bwtl_2occ4'
bwtsw2_core.c:529: undefined reference to 'bwt_2occ4'
collect2: error: ld returned 1 exit status
Makefile:38: recipe for target 'bwa' failed
Scrolling to the warning messages above has multiple lines like this:
bwt_lite.h:20:18: warning: inline function 'bwtl_occ' declared but never defined inline uint32_t bwtl_occ(const bwtl_t *bwt, uint32_t k, uint8|_t c);
Thus, I browsed online for a solution of this error. I found one sentence in a 'Solutions to Barracuda problems':
BarraCUDA 0.7.107e make fails on Ubuntu 16.04.1 with gcc version 5.4.0. It appears the new version of the GCC compiler has a stricter definition of C++ and is rejecting source code which earlier versions of gcc compiled without problem.
So, perhaps similar is happening here. But I have no clue how to fix it. Is there a solution to it?
which version of bwa are you trying to compile ? show us some lines before 'In function 'bwt_cal_width' bwtaln.c:63 undefined reference to 'bwt_2occ''
What is the output of:
I can compile the current latest version of BWA 0.7.17with GCC 5.5.0 and 7.3.0. We need to know the compiler you are using, its version, and the BWA version you are trying to compile.
Have you tried installation using (bio)conda? That should make all your installation and dependency issues disappear.
Dear all, Thank you for your suggestions. Here are some answers with regards to your questions:
I tried to install bwa-0.5.9. The messeges after 'make' are the following:
And then the undefined-reference-errors start
The version of Gcc I'm using:
I did not try Bioconda yet. I will try it and keep you up to date if this prevents the errors.
bwa 0.5.9 is ~7 years old (!) , why would you try to compile an old version of this tool ?
Please use
ADD COMMENT
orADD REPLY
to answer to previous reactions, as such this thread remains logically structured and easy to follow. I have now moved your reaction but as you can see it's not optimal. Adding an answer should only be used for providing a solution to the question asked.