smarco / gem3-mapper

GEM-Mapper v3
GNU General Public License v3.0
56 stars 17 forks source link

compile failure with gcc 10 #18

Closed heathsc closed 4 years ago

heathsc commented 4 years ago

A change in behaviour of how gcc handles multiple definitions of variables in different files between gcc9 and gcc10 gives a compile error for gem3-mapper.

Both sa_builder_sort_suffixes.c and sa_builder_store_suffices.c have definitions of global_sa_builder. Prior to gcc10 the compiler defaulted to silently merging such multiple definitions (-fcommon), but in gcc10 this has been changed (-fno_common), and the compiler emits an error.

This can be fixed by either adding -fcommon as a compiler flag or changing one of the definitions of global_sa_builder to extern.

smarco commented 4 years ago

Ok, fixed compatibility with gcc-10. Thanks for the report!!