[Debian-med-packaging] Bug#567223: FTBFS : ../../../framework/sofa/helper/rmath.h:138: error: 'sqrtl' was not declared in this scope

Nobuhiro Iwamatsu iwamatsu at nigauri.org
Thu Jan 28 00:53:07 UTC 2010

Source: sofa-framework
Version: 1.0~beta4-3
Severity: important
Tags: patch
User: debian-sh4 at superh.org
Usertags: sh4
X-Debbugs-CC: debian-superh at lists.debian.org


I am now trying to run Debian on Renesas SH(sh4) CPU.

sofa-framework FTBFS on SH4.
Because  SH uses sqrt not sqrtl in the same as ARM and MIPS, too.


In file included from ../../../framework/sofa/defaulttype/Vec.h:32,
                 from ../../../framework/sofa/helper/gl/Axis.h:30,
                 from gl/Axis.cpp:27:
../../../framework/sofa/helper/rmath.h: In function 'double
sofa::helper::rsqrt(const double&)':
../../../framework/sofa/helper/rmath.h:138: error: 'sqrtl' was not
declared in this scope
../../../framework/sofa/helper/rmath.h: In function 'long double
sofa::helper::rsqrt(const long double&)':
../../../framework/sofa/helper/rmath.h:147: error: 'sqrtl' was not
declared in this scope
make[4]: *** [OBJ/release/Axis.o] Error 1

I updated 55_fix_mips_sqrt.diff.
Could you apply this patch?

Best regards,

Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
-------------- next part --------------
#! /bin/sh /usr/share/dpatch/dpatch-run
## 55_fix_mips_sqrt.dpatch by  <domibel at sid1500>
## All lines beginning with `## DP:' are a description of the patch.
## DP: fixes a build error on MIPS ARM, and SuperH (sqrt/sqrtl)

Index: sofa-framework-1.0~beta4/framework/sofa/helper/rmath.h
--- sofa-framework-1.0~beta4.orig/framework/sofa/helper/rmath.h	2009-12-06 14:23:24.000000000 -0500
+++ sofa-framework-1.0~beta4/framework/sofa/helper/rmath.h	2009-12-06 14:23:29.000000000 -0500
@@ -132,8 +132,8 @@
 inline double rsqrt(const double& a)
-#if defined(__GNUC__)
-    return sqrt(a);
+#if defined(__arm__) || defined(__mips__) || defined(__sh__)
+    return sqrt((double)a);
     return (double)sqrtl((long double)a);
@@ -141,7 +141,11 @@
 inline long double rsqrt(const long double& a)
+#if defined(__arm__) || defined(__mips__) || defined(__sh__)
+    return (long double)sqrt((double)a);
     return sqrtl(a);
 template<class T>

More information about the Debian-med-packaging mailing list