[Debian-astro-maintainers] Bug#787725: gyoto: FTBFS on 32-bit systems (assumes size_t is unsigned long)

Aaron M. Ucko ucko at debian.org
Thu Jun 4 13:33:16 UTC 2015


Source: gyoto
Version: 1.0.1-2
Severity: serious
Justification: fails to build from source (but built successfully in the past)

Builds of gyoto for 32-bit architectures such as i386 have been failing:
  
  In file included from Photon.C:26:0:
  ../include/GyotoWorldline.h:65:37: error: no matches converting function '_maxiter' to type 'Gyoto::Property::set_unsigned_long_t {aka void (class Gyoto::Object::*)(long unsigned int)}'
     GYOTO_PROPERTY_SIZE_T(c, MaxIter, _maxiter)    \
                                       ^
  ../include/GyotoProperty.h:117:50: note: in definition of macro 'GYOTO_PROPERTY_UNSIGNED_LONG'
      (Gyoto::Property::set_unsigned_long_t)&class::fname,  \
                                                    ^
  ../include/GyotoWorldline.h:127:3: note: in expansion of macro 'GYOTO_WORLDLINE_PROPERTIES'
     GYOTO_WORLDLINE_PROPERTIES(c)     \
     ^
  Photon.C:46:1: note: in expansion of macro 'GYOTO_WORLDLINE_PROPERTY_END'
   GYOTO_WORLDLINE_PROPERTY_END(Photon, Object::properties)
   ^
  In file included from ../include/GyotoPhoton.h:41:0,
                   from Photon.C:22:
  ../include/GyotoWorldline.h:153:10: note: candidates are: size_t Gyoto::Photon::_maxiter() const
     size_t _maxiter () const ;    \
            ^
  ../include/GyotoPhoton.h:99:3: note: in expansion of macro 'GYOTO_WORLDLINE'
     GYOTO_WORLDLINE;
     ^
  ../include/GyotoWorldline.h:152:8: note:                 void Gyoto::Photon::_maxiter(size_t)
     void _maxiter (size_t miter) ;   \
          ^
  ../include/GyotoPhoton.h:99:3: note: in expansion of macro 'GYOTO_WORLDLINE'
     GYOTO_WORLDLINE;
     ^

The problem appears to be that GyotoProperty.h expects size_t to be
formally equivalent to unsigned long.  This equivalence fully holds on
64-bit architectures, but on 32-bit Debian architectures, size_t is
technically unsigned int, which is formally distinct from unsigned
long even if it has the same representation and range of values.

I would suggest (unconditionally) extending Gyoto::Property with
get_size_t and and set_size_t methods, and redefining
GYOTO_PROPERTY_SIZE_T accordingly.

Could you please take a look?

Thanks!



More information about the Debian-astro-maintainers mailing list