Bug#741548: mruby FTBFS: build failed on post-compile-test on mips/mipsel

2014-04-10 Thread Aníbal Monsalve Salazar
Hello Nobuhiro and Akira,

At Imagination Technologies (http://imgtec.com) Dejan Latinovic have
found a solution to Debian bug #741548.

https://bugs.debian.org/741548

My NMU patch for mruby_1.0.0-1.1 is below, at the end of this message.

With the changes in the NMU patch mruby builds successfully on mips,
mipsel and amd64.

Please let me know if I should not go ahead with this NMU.

Regards,

Aníbal
-- 
Aníbal Monsalve Salazar anibal.monsalvesala...@imgtec.com

debdiff mruby_1.0.0-1.dsc mruby_1.0.0-1.1.dsc
diff -Nru mruby-1.0.0/debian/changelog mruby-1.0.0/debian/changelog
--- mruby-1.0.0/debian/changelog2014-03-21 16:33:35.0 +
+++ mruby-1.0.0/debian/changelog2014-04-10 07:48:08.0 +0100
@@ -1,3 +1,13 @@
+mruby (1.0.0-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Define log of zero.
+Add define-log-of-zero.patch.
+Patch by Dejan Latinovic.
+Closes: #741548
+
+ -- Anibal Monsalve Salazar ani...@debian.org  Thu, 10 Apr 2014 07:47:33 
+0100
+
 mruby (1.0.0-1) unstable; urgency=low
 
   * New upstream release(1.0.0).
diff -Nru mruby-1.0.0/debian/patches/define-log-of-zero.patch 
mruby-1.0.0/debian/patches/define-log-of-zero.patch
--- mruby-1.0.0/debian/patches/define-log-of-zero.patch 1970-01-01 
01:00:00.0 +0100
+++ mruby-1.0.0/debian/patches/define-log-of-zero.patch 2014-04-10 
07:47:23.0 +0100
@@ -0,0 +1,27 @@
+From: Dejan Latinovic dejan.latino...@imgtec.com
+Subject: mruby FTBFS: build failed on post-compile-test on mips/mipsel
+Date: Wed, 9 Apr 2014 15:09:35 +
+
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741548
+
+I have backported changes related to this issue from the newest
+version from github, and created a patch that solves it for
+mips/mipsel.
+
+diff -uNr a/src/numeric.c b/src/numeric.c
+--- a/src/numeric.c2014-01-10 12:49:57.0 +
 b/src/numeric.c2014-04-09 15:38:07.0 +
+@@ -141,7 +141,12 @@
+   *(c++) = '-';
+ }
+ 
+-exp = (int)log10(n);
++if (n != 0.0) {
++  exp = (int)log10(n);
++}
++else {
++  exp = 0;
++}
+ 
+ if ((exp  0 ? -exp : exp)  max_digit) {
+   /* exponent representation */
diff -Nru mruby-1.0.0/debian/patches/series mruby-1.0.0/debian/patches/series
--- mruby-1.0.0/debian/patches/series   2013-12-19 00:46:40.0 +
+++ mruby-1.0.0/debian/patches/series   2014-04-09 07:30:34.0 +0100
@@ -1 +1,2 @@
 enable_verbose_build.patch
+define-log-of-zero.patch


signature.asc
Description: Digital signature


Bug#741548: mruby FTBFS: build failed on post-compile-test on mips/mipsel

2014-04-10 Thread Nobuhiro Iwamatsu
Hi, Anibal.

Please go ahead.
Thanks for your work!

Best regards,
  Nobuhiro

2014-04-10 16:38 GMT+09:00 Aníbal Monsalve Salazar ani...@debian.org:
 Hello Nobuhiro and Akira,

 At Imagination Technologies (http://imgtec.com) Dejan Latinovic have
 found a solution to Debian bug #741548.

 https://bugs.debian.org/741548

 My NMU patch for mruby_1.0.0-1.1 is below, at the end of this message.

 With the changes in the NMU patch mruby builds successfully on mips,
 mipsel and amd64.

 Please let me know if I should not go ahead with this NMU.

 Regards,

 Aníbal
 --
 Aníbal Monsalve Salazar anibal.monsalvesala...@imgtec.com

 debdiff mruby_1.0.0-1.dsc mruby_1.0.0-1.1.dsc
 diff -Nru mruby-1.0.0/debian/changelog mruby-1.0.0/debian/changelog
 --- mruby-1.0.0/debian/changelog2014-03-21 16:33:35.0 +
 +++ mruby-1.0.0/debian/changelog2014-04-10 07:48:08.0 +0100
 @@ -1,3 +1,13 @@
 +mruby (1.0.0-1.1) unstable; urgency=medium
 +
 +  * Non-maintainer upload.
 +  * Define log of zero.
 +Add define-log-of-zero.patch.
 +Patch by Dejan Latinovic.
 +Closes: #741548
 +
 + -- Anibal Monsalve Salazar ani...@debian.org  Thu, 10 Apr 2014 07:47:33 
 +0100
 +
  mruby (1.0.0-1) unstable; urgency=low

* New upstream release(1.0.0).
 diff -Nru mruby-1.0.0/debian/patches/define-log-of-zero.patch 
 mruby-1.0.0/debian/patches/define-log-of-zero.patch
 --- mruby-1.0.0/debian/patches/define-log-of-zero.patch 1970-01-01 
 01:00:00.0 +0100
 +++ mruby-1.0.0/debian/patches/define-log-of-zero.patch 2014-04-10 
 07:47:23.0 +0100
 @@ -0,0 +1,27 @@
 +From: Dejan Latinovic dejan.latino...@imgtec.com
 +Subject: mruby FTBFS: build failed on post-compile-test on mips/mipsel
 +Date: Wed, 9 Apr 2014 15:09:35 +
 +
 +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741548
 +
 +I have backported changes related to this issue from the newest
 +version from github, and created a patch that solves it for
 +mips/mipsel.
 +
 +diff -uNr a/src/numeric.c b/src/numeric.c
 +--- a/src/numeric.c2014-01-10 12:49:57.0 +
  b/src/numeric.c2014-04-09 15:38:07.0 +
 +@@ -141,7 +141,12 @@
 +   *(c++) = '-';
 + }
 +
 +-exp = (int)log10(n);
 ++if (n != 0.0) {
 ++  exp = (int)log10(n);
 ++}
 ++else {
 ++  exp = 0;
 ++}
 +
 + if ((exp  0 ? -exp : exp)  max_digit) {
 +   /* exponent representation */
 diff -Nru mruby-1.0.0/debian/patches/series mruby-1.0.0/debian/patches/series
 --- mruby-1.0.0/debian/patches/series   2013-12-19 00:46:40.0 +
 +++ mruby-1.0.0/debian/patches/series   2014-04-09 07:30:34.0 +0100
 @@ -1 +1,2 @@
  enable_verbose_build.patch
 +define-log-of-zero.patch



-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#741548: mruby FTBFS: build failed on post-compile-test on mips/mipsel

2014-04-09 Thread Dejan Latinovic

Hello,

I have backported changes related to this issue from 
the newest  version from github,
and created a patch that solves it for
mips/mipsel.

Could you please consider including 
these changes in a current version of mruby (1.0.0-1).

Thanks,
Dejandiff -uNr mruby-1.0.0.orig/src/numeric.c mruby-1.0.0/src/numeric.c
--- mruby-1.0.0.orig/src/numeric.c	2014-01-10 12:49:57.0 +
+++ mruby-1.0.0/src/numeric.c	2014-04-08 15:38:07.0 +
@@ -141,7 +141,12 @@
   *(c++) = '-';
 }
 
-exp = (int)log10(n);
+if (n != 0.0) {
+  exp = (int)log10(n);
+}
+else {
+  exp = 0;
+}
 
 if ((exp  0 ? -exp : exp)  max_digit) {
   /* exponent representation */


Bug#741548: mruby FTBFS: build failed on post-compile-test on mips/mipsel

2014-03-13 Thread Dejan Latinovic


Package: mruby
Version: 0.0.0~20131214+git882afdea-1
Tags: sid fixed-upstream
Severity: important
Justification: FTBFS
User: debian-mips-dev-disc...@lists.alioth.debian.org
Usertags: mips-patch


In an attempt to rebuild the package on mips/mipsel, build failed on testing:


 Error: Float#% [15.2.9.3.5] = Too large expornent.
 Error: String#to_f [15.2.10.5.38] = Too large expornent.
 Error: NilClass#to_f = Too large expornent. (mrbgems: mruby-object-ext)
 Total: 629
OK: 629
KO: 0
 Crash: 4
  Time: 0.420954 seconds
 rake aborted!
 Command Failed: [build/host/test/mrbtest -v]
 Rakefile:103:in `block (2 levels) in top (required)'
 make[1]: *** [test] Error 1
 make[1]: Leaving directory `/«BUILDDIR»/mruby-0.0.0~20131214+git882afdea'
 dh_auto_test: make -j1 test returned exit code 2
 make: *** [build-arch] Error 2


The reason for this is different behavior of log10() function on MIPS in 
comparison with amd64,
if n is equal to zero. 
 int exp;
 exp = (int)log10(n);
from file: src/numeric.c


This issue is fixed upstream in latest version from git:
https://github.com/mruby/mruby.git


Release 1.0.0 doesn't work correctly for MIPS architectures.


Could you please consider updating package mruby to the
latest git version?
I was able to successfully build it for mips/mipsel.


Thanks,
Dejan


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org