[Debian-med-packaging] Bug#983930: kmc: ftbfs with -march=x86-64-v2

Matthias Klose doko at debian.org
Wed Mar 3 15:13:08 GMT 2021


Package: src:kmc
Version: 3.1.1+dfsg-3
Severity: minor
User: debian-gcc at lists.debian.org
Usertags: ftbfs-x86-64-v2

Starting with LLVM 12 and GCC 11 (and backported to gcc-10 for Debian), 
GCC introduces optimizations for new micro-architecture levels from
the x86-64 psABI.  Filing these bug reports for packages building with
the current level (x86-64), but not with x86-64-v2.

To reproduce these issues, append -march=x86-64-v2 to the compiler
flags (CFLAGS, CXXFLAGS, ...).  You also need hardware supporting these.
The easiest way is to call the dynamic linker in glibc 2.33 like
  /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 --help
Otherwise look at the flags in /proc/cpuinfo and compare these with
those from table 3.1 in the System V Application Binary Interface doc:
https://gitlab.com/x86-psABIs/x86-64-ABI/-/wikis/x86-64-psABI

Please don't upload a package setting these flags by default.  The
x86-64 baseline is still unchanged.

The full build log can be found at:
http://people.debian.org/~doko/logs/20210228/filtered/gcc10-v2/kmc_3.1.1+dfsg-3_unstable_gcc10-v2.log
The last lines of the build log are at the end of this report.

[...]
kmc_tools/check_kmer.h:131:9: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  131 |    fread(&prefix_array, sizeof(uint32), 1, prefix_file);
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmc_tools/check_kmer.h:136:9: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  136 |    fread(&lower, sizeof(uint64), 1, prefix_file);
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmc_tools/check_kmer.h:137:9: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  137 |    fread(&upper, sizeof(uint64), 1, prefix_file);
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmc_tools/check_kmer.h: In lambda function:
kmc_tools/check_kmer.h:53:9: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   53 |    fread(tmp, 1, record_size, file);
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
kmc_tools/check_kmer.h: In member function ‘void CKmerCheck<SIZE>::get_lower_upper(uint64, CKmer<SIZE>&, uint64&, uint64&) [with unsigned int SIZE = 1]’:
kmc_tools/check_kmer.h:97:9: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   97 |    fread(&lower, sizeof(uint64), 1, prefix_file);
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmc_tools/check_kmer.h:101:10: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  101 |     fread(&upper, sizeof(uint64), 1, prefix_file);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmc_tools/check_kmer.h:131:9: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  131 |    fread(&prefix_array, sizeof(uint32), 1, prefix_file);
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmc_tools/check_kmer.h:136:9: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  136 |    fread(&lower, sizeof(uint64), 1, prefix_file);
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmc_tools/check_kmer.h:137:9: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  137 |    fread(&upper, sizeof(uint64), 1, prefix_file);
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kmc_tools/check_kmer.h: In lambda function:
kmc_tools/check_kmer.h:53:9: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   53 |    fread(tmp, 1, record_size, file);
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
g++ -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3 -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3 -Wall -O3 -c kmc_tools/tokenizer.cpp -o kmc_tools/tokenizer.o
g++ -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3 -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3 -Wall -O3 -c kmc_tools/fastq_filter.cpp -o kmc_tools/fastq_filter.o
g++ -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3 -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3 -Wall -O3 -c kmc_tools/fastq_reader.cpp -o kmc_tools/fastq_reader.o
g++ -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3 -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3 -Wall -O3 -c kmc_tools/fastq_writer.cpp -o kmc_tools/fastq_writer.o
g++ -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3 -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3 -Wall -O3 -c kmc_tools/percent_progress.cpp -o kmc_tools/percent_progress.o
ar rcs libkmc.a kmc_api/mmer.o kmc_api/kmc_file.o kmc_api/kmer_api.o
ranlib libkmc.a
mkdir -p bin
g++ -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3 -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3 -Wall -O3 -o bin/kmc_dump kmc_dump/nc_utils.o kmc_dump/kmc_dump.o kmc_api/mmer.o kmc_api/kmc_file.o kmc_api/kmer_api.o -Wl,-z,relro -Wl,-z,now -lm -O3 -lpthread -std=c++11 -lz -lbz2
mkdir -p bin
g++ -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3 -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3 -Wall -O3 -o bin/kmc_tools kmc_tools/kmc_header.o kmc_tools/kmc_tools.o kmc_tools/nc_utils.o kmc_tools/parameters_parser.o kmc_tools/parser.o kmc_tools/tokenizer.o kmc_tools/fastq_filter.o kmc_tools/fastq_reader.o kmc_tools/fastq_writer.o kmc_tools/percent_progress.o kmc_api/mmer.o kmc_api/kmc_file.o kmc_api/kmer_api.o -Wl,-z,relro -Wl,-z,now -lm -O3 -lpthread -std=c++14 -lz -lbz2
mkdir -p bin
g++ -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3 -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3 -Wall -O3 -o bin/kmc kmer_counter/kmer_counter.o kmer_counter/mmer.o kmer_counter/mem_disk_file.o kmer_counter/rev_byte.o kmer_counter/bkb_writer.o kmer_counter/cpu_info.o kmer_counter/bkb_reader.o kmer_counter/fastq_reader.o kmer_counter/timer.o kmer_counter/develop.o kmer_counter/kb_completer.o kmer_counter/kb_storer.o kmer_counter/kmer.o kmer_counter/splitter.o kmer_counter/kb_collector.o kmer_counter/raduls_sse2.o kmer_counter/raduls_sse41.o kmer_counter/raduls_avx2.o kmer_counter/raduls_avx.o -Wl,-z,relro -Wl,-z,now -lm -O3 -lpthread -std=c++11 -lz -lbz2
/usr/bin/ld: kmer_counter/kmer_counter.o: in function `CKMC<1u>::Process()':
./kmer_counter/kmc.h:1132: undefined reference to `void RadulsSort::RadixSortMSD_SSE2<CKmer<1u> >(CKmer<1u>*, CKmer<1u>*, unsigned long long, unsigned int, unsigned int, CMemoryPool*)'
/usr/bin/ld: kmer_counter/kmer_counter.o: in function `std::_Function_base::_Base_manager<void (*)(CKmer<8u>*, CKmer<8u>*, unsigned long long, unsigned int, unsigned int, CMemoryPool*)>::_M_init_functor(std::_Any_data&, void (*&&)(CKmer<8u>*, CKmer<8u>*, unsigned long long, unsigned int, unsigned int, CMemoryPool*), std::integral_constant<bool, true>)':
/usr/include/c++/10/bits/std_function.h:233: undefined reference to `void RadulsSort::RadixSortMSD_SSE2<CKmer<8u> >(CKmer<8u>*, CKmer<8u>*, unsigned long long, unsigned int, unsigned int, CMemoryPool*)'
/usr/bin/ld: kmer_counter/kmer_counter.o: in function `CKMC<7u>::Process()':
./kmer_counter/kmc.h:1132: undefined reference to `void RadulsSort::RadixSortMSD_SSE2<CKmer<7u> >(CKmer<7u>*, CKmer<7u>*, unsigned long long, unsigned int, unsigned int, CMemoryPool*)'
/usr/bin/ld: kmer_counter/kmer_counter.o: in function `CKMC<6u>::Process()':
./kmer_counter/kmc.h:1132: undefined reference to `void RadulsSort::RadixSortMSD_SSE2<CKmer<6u> >(CKmer<6u>*, CKmer<6u>*, unsigned long long, unsigned int, unsigned int, CMemoryPool*)'
/usr/bin/ld: kmer_counter/kmer_counter.o: in function `std::_Function_base::_Base_manager<void (*)(CKmer<5u>*, CKmer<5u>*, unsigned long long, unsigned int, unsigned int, CMemoryPool*)>::_M_init_functor(std::_Any_data&, void (*&&)(CKmer<5u>*, CKmer<5u>*, unsigned long long, unsigned int, unsigned int, CMemoryPool*), std::integral_constant<bool, true>)':
/usr/include/c++/10/bits/std_function.h:233: undefined reference to `void RadulsSort::RadixSortMSD_SSE2<CKmer<5u> >(CKmer<5u>*, CKmer<5u>*, unsigned long long, unsigned int, unsigned int, CMemoryPool*)'
/usr/bin/ld: kmer_counter/kmer_counter.o: in function `CKMC<4u>::Process()':
./kmer_counter/kmc.h:1132: undefined reference to `void RadulsSort::RadixSortMSD_SSE2<CKmer<4u> >(CKmer<4u>*, CKmer<4u>*, unsigned long long, unsigned int, unsigned int, CMemoryPool*)'
/usr/bin/ld: kmer_counter/kmer_counter.o: in function `std::_Function_base::_Base_manager<void (*)(CKmer<3u>*, CKmer<3u>*, unsigned long long, unsigned int, unsigned int, CMemoryPool*)>::_M_init_functor(std::_Any_data&, void (*&&)(CKmer<3u>*, CKmer<3u>*, unsigned long long, unsigned int, unsigned int, CMemoryPool*), std::integral_constant<bool, true>)':
/usr/include/c++/10/bits/std_function.h:233: undefined reference to `void RadulsSort::RadixSortMSD_SSE2<CKmer<3u> >(CKmer<3u>*, CKmer<3u>*, unsigned long long, unsigned int, unsigned int, CMemoryPool*)'
/usr/bin/ld: kmer_counter/kmer_counter.o: in function `CKMC<2u>::Process()':
./kmer_counter/kmc.h:1132: undefined reference to `void RadulsSort::RadixSortMSD_SSE2<CKmer<2u> >(CKmer<2u>*, CKmer<2u>*, unsigned long long, unsigned int, unsigned int, CMemoryPool*)'
collect2: error: ld returned 1 exit status
make[2]: *** [makefile:90: kmc] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: error: make -j4 "INSTALL=install --strip-program=true" SIMD=1 returned exit code 2
make[1]: *** [debian/rules:21: override_dh_auto_build] Error 25
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:17: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2



More information about the Debian-med-packaging mailing list