Re: [openssl.org #1000] [EMAIL PROTECTED]: Re: pkg/28858: security/openssl build fails on Sparc64 with ASM errors]
Hi, On Mon, Jan 24, 2005 at 06:35:00PM +0100, Andy Polyakov via RT wrote: > > I am the pkgsrc maintainer for OpenSSL, and I'm reworking the package > > structure to allow for simpler testing of the openssl snapshots. Since > > pkgsrc has a reasonably wide number of users/testers on NetBSD as well > > as Solaris, Linux, and MacOS X, we should be able to get reasonable > > coverage for test results. [..] > Great!!! I'm glad that a "direct connection" has been established now - because this is going to be much more effective than myself forwarding e-mails back and forth :-) I will go back to lurking (and breaking things and complaining about :) ). If you need me to run tests on NetBSD/Sparc64, you know where to find me, of course. I can't promise to do anything on a regular basis, though - too many open issues, too many things to do (among others, making the network work that will host openssl.org soon :-) ). Many thanks for your good work! gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany [EMAIL PROTECTED] fax: +49-89-35655025[EMAIL PROTECTED] __ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager [EMAIL PROTECTED]
[openssl.org #1000] [EMAIL PROTECTED]: Re: pkg/28858: security/openssl build fails on Sparc64 with ASM errors]
Hi OpenSSL developers, here's the NetBSD donation :-) - see below for a description what's in there. I won't claim to understand what's going on, but I can say for sure that 0.9.7e with the pkgsrc patches builds fine on NetBSD-Sparc64. regards, Gert Doering - Forwarded message from "Johnny C. Lam" <[EMAIL PROTECTED]> - Date: Fri, 14 Jan 2005 18:05:54 + From: "Johnny C. Lam" <[EMAIL PROTECTED]> To: Gert Doering <[EMAIL PROTECTED]> Subject: Re: pkg/28858: security/openssl build fails on Sparc64 with ASM errors In-Reply-To: <[EMAIL PROTECTED]> User-Agent: Mutt/1.5.6i X-Virus-Scanned: ClamAV 0.80/664/Thu Jan 13 16:13:05 2005 clamav-milter version 0.80j on kirk.greenie.muc.de X-Virus-Status: Clean X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on kirk.greenie.muc.de X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.2 tests=AWL,BAYES_00,UPPERCASE_25_50 autolearn=no version=3.0.1 On Thu, Jan 13, 2005 at 09:31:22PM +0100, Gert Doering wrote: > > In the parallel thread with the OpenSSL developers, I have been asked > whether "NetBSD can donate the netbsd-sparc64 target (patches)" for > inclusion in the upstream sources. I think this might be a good time > now, as everything works... I tried to send a message to openssl-dev@openssl.org, but my mail never seemed to get through. If you could forward the patch below to the proper list, I would really appreciate it. The patch is relative to openssl-0.9.7e, and has the configs for NetBSD and Interix, and also fixes a compilation issue on NetBSD/i386 due to the way the $fips variable wasn't being used in one circumstance. They are excerpts of the patches from the NetBSD Packages Collection (pkgsrc). Thanks, -- Johnny Lam <[EMAIL PROTECTED]> --- config.orig 2004-06-28 18:01:05.0 -0400 +++ config @@ -49,6 +49,7 @@ done # First get uname entries that we use below MACHINE=`(uname -m) 2>/dev/null` || MACHINE="unknown" +MACHINE_ARCH=`(uname -p) 2>/dev/null` || MACHINE_ARCH="unknown" RELEASE=`(uname -r) 2>/dev/null` || RELEASE="unknown" SYSTEM=`(uname -s) 2>/dev/null` || SYSTEM="unknown" VERSION=`(uname -v) 2>/dev/null` || VERSION="unknown" @@ -155,6 +156,10 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${ echo "mips4-sgi-irix64"; exit 0 ;; +Interix:3.*) + echo "i386-pc-interix3"; exit 0 + ;; + Linux:[2-9].*) echo "${MACHINE}-whatever-linux2"; exit 0 ;; @@ -216,7 +221,7 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${ ;; NetBSD:*) - echo "${MACHINE}-whatever-netbsd"; exit 0 + echo "${MACHINE_ARCH}-whatever-netbsd"; exit 0 ;; OpenBSD:*) @@ -654,9 +659,21 @@ EOF ia64-*-freebsd*) OUT="FreeBSD-ia64" ;; *-freebsd[3-9]*) OUT="FreeBSD-elf" ;; *-freebsd[1-2]*) OUT="FreeBSD" ;; - *86*-*-netbsd) OUT="NetBSD-x86" ;; - sun3*-*-netbsd) OUT="NetBSD-m68" ;; - *-*-netbsd) OUT="NetBSD-sparc" ;; + x86_64-*-netbsd) OUT="NetBSD-${MACHINE_ARCH}" ;; + *86*-*-netbsd) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + OUT="NetBSD-x86-aout" + else + OUT="NetBSD-x86-elf" + fi + ;; + alpha-*-netbsd|arm-*-netbsd|arm32-*-netbsd|m68000-*-netbsd|m68k-*-netbsd|\ + mipseb-*-netbsd|mipsel-*-netbsd|ns32k-*-netbsd|powerpc-*-netbsd|\ + sparc-*-netbsd|sparc64-*-netbsd|vax-*-netbsd) + OUT="NetBSD-${MACHINE_ARCH}" + ;; + *-*-netbsd) OUT="NetBSD" ;; + *-*-interix3) OUT="Interix3" ;; alpha*-*-openbsd) OUT="OpenBSD-alpha" ;; *86*-*-openbsd) OUT="OpenBSD-i386" ;; m68k*-*-openbsd) OUT="OpenBSD-m68k" ;; --- Configure.orig Fri Oct 1 07:34:28 2004 +++ Configure @@ -400,9 +400,23 @@ my %table=( "linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-ia64-ecc", "ecc:-DL_ENDIAN -DTERMIO -O2 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL:asm/x86_64-gcc.o:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"NetBSD-sparc","gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"NetBSD-m68", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"NetBSD-x86", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLI
Re: [openssl.org #1000] OpenSSL 0.9.7e fails RIPEMD160 on Sparc64
Hi, On Thu, Jan 13, 2005 at 04:56:58PM +0100, Andy Polyakov via RT wrote: > > So indeed, this seems to be a gcc (3.3.3) optimization error.Is there > > a way to make OpenSSL auto-disable "-O3" for specific crypto/... modules > > if its known that they fail on specific platforms? > > No. BTW, if it enough to drop to -O2 or do you have to -O0? -O2 is not sufficient (-> rmdtest fails). > Can you test if './config -DMD32_REG_T=int' does the trick? Yes! This makes rmdtest work with -O3. > > If yes, the NetBSD > > pkgsrc module could just enable this... > > > > PS: sorry that I forgot "make report" last time, here it is: [..] > > OS (config): sparc64-whatever-netbsd > > Target (default): NetBSD-sparc > > Target: NetBSD-sparc > > Just NetBSD-sparc? When gcc spits out 64-bit objects? You're more than > likely to suffer from http://www.openssl.org/support/faq.html#BUILD11. Uh, well, what shall I say? There are linux-sparc64 and solaris-sparc64 targets, but no NetBSD-sparc64... (and I consider myself mostly "user" on Sparc64 yet). > NetBSD should have contributed NetBSD-sparc64 target with appropriate > flags... A. The NetBSD pkgsrc tree has patch for the netbsd-sparc64 target, but using that failed with interesting MD5-assembly error codes. This is what got me started here - I opened a bug vs. NetBSD, they fixed the MD5 thing, and then we discovered that the upstream sources also have the ripemd problems. The NetBSD pkg maintainer (Jonny Lam) has just commited a new set of patches that fix building on Sparc64 for good :-) - maybe you could just incoprorate them (dunno what the NetBSD patch copyright policy is, though)? gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany [EMAIL PROTECTED] fax: +49-89-35655025[EMAIL PROTECTED] __ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager [EMAIL PROTECTED]
Re: [openssl.org #1000] OpenSSL 0.9.7e fails RIPEMD160 on Sparc64
Hi, On Thu, Jan 13, 2005 at 12:09:42AM +0100, Andy Polyakov via RT wrote: > > Anything I should try? > > INSTALL is specfic about this. "Try removing any compiler optimization > flags..." This very issue was discussed couple of times already (google > for error message) in Solaris context. The error is believed to be a GCC > 64-bit specific bug and nobody managed to prove otherwise so far. A. OK, thanks. If I compile the two .c/.o files in crypto/ripemd/ without optimization, the ./rmdtest passes without a hitch. 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-sparc" = "Cygwin" ]; then PATH="${LIBPATH}:$PATH"; fi; export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; ./rmdtest test 1 ok test 2 ok test 3 ok test 4 ok test 5 ok test 6 ok test 7 ok test 8 ok So indeed, this seems to be a gcc (3.3.3) optimization error.Is there a way to make OpenSSL auto-disable "-O3" for specific crypto/... modules if its known that they fail on specific platforms? If yes, the NetBSD pkgsrc module could just enable this... PS: sorry that I forgot "make report" last time, here it is: OpenSSL self-test report: OpenSSL version: 0.9.7e Last change: Avoid a race condition when CRLs are checked in a multi... Options: no-asm no-krb5 OS (uname): NetBSD kirk 2.0 NetBSD 2.0 (KIRK) #2: Tue Jan 11 20:49:13 CET 2005 [EMAIL PROTECTED]:/home/sparc64/obj/home/src-2.0/sys/arch/sparc64/compile/KIRK sparc64 OS (config): sparc64-whatever-netbsd Target (default): NetBSD-sparc Target: NetBSD-sparc Compiler: Using built-in specs. Configured with: /home/nick/work/netbsd/src/tools/gcc/../../gnu/dist/gcc/configure --enable-long-long --disable-multilib --enable-threads --disable-symvers --build=i386-unknown-netbsdelf --host=sparc64--netbsd --target=sparc64--netbsd Thread model: posix gcc version 3.3.3 (NetBSD nb3 20040520) Failure! [...] gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany [EMAIL PROTECTED] fax: +49-89-35655025[EMAIL PROTECTED] __ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager [EMAIL PROTECTED]
[openssl.org #1000] OpenSSL 0.9.7e fails RIPEMD160 on Sparc64
Hi OpenSSL people, I have a problem with OpenSSL 0.9.7e on NetBSD/Sparc64. (Originally this problem came from trying to compile netbsd/pkgsrc/openssl, which fails on Sparc64 due to incomplete NetBSD patches, but this has been fixed in the NetBSD tree. Testing the changes discovered the problem that I'm reporting now). System environment: NetBSD-2.0, Sparc64 (Sun Ultra 5) openssl 0.9.7e "no patches" Problem: in "make test", RIPEMD160 fails all other tests are fine Details: The error message from "make test" is this: pad1 - ok pad2 - ok 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-sparc" = "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 error calculating RIPEMD160 on 'abc' got 534dbff56cbaa431356ed97de140a03e30cea7ca instead of 8eb208f7e05d987a9b044a8e98c6b087f15a0bfc error calculating RIPEMD160 on 'message digest' got 572996fa268de87f2ff80ec9050b691c3e3aff7e instead of 5d0689ef49d2fae572b881b123a85ffa21595f36 (more RIPEMD160, then "Error code 8 / make stopped") "./config" configures for netbsd-sparc, sources are compiled with "-mv8" (but the problem also manifests in the pkgsrc tree, which adds a netbsd-sparc64 target, and compiles for sparc64 assembly - so I suspect it's not a sparc/sparc64 assembly thing, but related to 64 bit words or byte ordering) "./config no-asm" -> "make" -> "make test" yields the *same* error, so it's not a assembly issue. Anything I should try? Any more data that you need? regards, gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany [EMAIL PROTECTED] fax: +49-89-35655025[EMAIL PROTECTED] __ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager [EMAIL PROTECTED]