Compiling OpenSSL on Solaris sparcv9 using cc with FIPS support - Issues

shivaramakrishna chakravarthula shivaramakrishna.ch at gmail.com
Mon Jun 22 20:52:38 UTC 2020


Hello,

I am trying to compile OpenSSL 1.0.2d with FIPS support on various Linux
and Unix platforms. I am building  "openssl-fips-ecp-2.0.16" prior to
building OpenSSL.

I have successfully compiled the same version of OpenSSL with FIPS support
in linux-x86_64, aix64-cc, solaris64-x86_64-cc architectures.  The build is
failing for "solaris64-sparcv9-cc" architecture.

See details below:


   - ./Configure solaris64-sparcv9-cc fips shared no-ec2m
   --with-fipsdir=/openssl-fips-ecp-2.0.16-build
   --prefix=/openssl-1.0.2d-build  -> Okay
   - make depend -> Okay
   - make -> *Fail*

/usr/ccs/bin/ranlib ../../libcrypto.a || echo Never mind.
> if [ -n "libcrypto.so.1.0.0 libssl.so.1.0.0" ]; then \
>         (cd ..; make libcrypto.so.1.0.0); \
> fi
> [ -z "libcrypto" ] || cc -KPIC -DOPENSSL_PIC -DOPENSSL_THREADS
> -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -xtarget=ultra -xarch=v9 -xO5
> -xstrconst -xdepend -Xa -DB_ENDIAN -DOPENSSL_BN_ASM_MONT
> -DOPENSSL_BN_ASM_GF2m -I/openssl-fips-ecp-2.0.16-build/include -DSHA1_ASM
> -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DGHASH_ASM -Iinclude \
>         -DFINGERPRINT_PREMAIN_DSO_LOAD -o fips_premain_dso  \
>         /openssl-fips-ecp-2.0.16-build/lib/fips_premain.c
> /openssl-fips-ecp-2.0.16-build/lib/fipscanister.o \
>         libcrypto.a -lsocket -lnsl -ldl
> ld: fatal: symbol `_sparcv9_vis1_instrument_bus2' is multiply-defined:
>         (file /openssl-fips-ecp-2.0.16-build/lib/fipscanister.o type=FUNC;
> file libcrypto.a(sparccpuid.o) type=FUNC);
> ld: fatal: symbol `_sparcv9_vis1_instrument_bus' is multiply-defined:
>         (file /openssl-fips-ecp-2.0.16-build/lib/fipscanister.o type=FUNC;
> file libcrypto.a(sparccpuid.o) type=FUNC);
> ld: fatal: File processing errors. No output written to fips_premain_dso
> *** Error code 1
> make: Fatal error: Command failed for target `fips_premain_dso'
> Current working directory /openssl-1.0.2d
> *** Error code 1
> make: Fatal error: Command failed for target `shared'
> Current working directory /openssl-1.0.2d/crypto
> *** Error code 1
> The following command caused the error:
> dir=crypto; target=all; if expr " crypto ssl engines apps test tools " :
> ".* $dir " >/dev/null 2>&1; then  if [ -d "$dir" ]; then  (    cd $dir &&
> echo "making $target in $dir..." &&  TOP= && unset TOP ${LIB+LIB}
> ${LIBS+LIBS}        ${INCLUDE+INCLUDE} ${INCLUDES+INCLUDES}
> ${DIR+DIR} ${DIRS+DIRS} ${SRC+SRC}              ${LIBSRC+LIBSRC}
> ${LIBOBJ+LIBOBJ} ${ALL+ALL}    ${EXHEADER+EXHEADER} ${HEADER+HEADER}
>     ${GENERAL+GENERAL} ${CFLAGS+CFLAGS}             ${ASFLAGS+ASFLAGS}
> ${AFLAGS+AFLAGS}             ${LDCMD+LDCMD} ${LDFLAGS+LDFLAGS}
> ${SCRIPTS+SCRIPTS}    ${SHAREDCMD+SHAREDCMD} ${SHAREDFLAGS+SHAREDFLAGS}
>   ${SHARED_LIB+SHARED_LIB} ${LIBEXTRAS+LIBEXTRAS} && make -e
> PLATFORM='solaris64-sparcv9-cc' PROCESSOR=''  CC='cc' CFLAG='-KPIC
> -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H
> -xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN
> -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
> -I/openssl-fips-ecp-2.0.16-build/include -DSHA1_ASM -DSHA256_ASM
> -DSHA512_ASM -DMD5_ASM -DAES_ASM -DGHASH_ASM'                       AS='cc'
> ASFLAG='-KPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN
> -DHAVE_DLFCN_H -xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa
> -DB_ENDIAN -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
> -I/openssl-fips-ecp-2.0.16-build/include -DSHA1_ASM -DSHA256_ASM
> -DSHA512_ASM -DMD5_ASM -DAES_ASM -DGHASH_ASM -c'                    AR='ar
>  r' NM='nm' RANLIB='/usr/ccs/bin/ranlib'         CROSS_COMPILE=''
>  PERL='/usr/bin/perl' ENGDIRS='ccgost'           SDIRS='objects  md4 md5
> sha mdc2 hmac ripemd whrlpool  des aes rc2 rc4 idea bf cast camellia seed
> modes  bn ec rsa dsa ecdsa dh ecdh dso engine  buffer bio stack lhash rand
> err  evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
>  cms pqueue ts srp cmac' LIBRPATH='/openssl-1.0.2d-build/lib'
> INSTALL_PREFIX=''               INSTALLTOP='/openssl-1.0.2d-build'
> OPENSSLDIR='/openssl-1.0.2d-build/ssl'       LIBDIR='lib'
>          MAKEDEPEND='$${TOP}/util/domd $${TOP} -MD makedepend'
>  DEPFLAG='-DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_EC2M
> -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE
> -DOPENSSL_NO_LIBUNBOUND -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5
> -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_RSAX -DOPENSSL_NO_SCTP
> -DOPENSSL_NO_SSL_TRACE -DOPENSSL_NO_STORE -DOPENSSL_NO_UNIT_TEST'
> MAKEDEPPROG='makedepend'                        SHARED_LDFLAGS='-xarch=v9
> -G -dy -z text'               KRB5_INCLUDES='' LIBKRB5=''
> ZLIB_INCLUDE='' LIBZLIB=''      EXE_EXT='' SHARED_LIBS='libcrypto.so.1.0.0
> libssl.so.1.0.0'     SHLIB_EXT='.so.1.0.0' SHLIB_TARGET='solaris-shared'
>   PEX_LIBS='' EX_LIBS='-lsocket -lnsl -ldl'       CPUID_OBJ='sparcv9cap.o
> sparccpuid.o' BN_ASM='bn-sparcv9.o sparcv9-mont.o sparcv9a-mont.o
> vis3-mont.o sparct4-mont.o sparcv9-gf2m.o'    EC_ASM=''
> DES_ENC='des_enc-sparc.o fcrypt_b.o dest4-sparcv9.o'
>  AES_ENC='aes_core.o aes_cbc.o aes-sparcv9.o aest4-sparcv9.o'
> CMLL_ENC='camellia.o cmll_misc.o cmll_cbc.o cmllt4-sparcv9.o'
>  BF_ENC='bf_enc.o' CAST_ENC='c_enc.o'    RC4_ENC='rc4_enc.o rc4_skey.o'
> RC5_ENC='rc5_enc.o'      SHA1_ASM_OBJ='sha1-sparcv9.o sha256-sparcv9.o
> sha512-sparcv9.o'                         MD5_ASM_OBJ='md5-sparcv9.o'
>               RMD160_ASM_OBJ=''               WP_ASM_OBJ='wp_block.o'
>                   MODES_ASM_OBJ='ghash-sparcv9.o'
> ENGINES_ASM_OBJ=''              PERLASM_SCHEME='void'
> FIPSLIBDIR='/openssl-fips-ecp-2.0.16-build/lib/'
>  FIPSDIR='/openssl-fips-ecp-2.0.16-build'
>  FIPSCANLIB="${FIPSCANLIB:-libcrypto}"   THIS=${THIS:-build_crypto}
> MAKEFILE=Makefile MAKEOVERRIDES= TOP=.. DIR=$dir $target  ) || exit 1;  fi;
>  fi
> make: Fatal error: Command failed for target `build_crypto'


Can anyone please help me with a solution?

Machine Architecture details:

> bash-3.00# uname -a
> SunOS uspriu04 5.10 Generic sun4u sparc SUNW,Sun-Blade-100


Regards,
Shiva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20200622/2c3b21f4/attachment-0001.html>


More information about the openssl-users mailing list