Discussion:
Bug#836983: freecad: autopkgtests fail on ppc64el and s390x
(too old to reply)
Graham Inggs
2016-09-07 19:30:01 UTC
Permalink
Source: freecad
Version: 0.16+dfsg2-1
Severity: wishlist


Hi Maintainer

In Ubuntu, freecad 0.16+dfsg2-1 has been failing autopkgtests on
ppc64el and 390x with the following error:

======================================================================
ERROR: testConversions (UnitTests.UnitBasicCases)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/freecad/Mod/Test/UnitTests.py", line 27, in testConversions
self.failUnless(compare(tu('m^2*kg*s^-3*A^-2'), 1000000.0))
File "/usr/lib/freecad/Mod/Test/UnitTests.py", line 9, in tu
return FreeCAD.Units.Quantity(str).Value
ValueError: Unit overflow in pow()

======================================================================
ERROR: testUnits (TestSpreadsheet.SpreadsheetCases)
Units -- test unit calculations.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/freecad/Mod/Spreadsheet/TestSpreadsheet.py", line
307, in testUnits
self.assertEqual(sheet.A9, Quantity('5 K^-1'))
ValueError: Unit overflow in pow()

I verified the behaviour on plummer.debian.org, a ppc64el porterbox.
It seems to be a problem with raising a unit to a negative power on
these architectures.

Regards
Graham
Graham Inggs
2017-11-20 19:20:01 UTC
Permalink
Hi Frederic
Just for the record, this bug also happens on arm64.
This seems to be a regression. I'm trying to bisect that.
Did you ever make any progress with this?

Regards
Graham
Graham Inggs
2017-12-07 11:00:02 UTC
Permalink
Control: retitle -1 freecad: autopkgtests fail on arm64, ppc64el, s390x

Ubuntu have recently enabled autopkgtests on arm64 [1] which confirms
the same "Unit overflow in pow()" failure on arm64.


[1] http://autopkgtest.ubuntu.com/packages/f/freecad/bionic/arm64
Frédéric Bonnard
2017-12-07 17:20:01 UTC
Permalink
Hi Graham,
Post by Graham Inggs
Just for the record, this bug also happens on arm64.
This seems to be a regression. I'm trying to bisect that.
Did you ever make any progress with this?
no Graham. The bisect didn't bring anything interesting to me and I wasn't
able to go further.
I'm going to have a look at it again.
Did you open a bug upstream since then ?

F.
Frédéric Bonnard
2017-12-07 20:10:02 UTC
Permalink
Graham, here is patch attached for the issue.
By default some architectures have "char" being unsigned such as the ones
listed here and others ( https://wiki.debian.org/ArchitectureSpecificsMemo ).
I just forced the sign-ness of pow()'s argument.
Sorry for the delay.

F.
Post by Graham Inggs
Hi Frederic
Just for the record, this bug also happens on arm64.
This seems to be a regression. I'm trying to bisect that.
Did you ever make any progress with this?
Regards
Graham
Graham Inggs
2017-12-08 13:40:01 UTC
Permalink
Hi Frédéric
Post by Frédéric Bonnard
Graham, here is patch attached for the issue.
By default some architectures have "char" being unsigned such as the ones
listed here and others ( https://wiki.debian.org/ArchitectureSpecificsMemo ).
I just forced the sign-ness of pow()'s argument.
Thanks for the patch! I uploaded it to Ubuntu, and the autopkgtests
were successful everywhere that freecad builds [1].
Post by Frédéric Bonnard
Sorry for the delay.
There is no need for an apology.

Do you intend to send this upstream, or shall I do it?

Regards
Graham


[1] http://autopkgtest.ubuntu.com/packages/freecad
Frédéric Bonnard
2017-12-08 13:40:01 UTC
Permalink
Hi Graham,
Hi Frédéric
Post by Frédéric Bonnard
Graham, here is patch attached for the issue.
By default some architectures have "char" being unsigned such as the ones
listed here and others ( https://wiki.debian.org/ArchitectureSpecificsMemo ).
I just forced the sign-ness of pow()'s argument.
Thanks for the patch! I uploaded it to Ubuntu, and the autopkgtests
were successful everywhere that freecad builds [1].
Post by Frédéric Bonnard
Sorry for the delay.
There is no need for an apology.
Do you intend to send this upstream, or shall I do it?
I'm going to send a PR asap.
Thanks for checking on Ubuntu.

F.
Regards
Graham
[1] http://autopkgtest.ubuntu.com/packages/freecad
Frédéric Bonnard
2017-12-08 18:00:02 UTC
Permalink
tags 836983 fixed-upstream

thanks

Here is the commit upstream from the pull request that was accepted :
https://github.com/FreeCAD/FreeCAD/commit/651d2fd7519eed8aeebcd14518045621cac14a29

F.
Hi Frédéric
Post by Frédéric Bonnard
Graham, here is patch attached for the issue.
By default some architectures have "char" being unsigned such as the ones
listed here and others ( https://wiki.debian.org/ArchitectureSpecificsMemo ).
I just forced the sign-ness of pow()'s argument.
Thanks for the patch! I uploaded it to Ubuntu, and the autopkgtests
were successful everywhere that freecad builds [1].
Post by Frédéric Bonnard
Sorry for the delay.
There is no need for an apology.
Do you intend to send this upstream, or shall I do it?
Regards
Graham
[1] http://autopkgtest.ubuntu.com/packages/freecad
Loading...