Bug#880149: libntru: FTBFS on s390x and sparc64: test suite errors

2017-10-30 Thread Aaron M. Ucko
"Ying-Chun Liu (PaulLiu)"  writes:

> The __GLIBC__ should be <= 1 or < 2. Which makes more sense.
> GLIBC version less than 2.9 we define that. Otherwise we handle these
> functions to endian.h

Sounds good, thanks!  AFAICT, glibc has had endian.h for over 25
years (going back at least as far as version 1.02), so please do fall
back on that rather than hardcoding a (badly incomplete) architecture
list.

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?a...@monk.mit.edu



Bug#880149: libntru: FTBFS on s390x and sparc64: test suite errors

2017-10-30 Thread Ying-Chun Liu (PaulLiu)
On 2017年10月30日 22:15, Aaron M. Ucko wrote:
> Control: user debian-m...@lists.debian.org
> Control: usertag 880149 mips
> 
> "Aaron M. Ucko"  writes:
> 
>> On s390x, it did better, but a third of the tests still failed,
>> quite possibly for related reasons:
> 
> The same three tests (test_arr, test_encr_decr, and test_key) also
> failed on mips and the non-release architecture hppa, which hadn't yet
> attempted to build libntru when I originally reported this bug.  All of
> the architectures to encounter test suite errors to date are big-endian,
> but so are powerpc and ppc64, which ran into no such trouble.  Is
> upstream perhaps treating all non-PowerPC architectures as little-endian?
> 

Hi Aaron,

Thanks for reporting the bug.

Yes. Seems so. It seems to me that there are bugs on the upstream. I'll
contact the upstream and fix that issue.

It is inside src/ntru_endian.h
#ifdef __GLIBC__
#if __GLIBC__ <= 2 || ( __GLIBC__ == 2 && __GLIBC_MINOR__ < 9 )
#ifndef __powerpc__
/* assume little endian */
#define htole64(x) (x)
#define htole32(x) (x)
#define htole16(x) (x)
#endif
#endif
#endif

The __GLIBC__ should be <= 1 or < 2. Which makes more sense.
GLIBC version less than 2.9 we define that. Otherwise we handle these
functions to endian.h

I'll forward a bug report to the upstream soon.

Yours,
Paul

-- 
PaulLiu (劉穎駿)
E-mail: Ying-Chun Liu (PaulLiu) 



signature.asc
Description: OpenPGP digital signature


Bug#880149: libntru: FTBFS on s390x and sparc64: test suite errors

2017-10-30 Thread Aaron M. Ucko
Control: user debian-m...@lists.debian.org
Control: usertag 880149 mips

"Aaron M. Ucko"  writes:

> On s390x, it did better, but a third of the tests still failed,
> quite possibly for related reasons:

The same three tests (test_arr, test_encr_decr, and test_key) also
failed on mips and the non-release architecture hppa, which hadn't yet
attempted to build libntru when I originally reported this bug.  All of
the architectures to encounter test suite errors to date are big-endian,
but so are powerpc and ppc64, which ran into no such trouble.  Is
upstream perhaps treating all non-PowerPC architectures as little-endian?

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?a...@monk.mit.edu



Bug#880149: libntru: FTBFS on s390x and sparc64: test suite errors

2017-10-29 Thread Aaron M. Ucko
Source: libntru
Version: 0.5-1
Severity: important
Tags: upstream
Justification: fails to build from source
User: debian-s...@lists.debian.org

Builds of libntru for s390x and the non-release architecture sparc64
both failed with test suite errors, as respectively detailed at

https://buildd.debian.org/status/fetch.php?pkg=libntru=s390x=0.5-1=1509309554=0
https://buildd.debian.org/status/fetch.php?pkg=libntru=sparc64=0.5-1=1509307392=0

On sparc64, the test crashed up front with a bus error, which
typically indicates an unaligned memory access attempt:

  Testing patent-reduced build
  LD_LIBRARY_PATH=. ./testnoham
  Bus error

On s390x, it did better, but a third of the tests still failed,
quite possibly for related reasons:

  LD_LIBRARY_PATH=. ./testnoham
  Running tests...
test_mult_int✓
test_mult_tern   ✓
test_inv ✓
test_arr FAIL
test_keygen  ✓
test_encr_decr   FAIL
test_idxgen  ✓
test_bitstring   ✓
test_key FAIL
test_hash✓
  One or more tests failed

FWIW, the build for ppc64, Debian's other 64-bit big-endian
architecture, fully succeeded.

Could you please take a look?

Thanks!

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?a...@monk.mit.edu