Linux: Error in make bwa
0
1
Entering edit mode
5.8 years ago
t.kranenburg ▴ 40

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?

alignment error bwa linux • 3.3k views
ADD COMMENT
0
Entering edit mode

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''

ADD REPLY
0
Entering edit mode

What is the output of:

gcc -v

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.

ADD REPLY
0
Entering edit mode

Have you tried installation using (bio)conda? That should make all your installation and dependency issues disappear.

ADD REPLY
0
Entering edit mode

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:

make[1]: Entering directory '/home'
make[1]: Nothing to be done for 'lib'
make[1]: Leaving direcotory '/home'
make[1]: Entering directory 'home/bwa-0.5.9.
gcc -c -g -Wall -02 -DHAVE_PTHREAD utils.c -o utils.o
gcc -c -g -Wall -02 -DHAVE_PTHREAD bwt.c -o bwt.o

And then the undefined-reference-errors start

The version of Gcc I'm using:

gcc -v
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10)

I did not try Bioconda yet. I will try it and keep you up to date if this prevents the errors.

ADD REPLY
2
Entering edit mode

I tried to install bwa-0.5.9.

bwa 0.5.9 is ~7 years old (!) , why would you try to compile an old version of this tool ?

ADD REPLY
0
Entering edit mode

Please use ADD COMMENT or ADD 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.

ADD REPLY

Login before adding your answer.

Traffic: 2179 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6