s2geometry icon indicating copy to clipboard operation
s2geometry copied to clipboard

fails to build on on ppc64el

Open spaetz opened this issue 1 year ago • 10 comments

Hi, s2geometry is in Debian, great. However, it fails to build on 2 architectures, and I have no clue what could be wrong, or how to fix it. (This is tag/v0.10.0, BTW)

The Debian issue is at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1023961 pointing to the build protocol at: https://buildd.debian.org/status/fetch.php?pkg=s2geometry&arch=ppc64el&ver=0.10.0-2&stamp=1667081576&raw=0

The relevant bit seems to be:

/<<PKGBUILDDIR>>/src/s2/s2edge_crossings.cc: In instantiation of ‘bool S2::internal::GetStableCrossProd(const Vector3<T>&, const Vector3<T>&, Vector3<T>*) [with T = long double]’:
/<<PKGBUILDDIR>>/src/s2/s2edge_crossings.cc:127:54:   required from here
/<<PKGBUILDDIR>>/src/s2/s2edge_crossings.cc:115:31: error: ‘(6.15348059642740421245081038903225e-15l / 5.40431955284459475358983848622456e+16l)’ is not a constant expression
  115 |       (32 * kSqrt3 * DBL_ERR) /
      |       ~~~~~~~~~~~~~~~~~~~~~~~~^
  116 |       (kRobustCrossProdError.radians() / T_ERR - (1 + 2 * kSqrt3));
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/<<PKGBUILDDIR>>/src/s2/s2edge_crossings.cc: In instantiation of ‘bool S2::GetIntersectionSimple(const Vector3<T>&, const Vector3<T>&, const Vector3<T>&, const Vector3<T>&, Vector3<T>*) [with T = long double]’:
/<<PKGBUILDDIR>>/src/s2/s2edge_crossings.cc:485:28:   required from here
/<<PKGBUILDDIR>>/src/s2/s2edge_crossings.cc:458:10: error: ‘(1.2e+1l / 7.20575940379279305358983848622456e+16l)’ is not a constant expression
  458 |       12 / (kIntersectionError.radians() / T_ERR - (2 + 2 * kSqrt3));
      |       ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [CMakeFiles/s2.dir/build.make:653: CMakeFiles/s2.dir/src/s2/s2edge_crossings.cc.o] Error 1

spaetz avatar Nov 15 '22 08:11 spaetz