Hello Helge,
Couldn't the patch be pushed upstream? And maybe there should be an else
branch with the encoding of the other NaN?
On 2024-04-27 17:35, Helge Deller wrote:
Source: libcbor
Version: 0.10.2-1.2
Tags: ftbfs
X-Debbugs-Cc: del...@debian.org
libcbor fails to build from source on the hppa and mips architectures.
Reason is, that a testcases which checks the binary representation
of NaN fails on those architectures, because they use a different binary
encoding of the bytes.
See the "encoding" section at https://en.wikipedia.org/wiki/NaN for
details.
Failure except:
20: [ RUN ] test_float
20: [ ERROR ] --- difference at offset 2 0xffffffbf 0xffffffc0
20: difference at offset 3 0xffffffff 0x00
20: difference at offset 4 0xffffffff 0x00
20: 3 bytes of 0x1739c and 0xfa001b57 differ
20: [ LINE ] --- ./test/float_ctrl_encoders_test.c:150: error: Failure!
20: [ FAILED ] test_float
20: [ RUN ] test_double
20: [ ERROR ] --- difference at offset 2 0xfffffff7 0xfffffff8
20: difference at offset 3 0xffffffff 0x00
20: difference at offset 4 0xffffffff 0x00
20: difference at offset 5 0xffffffff 0x00
20: difference at offset 6 0xffffffff 0x00
20: difference at offset 7 0xffffffff 0x00
20: difference at offset 8 0xffffffff 0x00
20: 7 bytes of 0x1739c and 0xfa001b63 differ
20: [ LINE ] --- ./test/float_ctrl_encoders_test.c:177: error: Failure!
The attached patch avoids this test on hppa and thus building libcbor
succeeds.
I did not test the patch on mips yet.
Helge