[openssl-users] Help compiling on HPUX

Dan Freed dfreed at epic.com
Wed Nov 8 17:07:22 UTC 2017

I can confirm that I can compile with no-asm.  That’s a good thing.

I cannot however get any level of optimizations to compile correctly.  This may not be a problem for my use case, but it may be for others.

If I update Configurations/10-main.conf for hpux64-ia64-cc to use +O0, +O1, or +O2 (+O3 was the default) it will trigger the issue.  
  "hpux64-ia64-cc" => {
        inherit_from     => [ "BASE_unix", asm("ia64_asm") ],
        cc               => "cc",
        cflags           => combine(picker(default => "-Ae +DD64 +Olit=all -z -DB_ENDIAN",
                                           debug   => "+O0 +d -g",
                                           release => "+O0"),   #### I changed the value here!

This is also shown in the CFLAGS in the summary output from Configure:

Configuring for hpux64-ia64-cc
CC            =cc
CFLAG         =-Ae +DD64 +Olit=all -z -DB_ENDIAN +O0 -D_REENTRANT

While I can proceed with my project using no-asm, I am willing to try other changes to help the OpenSSL project out to see if the problem is just around one function that cannot be optimized, etc if anyone has any suggestions.  

I'm not sure if the git-hub bug moderators are on this list, so I'll update the bug report there with this new info.


On 11/8/17, 7:33 AM, "openssl-users on behalf of Ludwig, Mark" <openssl-users-bounces at openssl.org on behalf of ludwig.mark at siemens.com> wrote:

    > From: Michael Wojcik, Wednesday, November 08, 2017 7:03 AM
    > To: openssl-users at openssl.org
    > Subject: Re: [openssl-users] Help compiling on HPUX
    > > From: openssl-users [mailto:openssl-users-bounces at openssl.org] On Behalf
    > Of Dan Freed
    > > Sent: Tuesday, November 07, 2017 19:14
    > > To: openssl-users at openssl.org
    > > Subject: [openssl-users] Help compiling on HPUX
    > > I see that there are a few posts about compiling openssl on HP-UX, so I’m
    > hopeful that someone can help me out.
    > My initial suspect is the assembly modules. I suggest configuring with no-asm,
    > and if that works and you really want the assembly code for performance, then
    > investigate further.
    > Another possibility is optimization. We had issues building OpenSSL for HP-UX
    > (PA-RISC and Itanium) with +O4, which is what Configure specifies for at least
    > some HP-UX builds. We backed it off to +O1 (by editing Configure; we actually
    > use our own Configure script, and merge in changes from the official one each
    > time we update to a new OpenSSL release).
    Dan, you did not specify the platform.  I have not built on RISC since OpenSSL 0.9.8.
    I have built OpenSSL 1.0.2k on Itanium as follows.  I mostly agree with Michael, 
    but have not backed off optimization quite as far.  Note that my use cases do not
    include encrypting/decrypting large payloads, so can get away with reduced
    performance to get correct results (i.e., pass the tests).
    I had to edit util/selftest.pl for the compiler's identification output
    and because the ar(1) command will not accept /dev/null as an input file.
    I also eliminated a lot of the tests in test/cms-tests, because we do not use the 
    modules being tested.  (They were failing.)  I can believe these might work with 
    lower optimization such as Michael recommends.
    Below is the Configure output.  Hope this helps.
    Configuring for hpux64-ia64-cc
        no-asm          [option]   OPENSSL_NO_ASM
        no-dso          [option]  
        no-ec_nistp_64_gcc_128 [default]  OPENSSL_NO_EC_NISTP_64_GCC_128 (skip dir)
        no-gmp          [default]  OPENSSL_NO_GMP (skip dir)
        no-jpake        [experimental] OPENSSL_NO_JPAKE (skip dir)
        no-krb5         [krb5-flavor not specified] OPENSSL_NO_KRB5
        no-libunbound   [experimental] OPENSSL_NO_LIBUNBOUND (skip dir)
        no-md2          [default]  OPENSSL_NO_MD2 (skip dir)
        no-rc5          [default]  OPENSSL_NO_RC5 (skip dir)
        no-rfc3779      [default]  OPENSSL_NO_RFC3779 (skip dir)
        no-sctp         [default]  OPENSSL_NO_SCTP (skip dir)
        no-ssl-trace    [default]  OPENSSL_NO_SSL_TRACE (skip dir)
        no-ssl2         [default]  OPENSSL_NO_SSL2 (skip dir)
        no-store        [experimental] OPENSSL_NO_STORE (skip dir)
        no-unit-test    [default]  OPENSSL_NO_UNIT_TEST (skip dir)
        no-weak-ssl-ciphers [default]  OPENSSL_NO_WEAK_SSL_CIPHERS (skip dir)
        no-zlib         [default] 
        no-zlib-dynamic [default] 
    CC            =cc
    EX_LIBS       =-ldl
    CPUID_OBJ     =mem_clr.o
    BN_ASM        =bn_asm.o
    EC_ASM        =
    DES_ENC       =des_enc.o fcrypt_b.o
    AES_ENC       =aes_core.o aes_cbc.o
    BF_ENC        =bf_enc.o
    CAST_ENC      =c_enc.o
    RC4_ENC       =rc4_enc.o rc4_skey.o
    RC5_ENC       =rc5_enc.o
    MD5_OBJ_ASM   =
    SHA1_OBJ_ASM  =
    CMLL_ENC      =camellia.o cmll_misc.o cmll_cbc.o
    MODES_OBJ     =
    PROCESSOR     =
    RANLIB        =/usr/ccs/bin/ranlib
    ARFLAGS       =
    PERL          =/usr/local/smd/bin/perl
    DES_RISC1 used
    DES_UNROLL used
    DES_INT used
    RC4_INDEX mode
    RC4_CHUNK is undefined
    MD2 uses uchar
    > --
    > Michael Wojcik
    > Distinguished Engineer, Micro Focus
    > --
    > openssl-users mailing list
    > To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
    openssl-users mailing list
    To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

More information about the openssl-users mailing list