[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

Hi,

I am now trying to run Debian on Renesas SH(sh4) CPU.
http://buildd.debian-ports.org/status/architecture.php?suite=unstable&a=sh4

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

http://buildd.debian-ports.org/fetch.php?pkg=sofa-framework&arch=sh4&ver=1.0~beta4-3&stamp=1264585734&file=log&as=raw

-----
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

-- 
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)

@DPATCH@
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);
 #else
     return (double)sqrtl((long double)a);
 #endif
@@ -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);
+#else
     return sqrtl(a);
+#endif
 }
 
 template<class T>


More information about the Debian-med-packaging mailing list