This is a test version of Biostars. For the public version, visit https://www.biostars.org.
bwa 0.7.18 download to fix compile fail with GCC 10

Is there a download for this, I can not seem to find one? I am building a docker with bwa 0.7.17 and it is failing to compile multiple definition of `rle_auxtab", which I think has been addressed. Thank you :).

collect2: error: ld returned 1 exit status
make: *** [Makefile:30: bwa] Error 1
bwa

1 answer

[As of April 2024, there is now a more recent BWA release that includes the fix for this compilation failure. The rest of this answer was correct as of 2022, and unfortunately this month's 0.7.18 release included only one of the PRs mentioned.]

There is no such thing as BWA 0.7.18 — unless some distributor has taken it upon themselves to misleadingly produce such a thing in the absence of leadership from upstream bwa.

The most recent release of BWA is 0.7.17 from 2017. As you have seen, this no longer compiles with current compilers (for trivial reasons), so a working release is long overdue. Many people would like to see a new release to fix this and other minor issues fixed since 2017, but they would very much like to see pull requests #346, #348, and especially some version of #344 or similar applied first.

To work around this rle_auxtab multiple definition issue, you need to apply this one-word fix from two years ago. Alternatively, it may be easier to work around this without patching the source code by changing compiler options in your Dockerfile, via something like

make CC='gcc -fcommon'

Many people would like to see a new release to fix this and other minor issues fixed since 2017

is there any reason why there was no accepted PR since 2017 ?

My suspicion is that the author has simply moved on to other things (e.g. for alignment, his interest now lies in minimap2 etc), and he considers BWA essentially complete. A few minor PRs and changes have been committed to the master branch since 2017, but no larger ones, and no release has been made containing these changes.

Nonetheless BWA remains widely used. If the author does not feel a responsibility to keep BWA maintained and functional, I wish he would accept help from people such as myself who could help keep it ticking over :-)

Thank you all, that worked :).

Out of interest, which base image did you use to build upon?

Log in to answer this question.