linbox-team / linbox

LinBox - C++ library for exact, high-performance linear algebra
https://linbox-team.github.io/linbox
GNU Lesser General Public License v2.1
81 stars 28 forks source link

Error compiling test-qlup in i686 #273

Closed tornaria closed 2 years ago

tornaria commented 3 years ago

With linbox-1.6.3 release on void-linux 32 bit and

$ gcc --version
gcc (GCC) 10.2.1 20201203

There's the following error compiling test-qlup. All other 27 tests compile and pass.

All tests pass with void-linux 64 bit, both using glibc and using musl (same gcc, same libstdc++, afaict).

$ make test-qlup
g++ -DHAVE_CONFIG_H -I. -I..  -DLinBoxTestOnly -O2 -Wall -g -DNDEBUG -U_LB_DEBUG -g -DNDEBUG -U_LB_DEBUG -I.. -fabi-version=6 -mfpmath=sse -fabi-version=6        -fstack-clash-protection -D_FORTIFY_SOURCE=2 -mtune=i686 -O2 -pipe     -msse -msse2 -MT test-qlup.o -MD -MP -MF .deps/test-qlup.Tpo -c -o test-qlup.o test-qlup.C
In file included from ../linbox/algorithms/gauss-gf2.h:244,
                 from test-qlup.C:44:
../linbox/algorithms/gauss/gauss-solve-gf2.inl: In instantiation of 'Vector1& LinBox::GaussDomain<LinBox::GF2>::solveInPlace(Vector1&, SparseSeqMatrix&, const Vector2&) const [with SparseSeqMatrix = LinBox::ZeroOne<LinBox::GF2>; Vector1 = LinBox::BitVector; Vector2 = LinBox::BitVector]':
test-qlup.C:204:18:   required from 'bool testQLUPsolve(const Field&, size_t, unsigned int, int, double) [with Field = LinBox::GF2; Blackbox = LinBox::ZeroOne<LinBox::GF2>; RandStream = LinBox::RandomSparseStreamGF2<LinBox::LightContainer<unsigned int> >; size_t = unsigned int]'
test-qlup.C:416:86:   required from here
../linbox/algorithms/gauss/gauss-solve-gf2.inl:75:52: error: ambiguous overload for 'operator+' (operand types are 'LinBox::BitVector::iterator' and 'std::ptrdiff_t' {aka 'int'})
   75 |         for(typename Vector1::iterator it=w.begin()+(ptrdiff_t)Rank;it!=w.end();++it)
      |                                           ~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from ../linbox/vector/bit-vector.h:191,
                 from ../linbox/field/gf2.h:39,
                 from ../linbox/vector/vector-domain-gf2.h:59,
                 from ../linbox/vector/vector-domain.h:1336,
                 from ../linbox/matrix/matrix-domain.h:35,
                 from ../linbox/matrix/sparsematrix/sparse-generic.h:80,
                 from ../linbox/matrix/sparse-matrix.h:70,
                 from test-qlup.C:42:
../linbox/vector/bit-vector.inl:254:12: note: candidate: 'LinBox::BitVector::iterator LinBox::BitVector::iterator::operator+(LinBox::BitVector::iterator::difference_type) const'
  254 |   iterator operator + (difference_type i) const
      |            ^~~~~~~~
In file included from /usr/include/c++/10.2/vector:68,
                 from ../linbox/util/debug.h:42,
                 from ../linbox/matrix/matrix-traits.h:29,
                 from ../linbox/matrix/sparse-matrix.h:40,
                 from test-qlup.C:42:
/usr/include/c++/10.2/bits/stl_bvector.h:303:5: note: candidate: 'std::_Bit_iterator::iterator std::operator+(const iterator&, std::iterator<std::random_access_iterator_tag, bool>::difference_type)'
  303 |     operator+(const iterator& __x, difference_type __n)
      |     ^~~~~~~~
make: *** [Makefile:2489: test-qlup.o] Error 1
d-torrance commented 3 years ago

This has also been reported in Debian (#987921).