Subject: Re: pkg/28858: security/openssl build fails on Sparc64 with ASM errors
To: Johnny C. Lam <jlam@NetBSD.org>
From: Gert Doering <gert@greenie.muc.de>
List: pkgsrc-bugs
Date: 01/11/2005 13:47:50
Hi,

On Tue, Jan 11, 2005 at 05:57:10AM +0000, Johnny C. Lam wrote:
> > error calculating RIPEMD160 on ''
> > got c12836ad0d061da6ccde02fb0b5be87f0c62a4a5 instead of 9c1185a5c5e9fc54612808977ee8f548b2258d31
> 
> I think these are endianness problems.  I've attached a new patch
> against security/openssl from the HEAD that marks sparc64 machines as
> ULTRASPARC and also explicitly defines the endianness for the build
> for all NetBSD architectures.  Please let me know if this allows your
> system to pass a "make test".

Unfortunately, no.  

What I did:

  - remove pkgsrc/security/openssl, re-CVS update it from HEAD
  - apply openssl2.diff
  - "make"

The resulting error message looks very similar - it also fails in doing
the RIPEMD160 checks:

OSSL_LIBPATH="`cd ..; pwd`"; LD_LIBRARY_PATH="$OSSL_LIBPATH:$LD_LIBRARY_PATH"; DYLD_LIBRARY_PATH="$OSSL_LIBPATH:$DYLD_LIBRARY_PATH"; SHLIB_PATH="$OSSL_LIBPATH:$SHLIB_PATH"; LIBPATH="$OSSL_LIBPATH:$LIBPATH"; if [ "NetBSD-sparc64" = "Cygwin" ]; then PATH="${LIBPATH}:$PATH"; fi; export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; ./rmdtest
error calculating RIPEMD160 on ''
got c12836ad0d061da6ccde02fb0b5be87f0c62a4a5 instead of 9c1185a5c5e9fc54612808977ee8f548b2258d31
error calculating RIPEMD160 on 'a'
got 9aa1049aec0363ac0a5895c44bb2fa79a49a20aa instead of 0bdc9d2d256b3ee9daae347be6f4dc835a467ffe
...
gmake[1]: *** [test_rmd] Error 8
gmake[1]: Leaving directory `/home/obj/pkg/security/openssl/work/openssl-0.9.7e/test'
gmake: *** [tests] Error 2
*** Error code 2

Stop.
make: stopped in /home/pkgsrc/security/openssl
*** Error code 1


Hmmm.  I have now tried with "vanilla" OpenSSL (0.9.7e from pkgsrc/distfiles)
and it has the *same* problem.  It doesn't use Sparc64 but only "-sparc",
and compiles with "-mv8", but still RIPEMD160 fails on "make test":

...
error calculating RIPEMD160 on ''
got c12836ad0d061da6ccde02fb0b5be87f0c62a4a5 instead of 9c1185a5c5e9fc54612808977ee8f548b2258d31
...

So this seems to make it an upstream bug now.  How to proceed?

(The initial issue, pkgsrc openssl not *building*, is fixed with the
latest patches.  Thanks for that!)

gert

-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             gert@greenie.muc.de
fax: +49-89-35655025                        gert@net.informatik.tu-muenchen.de