Bug#723172: linbox: FTBFS on s390: overloaded 'BlasMatrix(T&, size_t&, size_t&)' is ambiguous

Aaron M. Ucko ucko at debian.org
Tue Sep 17 02:29:31 UTC 2013


Source: linbox
Version: 1.3.2-1
Severity: serious
Justification: fails to build from source (but built successfully in the past)

The s390 build of linbox failed with errors of the form

  linbox-sage.C:458:36: error: call of overloaded 'BlasMatrix(IntegerRing&, size_t&, size_t&)' is ambiguous
  linbox-sage.C:458:36: note: candidates are:
  ../../linbox/matrix/blas-matrix.inl:312:2: note: LinBox::BlasMatrix<_Field>::BlasMatrix(const _Field&, const Integer&, const T&) [with T = long unsigned int, _Field = LinBox::PID_integer, LinBox::Integer = Givaro::Integer]
  ../../linbox/matrix/blas-matrix.inl:300:2: note: LinBox::BlasMatrix<_Field>::BlasMatrix(const _Field&, const int32_t&, const T&) [with T = long unsigned int, _Field = LinBox::PID_integer, int32_t = int]
  ../../linbox/matrix/blas-matrix.inl:236:2: note: LinBox::BlasMatrix<_Field>::BlasMatrix(const _Field&, const uint32_t&, const T&) [with T = long unsigned int, _Field = LinBox::PID_integer, uint32_t = unsigned int]
  ../../linbox/matrix/blas-matrix.inl:245:2: note: LinBox::BlasMatrix<_Field>::BlasMatrix(const _Field&, const int64_t&, const T&) [with T = long unsigned int, _Field = LinBox::PID_integer, int64_t = long long int]
  ../../linbox/matrix/blas-matrix.inl:287:2: note: LinBox::BlasMatrix<_Field>::BlasMatrix(const _Field&, const uint64_t&, const T&) [with T = long unsigned int, _Field = LinBox::PID_integer, uint64_t = long long unsigned int]

because size_t is unsigned long whereas uint32_t is unsigned int, and
as such formally distinct even though both are 32-bit unsigned types.
To avoid such errors, I would recommend covering long and unsigned
long when they formally underly neither (u)int32_t nor (u)int64_t.
I've had success with the equivalent of

    #if SIZEOF_LONG == 4  ||  defined(__APPLE__)

because (u)int32_t is normally (unsigned) int these days, and
(u)int64_t is (unsigned) long on 64-bit architectures other than Mac
OS X, on which it's always (unsigned) long long.  (That special case
is of course mainly of concern upstream.)

At any rate, could you please take a look?

Thanks!



More information about the debian-science-maintainers mailing list