bwa
bwa copied to clipboard
BWA compile fail with GCC 10
GCC 10 defaults to -fno-common which is causing this issue.
ld.gold: error: ./libbwa.a(rope.o): multiple definition of 'rle_auxtab' ld.gold: ./libbwa.a(bwtindex.o): previous definition here ld.gold: error: ./libbwa.a(rle.o): multiple definition of 'rle_auxtab' ld.gold: ./libbwa.a(bwtindex.o): previous definition here
I see that the issue is fixed in branch master, but the only tagged release is 0.7.17 which has the missing extern for rle_auxtab. I only build from tagged releases, could you create 0.7.18 ?
To promote reproducible science, could you please use git tags. Creating a tag also creates a release for your project. We require tagged releases when building scientific software. Pulling from the master is not reproducible. thanks
@lh3 Can you please tag a new release? I'm also hitting this in bioconda, since clang 11 uses -fno-common
by default. I fully expect that I can work around this by passing -fcommon
, but it'd be nice to have that fixed in an official release that I can distribute to everyone.
I package BWA for openSUSE Linux and I patch it like:
--- Makefile.orig 2021-05-18 11:19:23.819963543 +0200
+++ Makefile 2021-05-18 11:19:45.080303226 +0200
@@ -1,6 +1,6 @@
CC= gcc
#CC= clang --analyze
-CFLAGS= -g -Wall -Wno-unused-function -O2
+CFLAGS= -g -Wall -Wno-unused-function -O2 -fcommon
WRAP_MALLOC=-DUSE_MALLOC_WRAPPERS
AR= ar
DFLAGS= -DHAVE_PTHREAD $(WRAP_MALLOC)
BWA in openSUSE scientific repository contains also another patch to fix compilation with GCC 10 and 11:
Description: Fix package to build with GCC-10 from Debian
Author: Nilesh Patra <[email protected]>
Last-Update: Sat, 18 Apr 2020 20:19:30 +0530
--- a/rle.h
+++ b/rle.h
@@ -30,7 +30,7 @@
*** 43+3 codec ***
******************/
-const uint8_t rle_auxtab[8];
+extern const uint8_t rle_auxtab[8];
#define RLE_MIN_SPACE 18
#define rle_nptr(block) ((uint16_t*)(block))
With one or the other the compilation (and packaging) works well, but, of course, upstream fix would be better. :-)
I see that the issue is fixed in branch master, but the only tagged release is 0.7.17 which has the missing extern for rle_auxtab. I only build from tagged releases, could you create 0.7.18 ?
To promote reproducible science, could you please use git tags. Creating a tag also creates a release for your project. We require tagged releases when building scientific software. Pulling from the master is not reproducible. thanks
Where did you download the new 0.7.18? Thank you.
Can we please have a new 0.7.18 release?
It's not only a useful solution for bwa package. Actually I solved another similar problems caused by higher version of GCC like svaba and delly package. thx alot.